openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.6.2
  x-snr-buildTime: '2026-07-29T10:00:36Z'
servers:
- url: https://api.synerise.com
  description: Microsoft Azure EU
- url: https://api.azu.synerise.com
  description: Microsoft Azure USA
- url: https://api.geb.synerise.com
  description: Google Cloud Platform
tags:
- name: Activities
- name: Time Optimizer
- name: Search Stats
- name: Recommendation statistics
- name: 'Analytics: Management'
- name: 'Analytics: Metrics'
- name: 'Analytics: Reports'
- name: 'Analytics: Expressions'
- name: 'Analytics: Histograms'
- name: 'Analytics: Segmentations'
- name: 'Analytics: Aggregates'
- name: 'Analytics: Sankeys'
- name: 'Analytics: Funnels'
- name: 'Analytics: Trends'
- name: Events
- name: Profile management
- name: Tags
- name: Profile devices
- name: Profile account management
- name: Authorization (deprecated)
- name: AI Events
- name: Control Center
- name: Workflows
- name: Workflow schedules
- name: Schema Builder
- name: 'Brickworks: Schemas'
- name: 'Brickworks: Records'
- name: 'Brickworks: Content generation'
- name: 'Brickworks: External sources'
- name: 'Brickworks: Record versions'
- name: Consumption
- name: Organization workspaces
- name: Settings
- name: Catalogs
- name: Item filters
- name: Visual Search
- name: Search
- name: Listing
- name: Search Configuration
- name: Query classification
- name: Suggestions Configuration
- name: 'AI: Metrics'
- name: Data Processing Job Logs
- name: Batch Operations Job Logs
- name: Experiments
- name: Promotions
- name: Promotion locks
- name: Handbills
- name: Promotion settings
- name: Promotions points
- name: Query Rules
- name: Recommendation campaigns
- name: Recommendations
- name: Recommendations Configuration
- name: Profile registration
- name: Authorization
- name: Devices
- name: Screen views
- name: Documents
- name: Screen views (legacy)
- name: Documents (legacy)
- name: Synonyms
- name: Asset tags
- name: Templates
- name: Template directories
- name: Preview
- name: Access control
- name: User account management
- name: Access groups
- name: User management
- name: Directory
- name: Uploader
- name: Vouchers
paths:
  /activities-api/activities/{clientId}:
    get:
      deprecated: true
      tags:
      - Activities
      summary: Get profile activities
      description: Retrieve a list of activities from a single profile.
      operationId: getActivitiesPerClient
      security:
      - JWT: []
      parameters:
      - in: path
        name: clientId
        description: The ID of the profile
        required: true
        schema:
          type: number
          example: '434428563'
      - $ref: '#/components/parameters/activities-api-queryDateFrom'
      - $ref: '#/components/parameters/activities-api-queryDateTo'
      - $ref: '#/components/parameters/activities-api-queryActions'
      - $ref: '#/components/parameters/activities-api-queryLimit'
      - $ref: '#/components/parameters/activities-api-queryRaw'
      - $ref: '#/components/parameters/activities-api-queryFormat'
      responses:
        '200':
          description: Activities
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                  - $ref: '#/components/schemas/activities-api-ActivityTerrarium2'
                  - $ref: '#/components/schemas/activities-api-ActivityRaw2'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_READ
  /activities-api/activity/by/{identifierType}:
    post:
      deprecated: true
      tags:
      - Activities
      summary: Get a single activity
      description: Retrieve the details of a single activity.
      operationId: getActivityForClient
      security:
      - JWT: []
      parameters:
      - in: path
        name: identifierType
        description: Profile identifier type
        required: true
        schema:
          type: string
          enum:
          - id
          - uuid
          - email
          - custom_identify
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/activities-api-SingleActivityRequest'
      responses:
        '200':
          description: Activity
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/activities-api-ActivityTerrarium1'
                - $ref: '#/components/schemas/activities-api-ActivityRaw1'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_READ
  /activities-api/descriptions:
    post:
      tags:
      - Activities
      summary: Add description mapping
      description: For each event, you can add a custom, human-readable description that's displayed in the Synerise Web Application
      operationId: addDescription
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/activities-api-descriptionRequest'
        description: Details of the description mapping
        required: true
      responses:
        '200':
          description: Description mapping
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/activities-api-descriptionResponse'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_UPDATE
    get:
      tags:
      - Activities
      summary: Get description mappings
      description: Retrieve a list of existing event-description mappings
      operationId: getDescription
      security:
      - JWT: []
      responses:
        '200':
          description: Description mappings
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/activities-api-descriptionResponse'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_READ
  /activities-api/descriptions/{descriptionId}:
    post:
      tags:
      - Activities
      summary: Update description mapping
      description: Modify an existing description mapping
      operationId: updateDescriptionsById
      security:
      - JWT: []
      parameters:
      - in: path
        name: descriptionId
        description: ID of the mapping
        required: true
        schema:
          type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/activities-api-descriptionRequest'
        description: Updated information
        required: true
      responses:
        '200':
          description: Description mapping
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/activities-api-descriptionResponse'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_UPDATE
  /activities-api/labels:
    post:
      tags:
      - Activities
      summary: Add label mapping
      description: For each event, you can add a custom, human-readable label that's displayed in the Synerise Web Application
      operationId: addLabel
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/activities-api-labelRequest'
        description: Details of the label mapping
        required: true
      responses:
        '200':
          description: Label mapping
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/activities-api-labelResponse'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_UPDATE
    get:
      tags:
      - Activities
      summary: Get label mappings
      description: Retrieve a list of existing event-label mappings
      operationId: getLabel
      security:
      - JWT: []
      responses:
        '200':
          description: Label mappings
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/activities-api-labelResponse'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_READ
  /activities-api/labels/{labelId}:
    post:
      tags:
      - Activities
      summary: Update label mapping
      description: Modify an existing label mapping
      operationId: updateLabelById
      security:
      - JWT: []
      parameters:
      - in: path
        name: labelId
        description: ID of the mapping
        required: true
        schema:
          type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/activities-api-labelRequest'
        description: Updated information
        required: true
      responses:
        '200':
          description: Label mapping
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/activities-api-labelResponse'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_UPDATE
  /activities-api/icons:
    post:
      tags:
      - Activities
      summary: Add icon mapping
      description: For each event, you can add a custom icon that's displayed in the Synerise Web Application
      operationId: addIcon
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/activities-api-iconRequest'
        description: Icon details
        required: true
      responses:
        '200':
          description: Icon
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/activities-api-iconResponse'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_UPDATE
    get:
      tags:
      - Activities
      summary: Get icon mappings
      description: Retrieve a list of existing event-icon mappings
      operationId: getIcons
      security:
      - JWT: []
      responses:
        '200':
          description: Icon mappings
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/activities-api-iconResponse'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_READ
  /activities-api/icons/{iconID}:
    post:
      tags:
      - Activities
      summary: Update icon mapping
      description: Modify an existing icon mapping
      operationId: updateIconById
      security:
      - JWT: []
      parameters:
      - in: path
        name: iconID
        description: ID of the icon
        required: true
        schema:
          type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/activities-api-iconRequest'
        description: Updated mapping data
        required: true
      responses:
        '200':
          description: Icon mapping
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/activities-api-iconResponse'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_UPDATE
  /activities-api/events:
    get:
      tags:
      - Activities
      summary: Get profile's own events
      description: |
        As a profile, retrieve a list of your own events.
      operationId: getEvents
      parameters:
      - $ref: '#/components/parameters/activities-api-queryActions'
      - $ref: '#/components/parameters/activities-api-queryDateFromV2'
      - $ref: '#/components/parameters/activities-api-queryDateToV2'
      - $ref: '#/components/parameters/activities-api-queryLimit'
      - $ref: '#/components/parameters/activities-api-queryRaw'
      - $ref: '#/components/parameters/activities-api-queryToken'
      - $ref: '#/components/parameters/activities-api-querySortBy'
      responses:
        '200':
          $ref: '#/components/responses/activities-api-EventResponse'
      x-snr-scopes:
      - CLIENT
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_READ
      security:
      - JWT: []
  /activities-api/events/by/{identifierType}:
    post:
      tags:
      - Activities
      summary: Get profile events as a workspace/Synerise user
      description: |
        Retrieve a list of events for the single profile.
      operationId: getEventsByIdentifier
      parameters:
      - $ref: '#/components/parameters/activities-api-pathIdentifierType'
      - $ref: '#/components/parameters/activities-api-queryToken'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/activities-api-ClientEventsRequest'
      responses:
        '200':
          $ref: '#/components/responses/activities-api-EventResponse'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - ACTIVITIES_API_ACTIVITIES_READ
      security:
      - JWT: []
  /activity-time-estimator/v1/query-model:
    post:
      summary: Generate activity time predictions
      description: Calculate the probability of a profile performing an activity (event) at specific times of the week.
      operationId: generate-time-predictions
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-permissions:
      - AI_TIME_OPTIMIZER_GET_PREDICTIONS_ANALYTICS_READ
      x-snr-groups:
      - analytics_ai_time_optimizer
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
              - type: object
                title: With profile ID
                required:
                - clientID
                properties:
                  clientID:
                    $ref: '#/components/schemas/activity-time-estimator-ClientIDs'
                  mode:
                    $ref: '#/components/schemas/activity-time-estimator-Mode'
                  timeIndex:
                    $ref: '#/components/schemas/activity-time-estimator-TimeIndex'
                  timeIndexExclude:
                    $ref: '#/components/schemas/activity-time-estimator-TimeIndexExclude'
                  topN:
                    $ref: '#/components/schemas/activity-time-estimator-TopN'
              - type: object
                title: With profile UUID
                required:
                - clientUUID
                properties:
                  clientUUID:
                    $ref: '#/components/schemas/activity-time-estimator-ClientUUIDs'
                  mode:
                    $ref: '#/components/schemas/activity-time-estimator-Mode'
                  timeIndex:
                    $ref: '#/components/schemas/activity-time-estimator-TimeIndex'
                  timeIndexExclude:
                    $ref: '#/components/schemas/activity-time-estimator-TimeIndexExclude'
                  topN:
                    $ref: '#/components/schemas/activity-time-estimator-TopN'
      responses:
        '200':
          description: Predicted activity times
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  title: With profile ID
                  properties:
                    clientID:
                      $ref: '#/components/schemas/activity-time-estimator-ClientIDs'
                    hours:
                      $ref: '#/components/schemas/activity-time-estimator-Hours'
                    predictions:
                      $ref: '#/components/schemas/activity-time-estimator-Predictions'
                - type: object
                  title: With profile UUID
                  properties:
                    clientUUID:
                      $ref: '#/components/schemas/activity-time-estimator-ClientUUIDs'
                    hours:
                      $ref: '#/components/schemas/activity-time-estimator-Hours'
                    predictions:
                      $ref: '#/components/schemas/activity-time-estimator-Predictions'
      tags:
      - Time Optimizer
  /search/v2/indices/{indexId}/stats/queries/summary:
    get:
      summary: Get queries stats summary
      description: Retrieves the statistics of all queries or a single query defined in the request.
      operationId: GetQueriesSummary
      tags:
      - Search Stats
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - AI_STATS_READ
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/ai-stats-indexId'
      - $ref: '#/components/parameters/ai-stats-dateFrom'
      - $ref: '#/components/parameters/ai-stats-dateTo'
      - $ref: '#/components/parameters/ai-stats-query'
      - $ref: '#/components/parameters/ai-stats-searchType'
      - $ref: '#/components/parameters/ai-stats-searchGroupBy'
      responses:
        '200':
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-WrappedQueriesSummary'
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
        '500':
          description: Service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
  /search/v2/indices/{indexId}/stats/queries/top:
    get:
      summary: Get top query statistics
      description: "Retrieves the 1000 most popular queries. \n\n<strong>IMPORTANT</strong>: Don't use this endpoint for displaying most popular queries to end users when they're searching. Instead, use [`search/v2/indices/{indexId}/list`](https://developers.synerise.com/AISearch/AISearch.html#operation/ListingGet), where `indexId` is a suggestion index.\n"
      operationId: GetQueriesTop
      tags:
      - Search Stats
      x-snr-scopes:
      - PROFILE
      - USER
      - LEGACY_AI_KEY
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - AI_STATS_READ
      security:
      - JWT: []
      - TrackerKey: []
      parameters:
      - $ref: '#/components/parameters/ai-stats-indexId'
      - $ref: '#/components/parameters/ai-stats-dateFrom'
      - $ref: '#/components/parameters/ai-stats-dateTo'
      - $ref: '#/components/parameters/ai-stats-query'
      - $ref: '#/components/parameters/ai-stats-searchType'
      - $ref: '#/components/parameters/ai-stats-queryFilter'
      - $ref: '#/components/parameters/ai-stats-searchGroupBy'
      - $ref: '#/components/parameters/ai-stats-withFilters'
      - $ref: '#/components/parameters/ai-stats-searchSortBy'
      - $ref: '#/components/parameters/ai-stats-searchOrdering'
      responses:
        '200':
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-WrappedQueriesTop'
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
        '500':
          description: Service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
  /search/v2/indices/{indexId}/stats/filters/summary:
    get:
      summary: Get filters stats
      description: Retrieves the statistics of filters used in searches.
      operationId: GetFiltersSummary
      tags:
      - Search Stats
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - AI_STATS_READ
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/ai-stats-indexId'
      - $ref: '#/components/parameters/ai-stats-filterName'
      - $ref: '#/components/parameters/ai-stats-dateFrom'
      - $ref: '#/components/parameters/ai-stats-dateTo'
      - $ref: '#/components/parameters/ai-stats-searchGroupBy'
      - $ref: '#/components/parameters/ai-stats-searchOrdering'
      responses:
        '200':
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-WrappedFiltersSummary'
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
        '500':
          description: Service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
  /search/v2/indices/{indexId}/stats/rules/summary:
    get:
      summary: Get rules stats
      description: Retrieves the statistics of applied rules.
      operationId: GetRulesSummary
      tags:
      - Search Stats
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - AI_STATS_READ
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/ai-stats-indexId'
      - $ref: '#/components/parameters/ai-stats-dateFrom'
      - $ref: '#/components/parameters/ai-stats-dateTo'
      - $ref: '#/components/parameters/ai-stats-searchGroupBy'
      responses:
        '200':
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-WrappedRulesSummary'
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
        '500':
          description: Service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
  /search/v2/indices/stats/queries/summary:
    get:
      summary: Get queries summary for multiple indices
      description: Retrieves the statistics of all queries or a single query defined in the request for multiple indices.
      operationId: GetQueriesSummaryMultipleIndices
      tags:
      - Search Stats
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - AI_STATS_READ
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/ai-stats-indexIdArray'
      - $ref: '#/components/parameters/ai-stats-dateFrom'
      - $ref: '#/components/parameters/ai-stats-dateTo'
      - $ref: '#/components/parameters/ai-stats-query'
      - $ref: '#/components/parameters/ai-stats-searchType'
      - $ref: '#/components/parameters/ai-stats-searchGroupBy'
      responses:
        '200':
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-WrappedQueriesSummaryMultipleIndices'
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
        '500':
          description: Service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
  /recommendations/v2/campaigns/stats:
    post:
      summary: Get recommendation campaign statistics
      description: Retrieves the statistics of campaigns defined in the request.
      operationId: PostCampaignsStats
      tags:
      - Recommendation statistics
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - AI_STATS_READ
      security:
      - JWT: []
      - TrackerKey: []
      requestBody:
        $ref: '#/components/requestBodies/ai-stats-RecoStatsRequest'
      responses:
        '200':
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-WrappedRecoStatsByCampaign'
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
        '500':
          description: Service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
  /recommendations/v2/campaigns/stats/global:
    get:
      summary: Get global recommendation campaign statistics
      description: Retrieves the statistics of all recommendation campaigns.
      operationId: GetCampaignsGlobalStats
      tags:
      - Recommendation statistics
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - AI_STATS_READ
      security:
      - JWT: []
      - TrackerKey: []
      parameters:
      - $ref: '#/components/parameters/ai-stats-from'
      - $ref: '#/components/parameters/ai-stats-to'
      - $ref: '#/components/parameters/ai-stats-timeZone'
      responses:
        '200':
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-WrappedRecoStatsByDate'
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
        '500':
          description: Service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
  /recommendations/v2/campaigns/{campaignId}/stats:
    get:
      summary: Get recommendation campaign statistics
      description: Retrieves the statistics of a single recommendation campaign.
      operationId: GetCampaignStats
      tags:
      - Recommendation statistics
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - AI_STATS_READ
      security:
      - JWT: []
      - TrackerKey: []
      parameters:
      - $ref: '#/components/parameters/ai-stats-campaignIdPath'
      - $ref: '#/components/parameters/ai-stats-from'
      - $ref: '#/components/parameters/ai-stats-to'
      - $ref: '#/components/parameters/ai-stats-timeZone'
      responses:
        '200':
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-WrappedRecoStatsByDate'
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
        '500':
          description: Service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
  /recommendations/v2/campaigns/{campaignId}/products/stats:
    get:
      summary: Get statistics for top items in a campaign
      description: Retrieves the statistics of top products for a single recommendation campaign.
      operationId: GetRecoTopProductsStats
      tags:
      - Recommendation statistics
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - AI_STATS_READ
      security:
      - JWT: []
      - TrackerKey: []
      parameters:
      - $ref: '#/components/parameters/ai-stats-campaignIdPath'
      - $ref: '#/components/parameters/ai-stats-from'
      - $ref: '#/components/parameters/ai-stats-to'
      - $ref: '#/components/parameters/ai-stats-timeZone'
      - $ref: '#/components/parameters/ai-stats-productMetricName'
      responses:
        '200':
          description: Statistics returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-WrappedRecoTopProductsStats'
        4xx:
          description: Incorrect request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
        '500':
          description: Service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai-stats-Error'
  /analytics/analytics/batch-delete:
    post:
      tags:
      - 'Analytics: Management'
      summary: Delete multiple analyses
      description: Deletes many analytics in a single request
      operationId: analytics2-analytics-batch-delete
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-AnalyticsBatchDeleteRequest'
        required: true
      responses:
        '204':
          description: Analytics deleted
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-scopes:
      - USER
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_BATCH_DELETE
  /analytics/{Namespace}/metrics:
    get:
      tags:
      - 'Analytics: Metrics'
      summary: List metrics
      description: Returns a paginated list of metrics.
      operationId: analytics2-metrics-list
      parameters:
      - $ref: '#/components/parameters/analytics-page'
      - $ref: '#/components/parameters/analytics-limit'
      - $ref: '#/components/parameters/analytics-search'
      - $ref: '#/components/parameters/analytics-sortBy'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-directoryId'
      - $ref: '#/components/parameters/analytics-ids'
      - $ref: '#/components/parameters/analytics-isHistogramMetric'
      - $ref: '#/components/parameters/analytics-isReportMetric'
      responses:
        '200':
          description: List of metrics
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of metrics
                    items:
                      $ref: '#/components/schemas/analytics-MetricListItem'
                  meta:
                    $ref: '#/components/schemas/analytics-Meta'
                required:
                - data
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_METRICS_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
    post:
      tags:
      - 'Analytics: Metrics'
      summary: Create metric analysis
      operationId: analytics2-metrics-create
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-MetricRequest'
      responses:
        '200':
          description: ID of the created analysis
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-Id'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_METRICS_CREATE
      - ANALYTICS_BACKEND_METRIC_CREATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/metrics/{AnalysisId}:
    get:
      tags:
      - 'Analytics: Metrics'
      summary: Get metric details
      description: Retrieve the details of a metric definition.
      operationId: analytics2-metrics-get
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      responses:
        '200':
          description: Metric details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-MetricView'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_METRICS_READ
      - ANALYTICS_BACKEND_METRIC_READ
      x-snr-scopes:
      - USER
      - PROFILE
      security:
      - JWT: []
    put:
      tags:
      - 'Analytics: Metrics'
      summary: Update metric
      description: Update an existing metric definition.
      operationId: analytics2-metrics-update
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-MetricRequest'
      responses:
        '200':
          description: Metric details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-MetricView'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_METRICS_UPDATE
      - ANALYTICS_BACKEND_METRIC_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
    delete:
      tags:
      - 'Analytics: Metrics'
      summary: Delete metric analysis
      operationId: analytics2-metrics-delete
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      responses:
        '204':
          description: Metric deleted
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_METRICS_DELETE
      - ANALYTICS_BACKEND_METRIC_DELETE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v4/reports/{AnalysisId}/recalculate/override:
    post:
      tags:
      - 'Analytics: Reports'
      summary: Calculate report with override
      description: Calculate a report with new parameters and/or variables (dynamic keys)
      operationId: analytics2-recalculate-report-override
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-OverrideQueryRequest'
      responses:
        '200':
          description: Report calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-ReportCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_REPORT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v4/reports/{AnalysisId}/recalculate:
    post:
      tags:
      - 'Analytics: Reports'
      summary: Recalculate report
      description: Retrieve the results of a previously-created report.
      operationId: analytics2-recalculate-report
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '200':
          description: Report calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-ReportCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_REPORT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v4/reports/preview:
    post:
      tags:
      - 'Analytics: Reports'
      summary: Preview report
      description: Retrieve the results of a report. This request doesn't save the report.
      operationId: analytics2-preview-report
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-ReportPreviewRequest'
      responses:
        '200':
          description: Report calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-ReportCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_REPORT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v4/reports/preview-csv:
    post:
      tags:
      - 'Analytics: Reports'
      summary: Preview report as CSV
      description: Retrieve the results of a report as CSV. This request doesn't save the report.
      operationId: analytics2-preview-csv-report
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-ReportPreviewRequest'
      responses:
        '200':
          description: CSV data
          content:
            text/csv:
              schema:
                type: string
                description: |
                  Results for groupings. Each grouping is a CSV row, with the first row being the column headers.

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

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

                  This means that 26 profiles named John visited a page titled "Discounted Product Page". The same page was visited by 12 profiles named Steve. Profiles named Steve visited "New product pre-order" page 117 times.
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_REPORT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/directories:
    get:
      tags:
      - 'Analytics: Management'
      summary: List directories
      description: Returns a list of directories for a given analytic type.
      operationId: analytics2-directories-list
      parameters:
      - name: analyticType
        in: query
        description: Type of object
        required: true
        style: form
        explode: true
        schema:
          $ref: '#/components/schemas/analytics-ObjectType'
      responses:
        '200':
          description: List of directories
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/analytics-Directory'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_DESCRIPTION_ANALYTICS_READ
      x-snr-scopes:
      - USER
      - PROFILE
    post:
      tags:
      - 'Analytics: Management'
      summary: Create directory
      description: Creates a new directory
      operationId: analytics2-directories-create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-DirectoryCreateRequest'
      responses:
        '201':
          description: ID of the created directory
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/analytics-Id'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_DESCRIPTION_ANALYTICS_CREATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/directories/{DirectoryId}:
    delete:
      tags:
      - 'Analytics: Management'
      summary: Delete directory
      description: Deletes a directory. If the directory contains any analyses, they are moved to the default directory.
      operationId: analytics2-directories-delete
      parameters:
      - $ref: '#/components/parameters/analytics-DirectoryIdPathParam'
      responses:
        '204':
          description: Directory deleted
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_DESCRIPTION_ANALYTICS_DELETE
      x-snr-scopes:
      - USER
      - PROFILE
    patch:
      tags:
      - 'Analytics: Management'
      summary: Rename directory
      description: Renames a directory
      operationId: analytics2-directories-rename
      parameters:
      - $ref: '#/components/parameters/analytics-DirectoryIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-DirectoryRenameRequest'
      responses:
        '204':
          description: Directory renamed
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_DESCRIPTION_ANALYTICS_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/directories/change/{AnalysisId}:
    patch:
      tags:
      - 'Analytics: Management'
      summary: Change Directory
      description: Moves an analysis to another directory
      operationId: analytics2-directories-change
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-DirectoryChangeRequest'
      responses:
        '204':
          description: Analysis moved
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_DESCRIPTION_ANALYTICS_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v3/metrics/preview:
    post:
      tags:
      - 'Analytics: Metrics'
      summary: Preview metric
      description: Get the results of a metric. This request doesn't save the metric to the database.
      operationId: analytics2-preview-metric-legacy
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-MetricLegacyPreview'
      responses:
        '200':
          description: Metric preview result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-MetricCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_METRIC_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v3/metrics/{AnalysisId}/recalculate/override:
    post:
      tags:
      - 'Analytics: Metrics'
      summary: Calculate metric with parameter override
      description: Recalculate a metric with new parameters and/or variable (dynamic key) values.
      operationId: analytics2-calculate-metric-with-override
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-OverrideQueryRequest'
      responses:
        '200':
          description: Metric calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-MetricCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_METRIC_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v3/metrics/{AnalysisId}/recalculate:
    post:
      tags:
      - 'Analytics: Metrics'
      summary: Calculate metric
      description: Calculate a metric that was created earlier.
      operationId: analytics2-calculate-metric
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '200':
          description: Metric calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-MetricCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_METRIC_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v3/metrics/{AnalysisId}/dynamic/value:
    post:
      tags:
      - 'Analytics: Metrics'
      summary: Calculate dynamic metric
      description: Calculate a metric that includes variables (dynamic keys).
      operationId: analytics2-calculate-metric-override-variables
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-DynamicVariablesRequest'
      responses:
        '200':
          description: Metric calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-MetricCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_METRIC_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/expressions/visible-for-client/by/{IdentifierType}:
    post:
      tags:
      - 'Analytics: Expressions'
      summary: Get expressions for profile card
      description: |
        Retrieve expressions to display on a profile's card in the Profiles module (`"isVisibleForClientProfile": true` in the [expression config](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/addExpressionPOST)).
      operationId: analytics2-client-card-expressions-get
      parameters:
      - $ref: '#/components/parameters/analytics-pathIdentifierType'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: '#/components/schemas/analytics-IdentifierValue'
              required:
              - identifierValue
      responses:
        '200':
          description: List of calculated expressions configured as visible on the profile card
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/analytics-BatchCalculationResult'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      - client_analytics_preview
      x-snr-permissions:
      - ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/expressions/{AnalysisId}/calculate/by/{IdentifierType}:
    post:
      tags:
      - 'Analytics: Expressions'
      summary: Calculate expression for profile
      description: Calculate the result of an expression in context of a single profile.
      operationId: analytics2-expression-calculate
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      - $ref: '#/components/parameters/analytics-pathIdentifierType'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: '#/components/schemas/analytics-IdentifierValue'
              required:
              - identifierValue
      responses:
        '200':
          description: Expression result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-ExpressionResult'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/expressions:
    get:
      tags:
      - 'Analytics: Expressions'
      summary: List expressions
      description: Returns a paginated list of expressions.
      operationId: analytics2-expressions-list
      parameters:
      - $ref: '#/components/parameters/analytics-page'
      - $ref: '#/components/parameters/analytics-limit'
      - $ref: '#/components/parameters/analytics-search'
      - $ref: '#/components/parameters/analytics-sortBy'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-directoryId'
      - $ref: '#/components/parameters/analytics-ids'
      - $ref: '#/components/parameters/analytics-expressionType'
      - $ref: '#/components/parameters/analytics-actionName'
      responses:
        '200':
          description: List of expressions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of expressions
                    items:
                      $ref: '#/components/schemas/analytics-ExpressionListItem'
                  meta:
                    $ref: '#/components/schemas/analytics-Meta'
                required:
                - data
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_EXPRESSIONS_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
    post:
      tags:
      - 'Analytics: Expressions'
      summary: Create expression
      description: Create an expression that is saved in the database and can be used in other analyses.
      operationId: analytics2-expressions-create
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-expressionCreateRequestBody'
      responses:
        '201':
          description: Create expression
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_EXPRESSIONS_CREATE
      - ANALYTICS_BACKEND_EXPRESSION_CREATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/expressions/{AnalysisId}:
    get:
      tags:
      - 'Analytics: Expressions'
      summary: Get expression details
      description: Retrieve information about an expression analysis
      operationId: analytics2-expressions-get
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '200':
          description: Get expression details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-ExpressionView'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_EXPRESSIONS_READ
      - ANALYTICS_BACKEND_EXPRESSION_READ
      x-snr-scopes:
      - USER
      - PROFILE
    put:
      tags:
      - 'Analytics: Expressions'
      summary: Update expression
      description: Update an existing expression
      operationId: analytics2-expressions-update
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-expressionCreateRequestBody'
      responses:
        '200':
          description: Update expression
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_EXPRESSIONS_UPDATE
      - ANALYTICS_BACKEND_EXPRESSION_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
    delete:
      tags:
      - 'Analytics: Expressions'
      summary: Delete expression
      operationId: analytics2-expressions-delete
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '204':
          description: Delete expression
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_EXPRESSIONS_DELETE
      - ANALYTICS_BACKEND_EXPRESSION_DELETE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/expressions/preview/by/{IdentifierType}:
    post:
      tags:
      - 'Analytics: Expressions'
      summary: Get expression preview
      description: Retrieve expression preview value. Previews are only available for CLIENT-type expressions. This request doesn't save the expression.
      operationId: analytics2-expression-preview-v2
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-pathIdentifierType'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-ExpressionPreviewRequestWithClient'
      responses:
        '200':
          description: Expression preview result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-ExpressionTypedCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      - client_analytics_preview
      x-snr-permissions:
      - ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/histograms:
    get:
      tags:
      - 'Analytics: Histograms'
      summary: List histograms
      description: Returns a paginated list of histograms.
      operationId: analytics2-histograms-list
      parameters:
      - $ref: '#/components/parameters/analytics-page'
      - $ref: '#/components/parameters/analytics-limit'
      - $ref: '#/components/parameters/analytics-search'
      - $ref: '#/components/parameters/analytics-sortBy'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-directoryId'
      - $ref: '#/components/parameters/analytics-ids'
      responses:
        '200':
          description: List of histograms
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of histograms
                    items:
                      $ref: '#/components/schemas/analytics-ListAnalyticsItemCommon'
                  meta:
                    $ref: '#/components/schemas/analytics-Meta'
                required:
                - data
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_HISTOGRAMS_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
    post:
      tags:
      - 'Analytics: Histograms'
      summary: Create histogram
      operationId: analytics2-histograms-create
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-HistogramRequest'
      responses:
        '200':
          description: Histogram created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-Id'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_HISTOGRAMS_CREATE
      - ANALYTICS_BACKEND_HISTOGRAM_CREATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/histograms/{AnalysisId}:
    get:
      tags:
      - 'Analytics: Histograms'
      summary: Get histogram details
      description: Retrieve the details of an existing histogram definition
      operationId: analytics2-histograms-get
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '200':
          description: Histogram analysis details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-HistogramView'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_HISTOGRAMS_READ
      - ANALYTICS_BACKEND_HISTOGRAM_READ
      x-snr-scopes:
      - USER
      - PROFILE
    put:
      tags:
      - 'Analytics: Histograms'
      summary: Update histogram analysis
      description: Update an existing histogram analysis
      operationId: analytics2-histograms-update
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-HistogramRequest'
      responses:
        '200':
          description: Histogram updated
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_HISTOGRAMS_UPDATE
      - ANALYTICS_BACKEND_HISTOGRAM_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
    delete:
      tags:
      - 'Analytics: Histograms'
      summary: Delete histogram
      operationId: analytics2-histograms-delete
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '204':
          description: Histogram deleted
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_HISTOGRAMS_DELETE
      - ANALYTICS_BACKEND_HISTOGRAM_DELETE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v3/metrics/histogram-metrics:
    get:
      tags:
      - 'Analytics: Metrics'
      summary: Get metrics usable in histograms
      description: Retrieve a list of metrics that can be used in histograms.
      operationId: analytics2-get-histogram-metrics
      responses:
        '200':
          description: List of metrics
          content:
            application/json;charset=UTF-8:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/analytics-MetricProjectionResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_METRIC_HISTOGRAM_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v2/segmentations/{AnalysisId}/dynamic/value:
    post:
      tags:
      - 'Analytics: Segmentations'
      summary: Calculate dynamic segmentation
      description: Calculate a segmentation that includes variables (dynamic keys).
      operationId: analytics2-calculate-segmentations-with-variables
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-DynamicVariablesRequest'
      responses:
        '200':
          description: Segmentation calculation results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-SegmentationCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATION_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v2/segmentations/preview:
    post:
      tags:
      - 'Analytics: Segmentations'
      summary: Preview segmentation
      description: Preview the results of a segmentation, with information about the results of each segment. This request does not save the analysis.
      operationId: analytics2-segmentation-preview-legacy
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-SegmentationPreviewRequest'
      responses:
        '200':
          description: Calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-SegmentationCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATION_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v2/segmentations/preview/clients:
    post:
      tags:
      - 'Analytics: Segmentations'
      summary: Preview profiles in segmentation
      description: Calculate a segmentation and get a list of profiles in each segment. This request doesn't save the segmentation in the database.
      operationId: analytics2-segmentation-preview-clients-legacy
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-SegmentationPreviewRequest'
      responses:
        '200':
          description: Array of segments
          content:
            application/json:
              schema:
                type: array
                description: Each item in this array is a segment, according to their order in the request.
                items:
                  type: array
                  description: Each number in the segment is a profile ID.
                  items:
                    type: number
                    format: int64
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATION_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v2/metrics/histograms/{AnalysisId}/recalculate/override:
    post:
      tags:
      - 'Analytics: Histograms'
      summary: Calculate histogram with parameter override
      description: Calculate a histogram with new parameters and/or variable (dynamic key) values.
      operationId: analytics2-calculate-histogram-with-override
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-OverrideQueryRequest'
      responses:
        '200':
          description: Histogram override calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-HistogramCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_HISTOGRAM_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v2/metrics/histograms/preview:
    post:
      tags:
      - 'Analytics: Histograms'
      summary: Preview histogram
      description: Preview the results of a histogram. This request doesn't save the histogram.
      operationId: analytics2-histogram-preview-legacy
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-HistogramLegacyPreviewRequest'
      responses:
        '200':
          description: Histogram preview calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-HistogramCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_HISTOGRAM_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/profiles/segmentations/firstMatch/by/{IdentifierType}:
    post:
      tags:
      - 'Analytics: Segmentations'
      summary: Get first matching segmentation for profile from provided list
      description: Check a number of segmentations and return the first one that matches the selected profile. Note that `segmentations` is a list of objects to check, and each object can also refer to multiple segmentations.
      operationId: analytics2-segmentation-first-match-by
      parameters:
      - $ref: '#/components/parameters/analytics-pathIdentifierType'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-AnalyticsFirstMatchRequest'
        required: true
      responses:
        '200':
          description: Identifier (`id` from the request body) of the matched entry
          content:
            application/json:
              schema:
                type: string
                format: uuid
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATIONS_READ
      - ANALYTICS_BACKEND_SEGMENTATION_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/segmentations:
    get:
      tags:
      - 'Analytics: Segmentations'
      summary: List segmentations
      description: Returns a paginated list of segmentations.
      operationId: analytics2-segmentations-list
      parameters:
      - $ref: '#/components/parameters/analytics-page'
      - $ref: '#/components/parameters/analytics-limit'
      - $ref: '#/components/parameters/analytics-search'
      - $ref: '#/components/parameters/analytics-sortBy'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-directoryId'
      - $ref: '#/components/parameters/analytics-ids'
      - $ref: '#/components/parameters/analytics-shareType'
      responses:
        '200':
          description: List of segmentations
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of segmentations
                    items:
                      $ref: '#/components/schemas/analytics-SegmentationBasic'
                  meta:
                    $ref: '#/components/schemas/analytics-Meta'
                required:
                - data
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATIONS_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
    post:
      tags:
      - 'Analytics: Segmentations'
      summary: Create segmentation
      description: Create a new segmentation
      operationId: analytics2-segmentations-create
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-SegmentationRequest'
      responses:
        '200':
          description: ID of the created segmentation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-Id'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATIONS_CREATE
      - ANALYTICS_BACKEND_SEGMENTATION_CREATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/segmentations/{AnalysisId}:
    get:
      tags:
      - 'Analytics: Segmentations'
      summary: Get segmentation details
      description: Retrieve the details of a segmentation analysis
      operationId: analytics2-segmentation-get
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      responses:
        '200':
          description: Segmentation details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-SegmentationView'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATIONS_READ
      - ANALYTICS_BACKEND_SEGMENTATION_READ
      x-snr-scopes:
      - USER
      - PROFILE
    put:
      tags:
      - 'Analytics: Segmentations'
      summary: Update segmentation
      description: Update an existing segmentation analysis.
      operationId: analytics2-segmentation-update
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-SegmentationRequest'
      responses:
        '200':
          description: Segmentation updated
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATIONS_UPDATE
      - ANALYTICS_BACKEND_SEGMENTATION_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
    delete:
      tags:
      - 'Analytics: Segmentations'
      summary: Delete segmentation
      operationId: analytics2-segmentation-delete
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      responses:
        '204':
          description: Deleted segmentation analysis
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATIONS_DELETE
      - ANALYTICS_BACKEND_SEGMENTATION_DELETE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/segmentations/visible-for-client/by/{IdentifierType}:
    post:
      tags:
      - 'Analytics: Segmentations'
      summary: Get segmentations for profile card
      description: |
        Retrieve segmentations to display on a profile's card in the Profiles module (`"isVisibleForClientProfile": true`) in the [segmentation config](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/addSegmentationPOST_v2)).
      operationId: analytics2-client-card-segmentations-get
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-pathIdentifierType'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: '#/components/schemas/analytics-IdentifierValue'
              required:
              - identifierValue
      responses:
        '200':
          description: List of checked segmentations configured as visible on the profile card
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/analytics-CalculatedAnalytic'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      - client_analytics_preview
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATIONS_FOR_CLIENT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/segmentations/check/by/{IdentifierType}:
    post:
      tags:
      - 'Analytics: Segmentations'
      summary: Check if profile in segmentations
      description: |
        Check if a profile is in a number of segmentations.

        **IMPORTANT**: This endpoint is limited to:
        - 10 segmentations per request
        - 500 requests per second
        - 10 requests per second per profile
      operationId: analytics2-segmentation-check
      parameters:
      - $ref: '#/components/parameters/analytics-pathIdentifierType'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: '#/components/schemas/analytics-IdentifierValue'
                segmentationIds:
                  type: array
                  description: UUIDs of the segmentations to check
                  items:
                    $ref: '#/components/schemas/analytics-AnalyticId'
                  maxItems: 10
              required:
              - identifierValue
              - segmentationIds
      responses:
        '200':
          description: Check results
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/analytics-SegmentationWithRelated'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SEGMENTATIONS_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/definitions-manager/aggregates/{AggregateIdentifier}/client/{ProfileId}/calculate/histogram:
    post:
      tags:
      - 'Analytics: Aggregates'
      summary: Calculate aggregate for profile with period conditions
      description: Calculate the results of an aggregate in context of a single profile. The results can be date-filtered and aggregated in time periods.
      operationId: analytics-calculate-aggregate-for-profile-with-period-uuid
      parameters:
      - $ref: '#/components/parameters/analytics-aggregateIdentifierAsPathParam'
      - $ref: '#/components/parameters/analytics-clientIdAsPathParameter'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-AggregateHistogramRequest'
      responses:
        '200':
          description: Aggregate calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-AggregateHistogramCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_AGGREGATE_HISTOGRAM_FOR_CLIENT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/aggregates/preview/by/{IdentifierType}:
    post:
      tags:
      - 'Analytics: Aggregates'
      summary: Get aggregate preview
      description: Retrieve aggregate preview value. Previews are only available for the AGGREGATE type (profile aggregate). This request doesn't save an aggregate to the database.
      operationId: analytics2-aggregate-preview-v2
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-pathIdentifierType'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-AggregatePreviewRequest'
      responses:
        '200':
          description: Aggregate preview
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-AggregateTypedCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics_aggregates
      x-snr-permissions:
      - ANALYTICS_BACKEND_AGGREGATES_READ
      - ANALYTICS_BACKEND_AGGREGATE_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/aggregates/visible-for-client/by/{IdentifierType}:
    post:
      tags:
      - 'Analytics: Aggregates'
      summary: Get aggregates for profile card
      description: |
        Retrieve aggregates to display on a profile's card in the Profiles module (`"isVisibleForClientProfile": true`) in the [expression config](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/addAggregatePOST)).
      operationId: analytics2-client-card-aggregates-get
      parameters:
      - $ref: '#/components/parameters/analytics-pathIdentifierType'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: '#/components/schemas/analytics-IdentifierValue'
              required:
              - identifierValue
      responses:
        '200':
          description: List of calculated aggregates configured as visible on the profile card
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/analytics-CalculatedAnalytic'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      - client_analytics_preview
      x-snr-permissions:
      - ANALYTICS_BACKEND_AGGREGATE_FOR_CLIENT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/aggregates/{AggregateIdentifier}/calculate/by/{IdentifierType}:
    post:
      tags:
      - 'Analytics: Aggregates'
      summary: Calculate aggregate for profile
      description: Calculate the result of an existing aggregate in context of a single profile.
      operationId: analytics2-aggregate-calculate
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-aggregateIdentifierAsPathParam'
      - $ref: '#/components/parameters/analytics-pathIdentifierType'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifierValue:
                  $ref: '#/components/schemas/analytics-IdentifierValue'
              required:
              - identifierValue
      responses:
        '200':
          description: Aggregate result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-AggregateResult'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_AGGREGATE_FOR_CLIENT_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/aggregates:
    get:
      tags:
      - 'Analytics: Aggregates'
      summary: List aggregates
      description: Returns a paginated list of aggregates.
      operationId: analytics2-aggregates-list
      parameters:
      - $ref: '#/components/parameters/analytics-page'
      - $ref: '#/components/parameters/analytics-limit'
      - $ref: '#/components/parameters/analytics-search'
      - $ref: '#/components/parameters/analytics-sortBy'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-directoryId'
      - $ref: '#/components/parameters/analytics-ids'
      - $ref: '#/components/parameters/analytics-AggregateType'
      responses:
        '200':
          description: List of aggregates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-AggregatePaginationContainer'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_AGGREGATES_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
    post:
      tags:
      - 'Analytics: Aggregates'
      summary: Create aggregate
      description: Create an aggregate analysis and save it to the database.
      operationId: analytics2-aggregate-create
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-AggregateRequest'
      responses:
        '201':
          description: Aggregate has been created
          content:
            application/json:
              schema:
                type: string
                description: UUID of the created aggregate
                format: uuid
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics_aggregates
      x-snr-permissions:
      - ANALYTICS_BACKEND_AGGREGATES_CREATE
      - ANALYTICS_BACKEND_AGGREGATE_CREATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/aggregates/{AggregateIdentifier}:
    get:
      tags:
      - 'Analytics: Aggregates'
      summary: Get aggregate details
      description: Retrieve all data about an aggregate definition.
      operationId: analytics2-aggregate-get
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-aggregateIdentifierAsPathParam'
      responses:
        '200':
          description: Details of the aggregate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-AggregateView'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics_aggregates
      x-snr-permissions:
      - ANALYTICS_BACKEND_AGGREGATES_READ
      - ANALYTICS_BACKEND_AGGREGATE_READ
      x-snr-scopes:
      - USER
      - PROFILE
    put:
      tags:
      - 'Analytics: Aggregates'
      summary: Update aggregate
      description: Update an aggregate.
      operationId: analytics2-aggregate-update
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-aggregateIdentifierAsPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-AggregateUpdateRequest'
      responses:
        '200':
          description: Aggregate updated
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics_aggregates
      x-snr-permissions:
      - ANALYTICS_BACKEND_AGGREGATES_UPDATE
      - ANALYTICS_BACKEND_AGGREGATE_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
    delete:
      tags:
      - 'Analytics: Aggregates'
      summary: Delete aggregate
      operationId: analytics2-aggregate-delete
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-aggregateIdentifierAsPathParam'
      responses:
        '204':
          description: Aggregate deleted
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics_aggregates
      x-snr-permissions:
      - ANALYTICS_BACKEND_AGGREGATES_DELETE
      - ANALYTICS_BACKEND_AGGREGATE_DELETE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v2/sankeys/preview:
    post:
      tags:
      - 'Analytics: Sankeys'
      summary: Preview Sankey analysis
      description: Preview the results of a Sankey analysis. This request doesn't save the analysis.
      operationId: analytics2-sankey-preview-override
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-CreateRequestSankeyAnalysis'
        required: true
      responses:
        '200':
          description: Calculation results
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/analytics-SankeyCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SANKEY_READ
  /analytics/analytics/v2/funnels/preview:
    post:
      tags:
      - 'Analytics: Funnels'
      summary: Preview funnel calculation
      description: Preview the results of a funnel. This request doesn't save the funnel.
      operationId: analytics2-funnel-preview
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-FunnelRequest'
        required: true
      responses:
        '200':
          description: Preview of the results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-FunnelCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_FUNNEL_READ
  /analytics/analytics/v2/funnels/{AnalysisId}/recalculate/override:
    post:
      tags:
      - 'Analytics: Funnels'
      summary: Recalculate funnel with parameter override
      description: Recalculate a funnel with new parameters and/or variable (dynamic key) values.
      operationId: analytics2-funnel-preview-override
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-OverrideQueryRequest'
        required: true
      responses:
        '200':
          description: Funnel results
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/analytics-FunnelCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_FUNNEL_READ
  /analytics/{Namespace}/funnels:
    get:
      tags:
      - 'Analytics: Funnels'
      summary: List funnels
      description: Returns a paginated list of funnels.
      operationId: analytics2-funnels-list
      parameters:
      - $ref: '#/components/parameters/analytics-page'
      - $ref: '#/components/parameters/analytics-limit'
      - $ref: '#/components/parameters/analytics-search'
      - $ref: '#/components/parameters/analytics-sortBy'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-directoryId'
      - $ref: '#/components/parameters/analytics-ids'
      responses:
        '200':
          description: List of funnels
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of funnels
                    items:
                      $ref: '#/components/schemas/analytics-ListAnalyticsItemCommon'
                  meta:
                    $ref: '#/components/schemas/analytics-Meta'
                required:
                - data
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_FUNNELS_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
    post:
      tags:
      - 'Analytics: Funnels'
      summary: Create a funnel
      description: Create a funnel.
      operationId: analytics2-funnels-create
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-FunnelRequest'
      responses:
        '201':
          description: Funnel created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-Id'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_FUNNELS_CREATE
      - ANALYTICS_BACKEND_FUNNEL_CREATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/funnels/{AnalysisId}:
    get:
      tags:
      - 'Analytics: Funnels'
      summary: Get funnel details
      description: Retrieve the definition of a single funnel
      operationId: analytics2-funnels-get
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '200':
          description: Details of the funnel
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-FunnelView'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_FUNNELS_READ
      - ANALYTICS_BACKEND_FUNNEL_READ
      x-snr-scopes:
      - USER
      - PROFILE
    put:
      tags:
      - 'Analytics: Funnels'
      summary: Update funnel
      description: Update a funnel definition
      operationId: analytics2-funnels-update
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-FunnelRequest'
      responses:
        '200':
          description: Funnel updated
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_FUNNELS_UPDATE
      - ANALYTICS_BACKEND_FUNNEL_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
    delete:
      tags:
      - 'Analytics: Funnels'
      summary: Delete funnel
      description: Delete a funnel.
      operationId: analytics2-funnels-delete
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '204':
          description: Funnel deleted
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_FUNNELS_DELETE
      - ANALYTICS_BACKEND_FUNNEL_DELETE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/reports:
    get:
      tags:
      - 'Analytics: Reports'
      summary: List reports
      description: Returns a paginated list of reports.
      operationId: analytics2-reports-list
      parameters:
      - $ref: '#/components/parameters/analytics-page'
      - $ref: '#/components/parameters/analytics-limit'
      - $ref: '#/components/parameters/analytics-search'
      - $ref: '#/components/parameters/analytics-sortBy'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-directoryId'
      - $ref: '#/components/parameters/analytics-ids'
      - $ref: '#/components/parameters/analytics-isMultiMetric'
      responses:
        '200':
          description: List of reports
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of reports
                    items:
                      $ref: '#/components/schemas/analytics-ReportListItem'
                  meta:
                    $ref: '#/components/schemas/analytics-Meta'
                required:
                - data
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_REPORTS_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
    post:
      tags:
      - 'Analytics: Reports'
      summary: Create report analysis
      operationId: analytics2-reports-create
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-ReportRequest'
      responses:
        '200':
          description: ID of the created report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-Id'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_REPORTS_CREATE
      - ANALYTICS_BACKEND_REPORT_CREATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/reports/{AnalysisId}:
    get:
      tags:
      - 'Analytics: Reports'
      summary: Get report analysis details
      operationId: analytics2-reports-get
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '200':
          description: Get report analysis details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-ReportView'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_REPORTS_READ
      - ANALYTICS_BACKEND_REPORT_READ
      x-snr-scopes:
      - USER
      - PROFILE
    put:
      tags:
      - 'Analytics: Reports'
      summary: Update report analysis
      operationId: analytics2-reports-update
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-ReportRequest'
      responses:
        '200':
          description: Report analysis updated
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_REPORTS_UPDATE
      - ANALYTICS_BACKEND_REPORT_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
    delete:
      tags:
      - 'Analytics: Reports'
      summary: Delete report analysis
      operationId: analytics2-reports-delete
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      responses:
        '204':
          description: Report analysis deleted
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_REPORTS_DELETE
      - ANALYTICS_BACKEND_REPORT_DELETE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/trends:
    get:
      tags:
      - 'Analytics: Trends'
      summary: List trends
      description: Returns a paginated list of trends.
      operationId: analytics2-trends-list
      parameters:
      - $ref: '#/components/parameters/analytics-page'
      - $ref: '#/components/parameters/analytics-limit'
      - $ref: '#/components/parameters/analytics-search'
      - $ref: '#/components/parameters/analytics-sortBy'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-directoryId'
      - $ref: '#/components/parameters/analytics-ids'
      responses:
        '200':
          description: List of trends
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Array of trends
                    items:
                      $ref: '#/components/schemas/analytics-ListAnalyticsItemCommon'
                  meta:
                    $ref: '#/components/schemas/analytics-Meta'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_TRENDS_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
    post:
      tags:
      - 'Analytics: Trends'
      summary: Create a trend
      description: Create a trend.
      operationId: analytics2-trend-create
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-TrendRequest'
      responses:
        '200':
          description: Trend created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-Id'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics_trends
      x-snr-permissions:
      - ANALYTICS_BACKEND_TRENDS_CREATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/trends/{AnalysisId}:
    get:
      tags:
      - 'Analytics: Trends'
      summary: Get trend details
      description: Retrieve the definition of a single trend
      operationId: analytics2-trend-get
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '200':
          description: Details of a trend
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-TrendView'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics_trends
      x-snr-permissions:
      - ANALYTICS_BACKEND_TRENDS_READ
      - ANALYTICS_BACKEND_TREND_READ
      x-snr-scopes:
      - USER
      - PROFILE
    put:
      tags:
      - 'Analytics: Trends'
      summary: Update trend
      description: Update an existing trend
      operationId: analytics2-trend-update
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-TrendRequest'
      responses:
        '200':
          description: Trend updated
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics_trends
      x-snr-permissions:
      - ANALYTICS_BACKEND_TRENDS_UPDATE
      - ANALYTICS_BACKEND_TREND_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
    delete:
      tags:
      - 'Analytics: Trends'
      summary: Delete trend
      description: Delete a trend.
      operationId: analytics2-trend-delete
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '204':
          description: Trend deleted
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics_trends
      x-snr-permissions:
      - ANALYTICS_BACKEND_TRENDS_DELETE
      - ANALYTICS_BACKEND_TREND_DELETE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v2/trends/{AnalysisId}/recalculate/override:
    post:
      tags:
      - 'Analytics: Trends'
      summary: Calculate trend with parameter override
      description: Recalculate a trend with new parameters and/or variable (dynamic key) values.
      operationId: analytics2-calculate-trend-with-override
      parameters:
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-OverrideQueryRequest'
      responses:
        '200':
          description: Trend calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-TrendSignedCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_TREND_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/analytics/v2/trends/preview:
    post:
      tags:
      - 'Analytics: Trends'
      summary: Preview trend calculation
      operationId: analytics2-preview-trend
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                analysis:
                  $ref: '#/components/schemas/analytics-TrendAnalysisRequest'
                inlineAnalytics:
                  $ref: '#/components/schemas/analytics-InlineAnalytics'
              required:
              - analysis
      responses:
        '200':
          description: Calculation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-TrendSignedCalculationResponse'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_TREND_READ
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/sankeys:
    get:
      tags:
      - 'Analytics: Sankeys'
      summary: List Sankeys
      description: Returns a paginated list of Sankey analyses.
      operationId: analytics2-sankeys-list
      parameters:
      - $ref: '#/components/parameters/analytics-page'
      - $ref: '#/components/parameters/analytics-limit'
      - $ref: '#/components/parameters/analytics-search'
      - $ref: '#/components/parameters/analytics-sortBy'
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-directoryId'
      - $ref: '#/components/parameters/analytics-ids'
      responses:
        '200':
          description: List of sankeys
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of sankeys
                    items:
                      $ref: '#/components/schemas/analytics-ListAnalyticsItemCommon'
                  meta:
                    $ref: '#/components/schemas/analytics-Meta'
                required:
                - data
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SANKEYS_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
    post:
      tags:
      - 'Analytics: Sankeys'
      summary: Create Sankey analysis
      description: Create sankey analysis
      operationId: analytics2-sankeys-create
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-CreateRequestSankeyAnalysis'
      responses:
        '200':
          description: ID of the created analysis
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-Id'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SANKEYS_CREATE
      - ANALYTICS_BACKEND_SANKEY_CREATE
      x-snr-scopes:
      - USER
      - PROFILE
  /analytics/{Namespace}/sankeys/{AnalysisId}:
    get:
      tags:
      - 'Analytics: Sankeys'
      summary: Get Sankey details
      description: Retrieve the details of a Sankey analysis
      operationId: analytics2-sankeys-get
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '200':
          description: Sankey analysis details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-SankeyView'
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SANKEYS_LIST_READ
      x-snr-scopes:
      - USER
      - PROFILE
    put:
      tags:
      - 'Analytics: Sankeys'
      summary: Update Sankey
      description: Update an existing Sankey analysis
      operationId: analytics2-sankeys-update
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/analytics-CreateRequestSankeyAnalysis'
      responses:
        '200':
          description: Analysis updated
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SANKEYS_UPDATE
      - ANALYTICS_BACKEND_SANKEY_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
    delete:
      tags:
      - 'Analytics: Sankeys'
      summary: Delete Sankey
      description: Delete a Sankey analysis
      operationId: analytics2-sankeys-delete
      parameters:
      - $ref: '#/components/parameters/analytics-pathNamespace'
      - $ref: '#/components/parameters/analytics-AnalyticIdPathParam'
      responses:
        '204':
          description: Deleted sankeys analysis
        4XX:
          $ref: '#/components/responses/analytics-genericError'
        5XX:
          $ref: '#/components/responses/analytics-genericError'
      security:
      - JWT: []
      x-snr-groups:
      - analytics
      x-snr-permissions:
      - ANALYTICS_BACKEND_SANKEYS_DELETE
      - ANALYTICS_BACKEND_SANKEY_DELETE
      x-snr-scopes:
      - USER
      - PROFILE
  /v4/transactions:
    post:
      x-snr-scopes:
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - API_TRANSACTION_CREATE
      summary: Create a transaction
      description: |
        Create a transaction record in the database.

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

        All monetary values must use the same currency and be greater
        than or equal to zero. `discountAmount` must be greater than zero
        or omitted.
      operationId: CreateATransaction
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-CreateatransactionRequest-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                timestamp: '2020-10-28T12:14:45.364+00:00'
                status: 400
                error: Bad Request
                message: |-
                  JSON parse error: Missing property: 'currency'; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Missing property: 'currency'
                   at [Source: (PushbackInputStream); line: 13, column: 14] (through reference chain: com.synerise.api.endpoint.transactions.domain.model.IdentifiedTransactionData["products"]->java.util.ArrayList[0]->com.synerise.api.endpoint.transactions.domain.model.ProductData["finalUnitPrice"])
                path: /transactions
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
        '404':
          $ref: '#/components/responses/api-service-404-pii'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/transactions/batch:
    post:
      x-snr-scopes:
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - API_BATCH_TRANSACTION_CREATE
      summary: Batch add or update transactions
      description: "Enqueue a number of add/update operations in the Synerise\napplication database. \n\nFor each transaction, a `transaction.charge` event is generated automatically. In addition, each item in the `products` array produces a `product.buy` event.\n\nIf you don't have some information about a transaction, don't insert a null-value parameter - omit the parameter entirely. Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).\n\n\n\nThe body contains an array of objects to update. The objects are\nthe same as in the *Update transaction* and *Create transaction*\nendpoints.\n\n\n\nAll monetary values must use the same currency and be greater\nthan or equal to zero. `discountAmount` must be greater than zero\nor omitted.\n"
      operationId: BatchAddOrUpdateTransactions
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: An array of transactions to post or update
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/api-service-CreateatransactionRequest-apiv4'
              description: ''
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                error: Bad Request
                status: 400
                timestamp: '2020-10-28T12:24:24.444Z'
                path: /transactions
                message: Some fields did not pass validation
                errors:
                - code: 14191
                  field: client
                  message: Client cannot have null value
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/clients:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_management
      x-snr-permissions:
      - API_CLIENT_CREATE
      summary: Create or update a Profile
      description: |
        Create a new profile in the Synerise application database or update an existing one. If you don't have some information about the profile, don't insert a null-value parameter - omit the parameter entirely.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).
      operationId: CreateAClientInCrm
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        $ref: '#/components/requestBodies/api-service-CreateClient-apiv4'
        required: true
      responses:
        '202':
          description: Accepted, queued for processing
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                error: Bad Request
                status: 400
                timestamp: '2019-03-18T13:15:39.84Z'
                path: /clients
                message: Some fields did not pass validation
                errors:
                - code: 12082
                  field: countryCode
                  message: Country Code must have 0 or 3 characters as per ISO format.
                  rejectedValue: string
                - code: 120
                  field: avatarUrl
                  message: '120'
                  rejectedValue: string
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
  /v4/clients/merge/from/custom-ids/{sourceCustomIDs}/to/custom-id/{targetCustomID}:
    post:
      x-snr-scopes:
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - API_MERGEBYCUSTOMID_CLIENT_UPDATE
      summary: Merge profiles by customId
      description: "Moves profile UUIDs to a single profile (which must already exist) and removes the profiles that were merged.  \n\nThe event history of the source profiles is moved to the target profile.\n\nThe attributes (data from the `attributes` object) that don't exist in the target profile are copied to the target profile. If an attribute already exists in the target profile, the value from the source profile is lost.\n\nThe properties and tags of the source profiles are lost, even if they don't have a value in the target profile.\n\n <p style='color:red'><strong>WARNING:</strong> This operation is irreversible. Use it carefully.</p>\n <p style='color:red'><strong>WARNING:</strong> You should not try to merge more than 10-20 profiles at once.</p>\n\n For more details, see the [Developer Guide](https://hub.synerise.com/developers/api/clients/profiles/merging-profiles/).\n"
      operationId: MergeClientsByCustomId
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientCustomIds-apiv4'
      - $ref: '#/components/parameters/api-service-pathTargetCustomId-apiv4'
      - $ref: '#/components/parameters/api-service-acceptHeader-apiv4'
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      responses:
        '200':
          description: Request completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-inResponseClientDetails-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          description: Source and/or target profile(s) not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
  /v4/clients/merge/from/ids/{fromClientIds}/to/id/{toClientId}:
    post:
      x-snr-scopes:
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - API_MERGE_BY_ID_CLIENT_UPDATE
      summary: Merge profiles by clientId
      description: "Moves profile UUIDs to a single profile (which must already exist) and removes the profiles that were merged.  \n\nThe event history of the source profiles is moved to the target profile.\n\nThe attributes (data from the `attributes` object) that don't exist in the target profile are copied to the target profile. If an attribute already exists in the target profile, the value from the source profile is lost.\n\nThe properties and tags of the source profiles are lost, even if they don't have a value in the target profile.\n\n <p style='color:red'><strong>WARNING:</strong> This operation is irreversible. Use it carefully.</p>\n <p style='color:red'><strong>WARNING:</strong> You should not try to merge more than 10-20 profiles at once.</p>\n\n For more details, see the [Developer Guide](https://hub.synerise.com/developers/api/clients/profiles/merging-profiles/).\n"
      operationId: MergeClientsByClientId
      parameters:
      - $ref: '#/components/parameters/api-service-pathFromClientIds-apiv4'
      - $ref: '#/components/parameters/api-service-pathToClientId-apiv4'
      - $ref: '#/components/parameters/api-service-acceptHeader-apiv4'
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      responses:
        '200':
          description: Request completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-inResponseClientDetails-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          description: Source and/or target profile(s) not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
  /v4/clients/batch:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_management
      x-snr-permissions:
      - API_BATCH_CLIENT_CREATE
      summary: Batch add or update profiles
      description: |2-
         Enqueue a number of add/update operations in the Synerise application database. <br/><br/>If you don't have some information about a profile, don't insert a null-value parameter - omit the parameter entirely. Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).


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

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

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


                      If a profile does not exist and `clientId` is the only provided identifier, the operation returns HTTP 202 and **a profile is not created**. If another identifier is provided, a profile is created with that identifier and a `clientId` generated by the system.
                allOf:
                - $ref: '#/components/schemas/api-service-CreateClientRequestBody-apiv4'
        required: true
      responses:
        '202':
          description: 'Request accepted. IMPORTANT: this does not mean that all profiles were created/updated successfully. The data is sent for further processing in other elements of the infrastructure.'
        '207':
          description: Invalid data in some entries. Correct entries are sent for further processing, the invalid ones are rejected.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/api-service-Error-apiv4'
              example:
              - rejectedValue: de73b3490c4-bb8c0d8
                field: list[0].uuid
                status: 400
                message: UUID must be well-formed value as per RFC 4122
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
  /v4/clients/tags:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_tags
      x-snr-permissions:
      - API_TAGS_CLIENT_READ
      summary: Get all tags
      description: |2-

        Retrieve all tags that can be assigned to profiles.

        This endpoint is available from version 4.1.0
      operationId: GetAllTags
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      responses:
        '200':
          description: A list of tags
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/api-service-Tag-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Tags
  /v4/clients/{clientId}:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_BY_ID_CLIENT_READ
      summary: Get profile data
      description: Retrieve profile data by profile ID. If PII protection is enabled and your API key/user doesn't have the required permissions, this endpoint can only return test profiles; other profiles return error 404.
      operationId: GetClientData
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientId-apiv4'
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      responses:
        '200':
          description: Details of a single profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-inResponseClientDetails-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          $ref: '#/components/responses/api-service-404-pii'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_BY_ID_CLIENT_UPDATE
      summary: Update a profile (identify by ID)
      description: |-
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).

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

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

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).
      operationId: UpdateAClient
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientId-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-CreateClientRequestBody-apiv4'
        required: true
      responses:
        '202':
          description: Accepted, queued for processing
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                error: Bad Request
                status: 400
                timestamp: '2019-03-21T08:37:34.526Z'
                path: /clients/1234
                message: Some fields did not pass validation
                errors:
                - code: 12053
                  field: uuid
                  message: UUID must be well-formed value as per RFC 4122
                  rejectedValue: '4321'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                timestamp: '2018-06-07T09:48:56.522+00:00'
                status: 404
                error: Not Found
                message: Client 525446575 not found
                path: /clients/525446575
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
    delete:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_BY_ID_CLIENT_DELETE
      summary: Delete a profile
      description: Delete a profile from the database.
      operationId: DeleteAClient
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientId-apiv4'
      - $ref: '#/components/parameters/api-service-acceptHeader-apiv4'
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      responses:
        '202':
          description: Accepted
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                timestamp: '2018-06-07T09:48:56.522+00:00'
                status: 404
                error: Not Found
                message: Client 525446575 not found
                path: /clients/525446575
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
  /v4/clients/by-email/{clientEmail}:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_BY_EMAIL_CLIENT_UPDATE
      summary: Update a profile (identify by email)
      description: |-
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).

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

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

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).
      operationId: UpdateAClientByEmail
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientEmail-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-CreateClientRequestBody-apiv4'
        required: true
      responses:
        '202':
          description: Accepted, queued for processing
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                error: Bad Request
                status: 400
                timestamp: '2019-03-21T08:37:34.526Z'
                path: /clients/by-email/client@synerise.com
                message: Some fields did not pass validation
                errors:
                - code: 12053
                  field: uuid
                  message: UUID must be well-formed value as per RFC 4122
                  rejectedValue: '4321'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                timestamp: '2018-06-07T09:48:56.522+00:00'
                status: 404
                error: Not Found
                message: 'No client record found for email: client@synerise.com'
                path: /clients/by-email/client@synerise.com
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
  /v4/clients/by-customid/{customId}:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_BY_CUSTOM_ID_CLIENT_UPDATE
      summary: Update a profile (identify by customId)
      description: "Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).\n \nThe `attributes` object can be used to add custom attributes of your choice. For example, `\"hasDog\":true`.\n\nThe `tags` array contains custom tags of your choice.\n\nThis is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202)."
      operationId: UpdateAClientByCustomId
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientCustomId-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-CreateClientRequestBody-apiv4'
        required: true
      responses:
        '202':
          description: Accepted, queued for processing
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                error: Bad Request
                status: 400
                timestamp: '2019-03-21T08:37:34.526Z'
                path: /clients/by-customid/customId1234
                message: Some fields did not pass validation
                errors:
                - code: 12053
                  field: uuid
                  message: UUID must be well-formed value as per RFC 4122
                  rejectedValue: '4321'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                timestamp: '2018-06-07T09:48:56.522+00:00'
                status: 404
                error: Not Found
                message: 'No client record found for customId: customId1234'
                path: /clients/by-customid/customId1234
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
  /v4/clients/by-custom-id/{customId}:
    delete:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_BY_ID_CLIENT_DELETE
      summary: Delete a profile (identify by customId)
      description: Delete a profile from the database.
      operationId: DeleteAClientByCustomId
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientCustomId-apiv4'
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      responses:
        '202':
          description: Accepted
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                timestamp: '2018-06-07T09:48:56.522+00:00'
                status: 404
                error: Not Found
                message: 'No client record found for customId: customId1234'
                path: /clients/by-customid/customId1234
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
  /v4/clients/{clientId}/linked-devices:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_DEVICE_CLIENT_UPDATE
      summary: Link a device by profile ID
      description: ' Assign a device to a profile ID. A profile may have many devices assigned.'
      operationId: LinkAClientDeviceByClientId
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientId-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4'
        required: true
      responses:
        '200':
          description: Request accepted
          headers: {}
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                error: Bad Request
                status: 400
                timestamp: '2020-10-29T12:34:02.222Z'
                path: /clients/1245757/linked-devices
                message: Some fields did not pass validation
                errors:
                - code: 12301
                  field: deviceId
                  message: '12301'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '404':
          description: Profile not found
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile devices
  /v4/clients/{identifierType}/{identifierValue}:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_BY_IDENTIFIER_CLIENT_READ
      summary: Fetch profile data
      description: ' Get the details of a single profile. If PII protection is enabled and your API key/user doesn''t have the required permissions, this endpoint can only return test profiles; other profiles return error 404.'
      operationId: FindAClient
      parameters:
      - name: identifierType
        in: path
        description: The type of profile identifier to use for the request
        required: true
        schema:
          type: string
          example: by-email
          enum:
          - by-custom-id
          - by-phone
          - by-uuid
          - by-email
      - name: identifierValue
        in: path
        description: The value of the selected identifier. The value must be URL-encoded.
        required: true
        schema:
          type: string
          example: address@domain.com
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      responses:
        '200':
          description: Details of a single profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-inResponseClientDetails-apiv4'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                path: /clients/by-custom-id/444555
                message: Api-Version header is required
                error: Bad Request
                timestamp: '2018-06-07T09:33:59.183Z'
                status: 400
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
        '404':
          $ref: '#/components/responses/api-service-404-pii'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
  /v4/clients/batch/by-phone/{phoneNumber}:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_BY_IDENTIFIER_CLIENT_READ
      summary: Batch fetch profiles by phone number
      description: ' Returns a detailed list of profiles associated with the provided phone number. The number saved in the profile must exactly match the number from the request. If no profiles match the criteria, an empty list is returned.'
      operationId: FindClientsByPhone
      parameters:
      - name: phoneNumber
        in: path
        description: |
          The phone number to search for in profiles. Must be an exact match. The value must be URL-encoded.

          **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
        required: true
        schema:
          type: string
          example: 12065550100
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      responses:
        '200':
          description: Returns an array of profile details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-inResponseClientDetailsArray-apiv4'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                path: /clients/by-phone/+12065550100/batch
                message: Api-Version header is required
                error: Bad Request
                timestamp: '2018-06-07T09:33:59.183Z'
                status: 400
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          $ref: '#/components/responses/api-service-404-pii'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile management
  /v4/clients/{identifierType}/{identifierValue}/linked-devices:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_BY_IDENTIFY_DEVICE_CLIENT_UPDATE
      summary: Link a device by other parameters
      description: ' Assign a device to a profile UUID. A profile may have many devices assigned.'
      operationId: LinkAClientDeviceByClientUuid
      parameters:
      - name: identifierType
        in: path
        required: true
        description: The profile identifier to use for the request
        schema:
          type: string
          enum:
          - by-customId
          - by-uuid
      - $ref: '#/components/parameters/api-service-pathIdentifierValue-apiv4'
      - $ref: '#/components/parameters/api-service-acceptHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4'
        required: true
      responses:
        '200':
          description: Request accepted
          headers: {}
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                error: Bad Request
                status: 400
                timestamp: '2020-10-29T12:34:02.222Z'
                path: /clients/by-uuid/779465fc-a0c5-41e5-9be2-51c00b2588b4/linked-devices
                message: Some fields did not pass validation
                errors:
                - code: 12301
                  field: deviceId
                  message: '12301'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '404':
          description: Profile not found
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile devices
  /v4/my-account/linked-devices:
    post:
      x-snr-scopes:
      - CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_PERSONAL_DEVICE_CLIENT_UPDATE
      summary: Link a device to currently logged in profile
      description: ' Assign a device to the profile that is currently logged in. A Profile may have many devices assigned.'
      operationId: LinkAClientDeviceToCurrentlyLoggedInClient
      parameters:
      - $ref: '#/components/parameters/api-service-acceptHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4'
        required: true
      responses:
        '200':
          description: Request accepted
          headers: {}
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile devices
  /v4/my-account/personal-information:
    get:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT_CONDITIONAL
      x-snr-groups: []
      x-snr-permissions:
      - API_PERSONAL_INFORMATION_CLIENT_READ
      tags:
      - Profile account management
      summary: Get Profile's own data
      description: A Profile can retrieve its details from the database.
      operationId: getAccountDataGET
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      responses:
        '200':
          description: Profile information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-inResponseClientDetails-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      security:
      - JWT: []
    post:
      x-snr-scopes:
      - CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_PERSONAL_INFORMATION_CLIENT_UPDATE
      tags:
      - Profile account management
      summary: Update Profile's own data
      description: A Profile can update its own details.
      operationId: updateAccountDataUsingPOST
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-ClientChangeset-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                error: Bad Request
                status: 400
                timestamp: '2020-10-29T13:08:16.235Z'
                path: /my-account/personal-information
                message: Some fields did not pass validation
                errors:
                - code: 120
                  field: avatarUrl
                  message: '120'
                  rejectedValue: '548869'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      security:
      - JWT: []
  /v4/my-account/phone-update/request:
    post:
      x-snr-scopes:
      - CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_PERSONAL_PHONE_CLIENT_UPDATE
      summary: Request profile phone number change
      description: A Profile can request a phone number update. The confirmation code is sent in a text message.
      operationId: RequestClientPhoneNumberChange
      parameters:
      - $ref: '#/components/parameters/api-service-acceptHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              required:
              - phone
              type: object
              properties:
                phone:
                  type: string
                  description: "Current phone number of the profile. \n\nMust match the pattern (ECMA flavor): `/(^\\+[0-9 \\-()/]{6,19}$)|(^[0-9 \\-()/]{6,20}$)/`\n"
                  example: '+48111222333'
        required: true
      responses:
        '202':
          description: Request accepted'
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile account management
  /v4/my-account/phone-update/confirmation:
    post:
      x-snr-scopes:
      - CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_PERSONAL_PHONE_CLIENT_CREATE
      summary: Confirm profile phone number change
      description: Use a code to confirm the phone number change and provide the new number.
      operationId: ConfirmClientPhoneNumberChange
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              required:
              - phone
              - confirmationCode
              type: object
              properties:
                phone:
                  type: string
                  description: |
                    New phone number

                    Must match the pattern (ECMA flavor): `/(^\+[0-9 \-()/]{6,19}$)|(^[0-9 \-()/]{6,20}$)/`

                    **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
                  example: '+48111222333'
                confirmationCode:
                  description: Confirmation code received by text message
                  type: string
                  example: 73AC1
                deviceId:
                  $ref: '#/components/schemas/api-service-inBodyClientDeviceId-apiv4'
                smsAgreement:
                  type: boolean
                  description: Permission to receive marketing information by SMS
        required: true
      responses:
        '202':
          description: Request accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Profile account management
  /v4/tags:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - client_tags
      x-snr-permissions:
      - API_TAGS_CREATE
      tags:
      - Tags
      summary: Create a tag
      description: Create a new tag that can be assigned to profiles. If you try to create a tag that already exists, the response is the existing tag.
      operationId: createTagUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-TagCreate-apiv4'
      responses:
        '200':
          description: Tag created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-TagResponse-apiv4'
        '400':
          description: Invalid or incomplete data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                error: Bad Request
                status: 400
                timestamp: '2020-10-29T11:02:25.939Z'
                path: /tags
                message: Some fields did not pass validation
                errors:
                - code: 16213
                  field: name
                  message: Scripts are not allowed
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      security:
      - JWT: []
  /v4/tags/{tagID}:
    put:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - client_tags
      x-snr-permissions:
      - API_TAGS_CREATE
      tags:
      - Tags
      summary: Update a tag
      description: |
        Update a tag. This method currently only allows modifying the `color` field.

        If the tag has been already deleted, the response is a 404 error.

        **Important**: This method doesn't update global tags (not related to any workspace). If you try to update a global tag, the response is a 404 error.
      operationId: updateTagPUT
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-TagUpdate-apiv4'
      parameters:
      - $ref: '#/components/parameters/api-service-pathTagId-apiv4'
      responses:
        '200':
          description: Tag updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-TagResponse-apiv4'
        '400':
          description: Invalid or incomplete data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          description: Tag doesn't exist or it is a global tag (not related to any workspace).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      security:
      - JWT: []
    delete:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - client_tags
      x-snr-permissions:
      - API_TAGS_CREATE
      tags:
      - Tags
      summary: Remove a tag
      description: |
        Remove a tag definition from the workspace.

        If the tag has been already deleted, the response is a 404 error.

        **Important**: This method does not remove global tag (not related to any workspace). In this case, the response is a 404 error.

        **Note**: After removing a tag definition, the tag is still cached for a while. In that time, it is still possible for a while to remove or add this tag in profiles.
      operationId: deleteTagDELETE
      parameters:
      - $ref: '#/components/parameters/api-service-pathTagId-apiv4'
      responses:
        '202':
          description: Tag removed
        '400':
          description: Invalid or incomplete data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          description: Tag doesn't exist, was already deleted, or is a global tag (not related to any workspace).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      security:
      - JWT: []
  /v4/clients/{clientId}/tags:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - client_tags
      x-snr-permissions:
      - API_TAGS_READ
      tags:
      - Tags
      summary: Get profile tags
      description: Retrieve a list of tags assigned to a profile.
      operationId: getClientTagsUsingGET
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientId-apiv4'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/api-service-Tag-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
      security:
      - JWT: []
  /v4/clients/{clientId}/tags/{tagID}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - client_tags
      x-snr-permissions:
      - API_ASSIGN_TAGS_EXECUTE
      tags:
      - Tags
      summary: Assign tag to profile
      description: Assign a tag to a profile.
      operationId: assignTagPOST
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientId-apiv4'
      - $ref: '#/components/parameters/api-service-pathTagId-apiv4'
      responses:
        '200':
          description: Tag assigned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-TagAssociation-apiv4'
        '400':
          description: Profile not found or data malformed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '404':
          description: Tag not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
    delete:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - client_tags
      x-snr-permissions:
      - API_ASSIGN_TAGS_EXECUTE
      tags:
      - Tags
      summary: Remove tag from profile
      operationId: removeClientTagDELETE
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientId-apiv4'
      - $ref: '#/components/parameters/api-service-pathTagId-apiv4'
      responses:
        '202':
          description: Tag removed
        '400':
          description: Profile not found or data malformed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '404':
          description: Tag not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
  /v4/events/by-client/{clientId}:
    get:
      deprecated: true
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - API_LISTING_BY_CLIENT_EVENTS_READ
      summary: Get Profile events as Workspace
      description: "**This endpoint is deprecated. Use [/activities-api/events/by/{identifierType}](https://developers.synerise.com/DataManagement/DataManagement.html#operation/getEventsByIdentifier) instead.**  \n\nRetrieve a list of events saved in a Profile.\n"
      operationId: GetClientEvents
      parameters:
      - $ref: '#/components/parameters/api-service-pathClientId-apiv4'
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      - $ref: '#/components/parameters/api-service-queryDateFrom-apiv4'
      - $ref: '#/components/parameters/api-service-queryDateTo-apiv4'
      - $ref: '#/components/parameters/api-service-queryAction-apiv4'
      - $ref: '#/components/parameters/api-service-queryEventsLimit-apiv4'
      responses:
        '200':
          description: A list of events
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/api-service-GetClientevents-HTTP200-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
      security:
      - JWT: []
      tags:
      - Events
  /v4/events:
    get:
      deprecated: true
      x-snr-scopes:
      - CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_LISTING_CLIENT_OWN_EVENTS_READ
      summary: Get Profile's own events
      description: "**This endpoint is deprecated. Use [/activities-api/events](https://developers.synerise.com/DataManagement/DataManagement.html#operation/getEvents) instead.**  \n\nA Profile can retrieve a list of its own events saved in the database.\n"
      operationId: GetClientOwnEvents
      parameters:
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      - $ref: '#/components/parameters/api-service-queryDateFrom-apiv4'
      - $ref: '#/components/parameters/api-service-queryDateTo-apiv4'
      - $ref: '#/components/parameters/api-service-queryAction-apiv4'
      - $ref: '#/components/parameters/api-service-queryEventsLimit-apiv4'
      responses:
        '200':
          description: A list of events
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/api-service-GetClientevents-HTTP200-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                timestamp: '2018-06-07T09:50:43.947+00:00'
                status: 500
                error: Internal Server Error
                message: Duration between time[from] and time[to] cannot be greater than 7 days
                path: /events/by-client/525446574
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/application-started:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_APPLICATION_STARTED_EVENTS_CREATE
      summary: Application started
      description: |-
        Send a 'client application started' event.

        This endpoint is available from API version 4.1.2.

        When you send an event to this endpoint, the `action` field is set to `client.applicationStarted` by the backend.
      operationId: ApplicationStarted
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-ApplicationstartedRequest-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                timestamp: '2018-06-07T09:53:56.999+00:00'
                status: 500
                error: Internal Server Error
                message: Error occurred during event publication
                path: /events/application-started
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/registered:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_REGISTERED_EVENTS_CREATE
      summary: Profile account registered
      description: |-
        Send a 'profile account registered' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.register` by the backend.
      operationId: ClientRegistered
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/logged-in:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_LOGGED_IN_EVENTS_CREATE
      summary: Profile logged in
      description: |-
        Send a 'profile logged in' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.login` by the backend.
      operationId: ClientLoggedIn
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/logged-out:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_LOGGED_OUT_EVENTS_CREATE
      summary: Profile logged out
      description: |-
        Send a 'profile logged out' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.logout` by the backend.
      operationId: ClientLoggedOut
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/added-to-cart:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_ADDED_TO_CART_EVENTS_CREATE
      summary: Item added to cart
      description: |-
        Send an 'item added to cart' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `product.addToCart` by the backend.
      operationId: ClientAddedProductToCart
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-ClientCartEventRequest-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          description: 'Bad request: input data missing or malformed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
              example:
                error: Bad Request
                status: 400
                timestamp: '2018-06-07T09:55:20.563Z'
                message: Some fields did not pass validation
                path: /events/added-to-cart
                errors:
                - path: label
                  message: cannot be empty
                  rejectedValue: ''
                - path: label
                  message: length must be between 1 and 64
                  rejectedValue: ''
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/removed-from-cart:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_REMOVED_FROM_CART_EVENTS_CREATE
      summary: Item removed from cart
      description: |-
        Send an 'item removed from cart' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `product.removeFromCart` by the backend.
      operationId: ClientRemovedProductFromCart
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-ClientCartEventRequest-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/added-to-favorites:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_ADDED_TO_FAVORITES_EVENTS_CREATE
      summary: Product added to favorites
      description: |-
        Send an 'item added to favorites' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `product.addToFavorite` by the backend.
      operationId: ClientAddedProductToFavorites
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/product-view:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_PRODUCT_VIEW_EVENTS_CREATE
      summary: Item viewed
      description: |-
        Send an 'item viewed' event.

        When you send an event to this endpoint, the `action` field is set to `product.view` by the backend.
      operationId: ClientViewedProduct
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    type: object
                    additionalProperties: true
                    description: |
                      Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                      Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                        <span style="color:red"><strong>WARNING:</strong></span>
                        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                        <code>modifiedBy</code><br>
                        <code>apiKey</code><br>
                        <code>eventUUID</code><br>
                        <code>ip</code><br>
                        <code>time</code><br>
                        <code>businessProfileId</code>
                    properties:
                      productId:
                        $ref: '#/components/schemas/api-service-ItemSku-apiv4'
                      name:
                        $ref: '#/components/schemas/api-service-ItemName-apiv4'
                      fromRecommendation:
                        $ref: '#/components/schemas/api-service-FromRecommendation-apiv4'
                      source:
                        $ref: '#/components/schemas/api-service-eventSource-apiv4'
                      category:
                        $ref: '#/components/schemas/api-service-ItemCategory-apiv4'
                      url:
                        $ref: '#/components/schemas/api-service-ItemUrlAddress-apiv4'
                      campaignHash:
                        $ref: '#/components/schemas/api-service-CampaignHash-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/assigned-to-company:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - API_ASSIGNED_TO_COMPANY_EVENTS_CREATE
      summary: Profile assigned to company
      description: |-
        Send a 'profile assigned to company' event.

        When you send an event to this endpoint, the `action` field is set to `client.assignToCompany` by the backend.
      operationId: ClientAssignedToCompany
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                required:
                - params
                properties:
                  params:
                    type: object
                    additionalProperties: true
                    description: |
                      Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                      Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                        <span style="color:red"><strong>WARNING:</strong></span>
                        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                        <code>modifiedBy</code><br>
                        <code>apiKey</code><br>
                        <code>eventUUID</code><br>
                        <code>ip</code><br>
                        <code>time</code><br>
                        <code>businessProfileId</code>
                    properties:
                      companyId:
                        type: number
                        description: Company ID
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/appeared-in-location:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_APPEARED_IN_LOCATION_EVENTS_CREATE
      summary: Profile logged location
      description: |-
        Send an event when a profile submits its location. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.location` by the backend.
      operationId: ClientAppearedInLocation
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    type: object
                    additionalProperties: true
                    description: |
                      Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                      Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                        <span style="color:red"><strong>WARNING:</strong></span>
                        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                        <code>modifiedBy</code><br>
                        <code>apiKey</code><br>
                        <code>eventUUID</code><br>
                        <code>ip</code><br>
                        <code>time</code><br>
                        <code>businessProfileId</code>
                    required:
                    - lat
                    - lon
                    properties:
                      lat:
                        type: number
                        description: Latitude
                        example: 50.021102
                      lon:
                        type: number
                        description: Longitude
                        example: 19.886218
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/push/received:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_PUSH_RECIVED_EVENTS_CREATE
      summary: Push notification received
      description: |-
        Record a 'push notification was received' event. It is used for push message interaction tracking.

        This endpoint is available from API version 4.1.2.

        When you send an event to this endpoint, the `action` field is set to `push.receiveInBackground` by the backend.
      operationId: ClientReceivedPushNotification
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/push/viewed:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_PUSH_VIEWED_EVENTS_CREATE
      summary: Push notification viewed
      description: |-
        Record a 'push notification was viewed' event. It is used for push message interaction tracking.

        When you send an event to this endpoint, the `action` field is set to `push.view` by the backend.
      operationId: ClientViewedPushNotification
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/push/clicked:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_PUSH_CLICKED_EVENTS_CREATE
      summary: Push notification clicked
      description: |-
        Send a 'Push notification was clicked' event. It's used for push message interaction tracking.

        When you send an event to this endpoint, the `action` field is set to `push.click` by the backend.
      operationId: ClientClickedPushNotification
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/push/cancelled:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_PUSH_CANCELLED_EVENTS_CREATE
      summary: Push notifications cancelled
      description: |-
        Send a 'push notifications cancelled' event. It's used for push message interaction tracking.

        When you send an event to this endpoint, the `action` field is set to `push.cancel` by the backend.
      operationId: ClientCancelledPushNotifications
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/cancelled-transaction:
    post:
      x-snr-scopes:
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - API_CANCELLED_TRANSACTION_EVENTS_CREATE
      summary: Transaction cancelled
      description: |-
        Send a 'transaction cancelled' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `transaction.cancel` by the backend.
      operationId: ClientCancelledTransaction
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    type: object
                    description: |
                      Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                      Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                        <span style="color:red"><strong>WARNING:</strong></span>
                        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                        <code>modifiedBy</code><br>
                        <code>apiKey</code><br>
                        <code>eventUUID</code><br>
                        <code>ip</code><br>
                        <code>time</code><br>
                        <code>businessProfileId</code>
                    additionalProperties: true
                    properties:
                      orderId:
                        $ref: '#/components/schemas/api-service-OrderId-apiv4'
                      orderStatus:
                        $ref: '#/components/schemas/api-service-OrderStatus-apiv4'
                      discountAmount:
                        $ref: '#/components/schemas/api-service-DiscountAmount-apiv4'
                      discountPercent:
                        $ref: '#/components/schemas/api-service-DiscountPercent-apiv4'
                      discountCode:
                        $ref: '#/components/schemas/api-service-DiscountCode-apiv4'
                      value:
                        $ref: '#/components/schemas/api-service-Value-apiv4'
                      revenue:
                        $ref: '#/components/schemas/api-service-Revenue-apiv4'
                      products:
                        $ref: '#/components/schemas/api-service-Products-apiv4'
                      source:
                        $ref: '#/components/schemas/api-service-eventSource-apiv4'
                      paymentInfo:
                        $ref: '#/components/schemas/api-service-PaymentInfo-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/hit-timer:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_HIT_TIMER_EVENTS_CREATE
      summary: Timer hit
      description: |-
        Send a 'timer' event.


        Timers are used for analytics. For example, if you send a event when a profiles starts doing something and another one when they finish, you can collect data about average activity time. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `client.hitTimer` by the backend.
      operationId: ClientHitTimer
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/searched:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_SEARCHED_EVENTS_CREATE
      summary: Search requested
      description: |-
        Send a 'search requested' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `client.search` by the backend.
      operationId: ClientSearched
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/shared:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_SHARED_EVENTS_CREATE
      summary: Content shared
      description: |-
        Send a 'content shared' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `client.shared` by the backend.
      operationId: ClientShared
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/recommendation-seen:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - TRACKER
      - LEGACY_AI_KEY
      x-snr-groups: []
      x-snr-permissions:
      - API_RECOMENDATION_SEEN_EVENTS_CREATE
      summary: Recommendation viewed
      deprecated: true
      description: |-
        This endpoint is deprecated. Use the [AI Events](https://developers.synerise.com/DataManagement/DataManagement.html#tag/AI-Events) endpoints instead.

        Send a 'recommendation was viewed' event.


        When you send an event to this endpoint, the `action` field is set to `recommendation.view` by the backend.
      operationId: RecommendationSeen
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-recommendationEventParams-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/recommendation-click:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - TRACKER
      - LEGACY_AI_KEY
      x-snr-groups: []
      x-snr-permissions:
      - API_RECOMMENDATION_CLICK_EVENTS_CREATE
      summary: Recommendation clicked
      deprecated: true
      description: |-
        Send a 'recommendation clicked' event.
        This endpoint is deprecated. Use the [AI Events](https://developers.synerise.com/DataManagement/DataManagement.html#tag/AI-Events) endpoints instead.


        When you send an event to this endpoint, the `action` field is set to `recommendation.click` by the backend.
      operationId: RecommendationClicked
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-recommendationEventParams-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/visited-screen:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_VISITED_SCREEN_EVENTS_CREATE
      summary: Mobile app screen visited
      description: |-
        Send a 'screen in a mobile app was visited' event. This can be used for mobile screen usage tracking. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `screen.view` by the backend.
      operationId: ClientVisitedScreen
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                properties:
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/custom:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - USER
      x-snr-groups:
      - client_activities
      x-snr-permissions:
      - API_CUSTOM_EVENTS_CREATE
      summary: Custom event
      description: |
        Send a custom event.

        <span style="color:red"><strong>WARNING:</strong></span> This endpoint doesn't create `product.buy` events from `transaction.charge` events! Use [Create a transaction](#operation/CreateATransaction) or [Batch add or update transactions](#operation/BatchAddOrUpdateTransactions) instead.

        If you don't have a value for a field, omit that field. Do not send null values.
      operationId: CustomEvent
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/api-service-EventBase-apiv4'
              - type: object
                required:
                - action
                properties:
                  action:
                    $ref: '#/components/schemas/api-service-EventAction-apiv4'
                  params:
                    $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/events/batch:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - API_BATCH_EVENTS_CREATE
      summary: Batch send events
      description: |
        Send a batch of events as an array of objects. You can send up to a 1000 events and the size of the request can't be more than 1 MB.

        <span style="color:red"><strong>WARNING:</strong></span> This endpoint doesn't create `product.buy` events from `transaction.charge` events! Use [Create a transaction](#operation/CreateATransaction) or [Batch add or update transactions](#operation/BatchAddOrUpdateTransactions) instead.

        If you don't have a value for a field, omit that field. Do not
        send null values.
      operationId: BatchSendEvents
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: <span style="color:red"><strong>IMPORTANT:</strong> In a request, all events must use the same type of profile identifier. For example, if you want to send some events identified by email and others by customId, you must send them in separate batches.<span>
        content:
          application/json:
            schema:
              type: array
              maxItems: 1000
              items:
                anyOf:
                - title: Custom event
                  allOf:
                  - $ref: '#/components/schemas/api-service-EventBase-apiv4'
                  - type: object
                    required:
                    - action
                    - type
                    properties:
                      type:
                        $ref: '#/components/schemas/api-service-EventType-apiv4'
                      action:
                        $ref: '#/components/schemas/api-service-EventAction-apiv4'
                      params:
                        $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
                - title: Pre-defined event
                  allOf:
                  - $ref: '#/components/schemas/api-service-EventBase-apiv4'
                  - type: object
                    required:
                    - type
                    properties:
                      type:
                        $ref: '#/components/schemas/api-service-EventType-apiv4'
                      params:
                        $ref: '#/components/schemas/api-service-DefaultParamSource-apiv4'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/server/time:
    get:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      summary: Get server time
      description: Get current server time, needed to send events with a correct timestamp.
      operationId: getServerTime
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  serverTime:
                    type: string
                    format: date-time
                    description: Current server time in ISO 8601
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-HTTP400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
      deprecated: false
      security:
      - JWT: []
      tags:
      - Events
  /v4/auth/refresh/profile:
    get:
      x-snr-scopes:
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      summary: Refresh a Workspace token
      description: Retrieve a refreshed JWT Token to prolong the Workspace session.
      operationId: RefreshABusinessProfileToken
      parameters:
      - $ref: '#/components/parameters/api-service-contentTypeHeader-apiv4'
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      responses:
        '200':
          description: New authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-JWTtoken-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
      deprecated: true
      security:
      - JWT: []
      tags:
      - Authorization (deprecated)
  /v4/auth/login/profile:
    post:
      x-snr-groups: []
      x-snr-scopes: []
      x-snr-permissions:
      - NO_TOKEN
      summary: Log in as Workspace
      description: This endpoint is deprecated. Use [this endpoint](#operation/profileLogin) instead.
      operationId: LogInAsBusinessProfile
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              required:
              - apiKey
              type: object
              properties:
                apiKey:
                  type: string
                  description: Workspace (formerly Business Profile) API key
                  example: 64c09614-1b2a-42f7-804d-f647243eb1ab
        required: true
      responses:
        '200':
          description: Workspace authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api-service-JWTtoken-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
      deprecated: true
      tags:
      - Authorization (deprecated)
  /v4/events/ai-compat/batch:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - TRACKER
      - LEGACY_AI_KEY
      security:
      - JWT: []
      - TrackerKey: []
      x-snr-groups: []
      x-snr-permissions:
      - API_BATCH_EVENTS_CREATE
      tags:
      - AI Events
      summary: Batch upload AI events
      description: Upload a batch of events to the AI engine. A request can only include events of one type.
      operationId: publishAiCompatBatchUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-AiCompatBatchEventRequest-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
  /v4/events/ai-compat/item.search.click:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - TRACKER
      - LEGACY_AI_KEY
      security:
      - JWT: []
      - TrackerKey: []
      x-snr-groups: []
      x-snr-permissions:
      - API_ITEM_SEARCH_CLICK_EVENT_CREATE
      tags:
      - AI Events
      summary: Item clicked in search
      description: Upload an item.search.click event to the AI engine.
      operationId: publishAiCompatItemSearchClickUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-ItemSearchClickEventDataCompat-apiv4'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
  /v4/events/ai-compat/suggestion.search.click:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - TRACKER
      - LEGACY_AI_KEY
      security:
      - JWT: []
      - TrackerKey: []
      x-snr-groups: []
      x-snr-permissions:
      - API_SUGGESTION_SEARCH_CLICK_EVENT_CREATE
      tags:
      - AI Events
      summary: Suggestion clicked in search
      description: Upload a suggestion.search.click event to the AI engine.
      operationId: publishAiCompatSuggestionSearchClickUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-SuggestionSearchClickEventDataCompat-apiv4'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
  /v4/events/ai-compat/product.search.click:
    post:
      deprecated: true
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - TRACKER
      - LEGACY_AI_KEY
      security:
      - JWT: []
      - TrackerKey: []
      x-snr-groups: []
      x-snr-permissions:
      - API_PRODUCT_SEARCH_CLICK_EVENT_CREATE
      tags:
      - AI Events
      summary: Product clicked in search
      description: Upload a product.search.click event to the AI engine.
      operationId: publishAiCompatProductSearchClickUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-ProductSearchClickEventDataCompat-apiv4'
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
  /v4/events/ai-compat/recommendation.click:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - TRACKER
      - LEGACY_AI_KEY
      security:
      - JWT: []
      - TrackerKey: []
      x-snr-groups: []
      x-snr-permissions:
      - API_RECOMMENDATION_CLICK_EVENT_CREATE
      tags:
      - AI Events
      summary: Item clicked in recommendation
      description: Upload a recommendation.click event to the AI engine.
      operationId: publishAiCompatRecommendationClickUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-RecommendationClickEventDataCompat-apiv4'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
  /v4/events/ai-compat/recommendation.view:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - TRACKER
      - LEGACY_AI_KEY
      security:
      - JWT: []
      - TrackerKey: []
      x-snr-groups: []
      x-snr-permissions:
      - API_RECOMMENDATION_VIEW_EVENT_CREATE
      tags:
      - AI Events
      summary: Recommendation viewed
      description: Upload a recommendation.view event to the AI engine.
      operationId: publishAiCompatRecommendationViewUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-RecommendationViewEventDataCompat-apiv4'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
  /v4/events/recommendation-view:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - TRACKER
      - LEGACY_AI_KEY
      security:
      - JWT: []
      x-snr-groups: []
      x-snr-permissions:
      - API_RECOMMENDATION_VIEW_EVENT_CREATE
      tags:
      - Events
      summary: Recommendation viewed
      description: A recommendation was displayed to a customer.
      operationId: publishRecommendationViewEventUsingPOST
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-RecommendationViewEventData-apiv4'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
  /v4/events/item-search-click:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      - TRACKER
      - LEGACY_AI_KEY
      security:
      - JWT: []
      x-snr-groups: []
      x-snr-permissions:
      - API_ITEM_SEARCH_CLICK_EVENT_CREATE
      tags:
      - Events
      summary: Search result clicked
      description: An item in a search result was clicked or tapped.
      operationId: publishItemSearchClickEventUsingPOST
      parameters:
      - $ref: '#/components/parameters/api-service-apiVersionHeader-apiv4'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-service-ItemSearchClickEventData-apiv4'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/api-service-400-apiv4'
        '401':
          $ref: '#/components/responses/api-service-401-apiv4'
        '403':
          $ref: '#/components/responses/api-service-403-apiv4'
        '415':
          $ref: '#/components/responses/api-service-415-apiv4'
  /automation-brain/dashboard/diagrams/count-by-trigger-type:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_LIST_READ
      security:
      - JWT: []
      tags:
      - Control Center
      summary: Count workflows by trigger type
      operationId: countDiagramsByTriggerType
      description: Returns the count of active workflows grouped by trigger node type for the current workspace.
      responses:
        '200':
          description: Workflow counts by trigger type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-DiagramCountByTriggerTypeResponse'
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/dashboard/diagrams/count-by-status:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_LIST_READ
      security:
      - JWT: []
      tags:
      - Control Center
      summary: Count workflows by status
      operationId: countDiagramsByStatus
      description: Returns the count of workflows grouped by status for the current workspace.
      responses:
        '200':
          description: Workflow counts by status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-DiagramCountByStatusResponse'
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/dashboard/diagrams/most-used:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_LIST_READ
      security:
      - JWT: []
      tags:
      - Control Center
      summary: Get most used workflows
      operationId: getMostUsedDiagrams
      description: Returns a paginated list of workflows ordered by the number of data points (events) generated by those workflows.
      parameters:
      - $ref: '#/components/parameters/automation-brain-page'
      - $ref: '#/components/parameters/automation-brain-limit'
      responses:
        '200':
          description: A page of most used workflows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-PaginatedDashboardDiagramsMostUsed'
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/dashboard/diagrams/most-triggered:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_LIST_READ
      security:
      - JWT: []
      tags:
      - Control Center
      summary: Get most triggered workflows
      operationId: getMostTriggeredDiagrams
      description: Returns a paginated list of workflows ordered by the number of triggered paths.
      parameters:
      - $ref: '#/components/parameters/automation-brain-page'
      - $ref: '#/components/parameters/automation-brain-limit'
      responses:
        '200':
          description: A page of most triggered workflows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-PaginatedDashboardDiagramsMostTriggered'
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/dashboard/diagrams/in-progress:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_LIST_READ
      security:
      - JWT: []
      tags:
      - Control Center
      summary: Get workflows with paths in progress
      operationId: getInProgressDiagrams
      description: Returns a paginated list of workflows ordered by the number of paths currently in progress.
      parameters:
      - $ref: '#/components/parameters/automation-brain-page'
      - $ref: '#/components/parameters/automation-brain-limit'
      responses:
        '200':
          description: A page of workflows with paths in progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-PaginatedDashboardDiagramsInProgress'
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/dashboard/upcoming-status-changes:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_LIST_READ
      security:
      - JWT: []
      tags:
      - Control Center
      summary: Get upcoming status changes
      operationId: getUpcomingStatusChanges
      description: Returns a paginated list of upcoming workflow status changes (resumes, pauses, and stops).
      parameters:
      - $ref: '#/components/parameters/automation-brain-page'
      - $ref: '#/components/parameters/automation-brain-limit'
      responses:
        '200':
          description: A page of upcoming status changes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-PaginatedDashboardUpcomingStatusChanges'
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/dashboard/upcoming-triggers:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_LIST_READ
      security:
      - JWT: []
      tags:
      - Control Center
      summary: Get upcoming trigger events
      operationId: getUpcomingTriggers
      description: Returns a paginated list of upcoming trigger events for workflows with active scheduled triggers.
      parameters:
      - $ref: '#/components/parameters/automation-brain-page'
      - $ref: '#/components/parameters/automation-brain-limit'
      responses:
        '200':
          description: A page of upcoming trigger events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-PaginatedDashboardUpcomingTriggers'
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/dashboard/diagrams/with-issues:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_LIST_READ
      security:
      - JWT: []
      tags:
      - Control Center
      summary: Get workflows with issues
      operationId: getDiagramsWithIssues
      description: Returns a paginated list of workflows that have encountered failures, ordered by failure count.
      parameters:
      - $ref: '#/components/parameters/automation-brain-timePeriod'
      - name: context
        description: AutomationContext for which workflows should be returned
        in: query
        required: false
        schema:
          type: string
          enum:
          - Client
          - Business
          - Undefined
      - $ref: '#/components/parameters/automation-brain-page'
      - $ref: '#/components/parameters/automation-brain-limit'
      responses:
        '200':
          description: A page of workflows with issues
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-PaginatedDashboardDiagramsWithIssues'
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/diagrams:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_LIST_READ
      security:
      - JWT: []
      tags:
      - Workflows
      summary: Get list of workflows/diagrams
      operationId: getPaginatedDiagrams
      description: Retrieve a paginated list of workflows.
      parameters:
      - $ref: '#/components/parameters/automation-brain-page'
      - $ref: '#/components/parameters/automation-brain-limit'
      - $ref: '#/components/parameters/automation-brain-filterByStatus'
      - $ref: '#/components/parameters/automation-brain-sortDiagrams'
      - $ref: '#/components/parameters/automation-brain-sortByDiagrams'
      - $ref: '#/components/parameters/automation-brain-sortingOrder'
      - $ref: '#/components/parameters/automation-brain-search'
      - $ref: '#/components/parameters/automation-brain-directoryId'
      - $ref: '#/components/parameters/automation-brain-blockTypes'
      - $ref: '#/components/parameters/automation-brain-triggersOnEvent'
      - $ref: '#/components/parameters/automation-brain-generatesEvent'
      responses:
        '200':
          description: A page of workflows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-PaginatedDiagrams'
        '400':
          $ref: '#/components/responses/automation-brain-400'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          $ref: '#/components/responses/automation-brain-404'
  /automation-brain/v2/diagrams:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_LIST_READ
      security:
      - JWT: []
      tags:
      - Workflows
      summary: Get list of workflows
      operationId: getPaginatedDiagramsV2
      description: Retrieve a paginated list of workflows.
      parameters:
      - $ref: '#/components/parameters/automation-brain-page'
      - $ref: '#/components/parameters/automation-brain-limit50'
      - $ref: '#/components/parameters/automation-brain-filterByStatus'
      - $ref: '#/components/parameters/automation-brain-sortDiagrams'
      - $ref: '#/components/parameters/automation-brain-sortByDiagrams'
      - $ref: '#/components/parameters/automation-brain-sortingOrder'
      - $ref: '#/components/parameters/automation-brain-search'
      - $ref: '#/components/parameters/automation-brain-directoryId'
      - $ref: '#/components/parameters/automation-brain-tagIds'
      - $ref: '#/components/parameters/automation-brain-blockTypes'
      - $ref: '#/components/parameters/automation-brain-triggersOnEvent'
      - $ref: '#/components/parameters/automation-brain-generatesEvent'
      responses:
        '200':
          description: A page of workflows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-PaginatedDiagramsV2'
        '400':
          $ref: '#/components/responses/automation-brain-400'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          $ref: '#/components/responses/automation-brain-404'
  /automation-brain/diagrams/{diagramId}/run:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_EXECUTE
      security:
      - JWT: []
      tags:
      - Workflows
      summary: Run/resume workflow
      operationId: runAutomationDiagram
      description: Run a or resume workflow.
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/automation-brain-DiagramActionRequest'
      responses:
        '200':
          description: Workflow run/resumed or was already running
          content:
            text/plain:
              schema:
                type: string
                enum:
                - OK
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          $ref: '#/components/responses/automation-brain-404'
  /automation-brain/diagrams/{diagramId}/pause:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_EXECUTE
      security:
      - JWT: []
      tags:
      - Workflows
      summary: Pause workflow
      operationId: pauseAutomationDiagram
      description: Pause a workflow.
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/automation-brain-DiagramActionRequest'
      responses:
        '200':
          description: Diagram paused or was already paused
          content:
            text/plain:
              schema:
                type: string
                enum:
                - OK
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          $ref: '#/components/responses/automation-brain-404'
  /automation-brain/diagrams/{diagramId}/stop:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_EXECUTE
      security:
      - JWT: []
      tags:
      - Workflows
      summary: Stop workflow
      operationId: stopAutomationDiagram
      description: |
        Stop a workflow.

        <span style="color:red"><strong>WARNING:</strong> A stopped workflow can't be restarted.</span>
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      responses:
        '200':
          description: Workflow stopped or was already stopped
          content:
            text/plain:
              schema:
                type: string
                enum:
                - OK
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          $ref: '#/components/responses/automation-brain-404'
  /automation-brain/diagrams/{diagramId}/schedule:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_UPDATE
      security:
      - JWT: []
      tags:
      - Workflow schedules
      summary: Set schedule rules for workflow
      description: "Set schedule rules for a workflow. This lets you activate, pause, or stop a workflow according to a plan. \n\nAfter the schedule is set, it must be activated to take effect (see the `POST /automation-brain/diagrams/{diagramId}/schedule-on` method).  \n\n**The backend doesn't validate the logic of the schedule**. You must ensure it's well-built (rules make logical sense) and complies with the structure of the workflow (such as trigger node time rules). See [\"Workflow Scheduler > Important\" in the Synerise Hub](https://hub.synerise.com/docs/automation/workflow-scheduler#important).\n\nThe contents of this request overwrite an existing schedule.\n"
      operationId: setDiagramSchedule
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/automation-brain-DiagramScheduleRequest'
        required: true
      responses:
        '200':
          description: Schedule saved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-DiagramSchedule'
        '400':
          $ref: '#/components/responses/automation-brain-SimpleError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          $ref: '#/components/responses/automation-brain-404'
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ
      security:
      - JWT: []
      tags:
      - Workflow schedules
      summary: Get workflow schedule
      operationId: getDiagramSchedule
      description: |
        Get all schedule rules of a workflow.
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      responses:
        '200':
          description: Schedule rules
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-DiagramSchedule'
        '400':
          $ref: '#/components/responses/automation-brain-SimpleError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          $ref: '#/components/responses/automation-brain-404'
  /automation-brain/diagrams/{diagramId}/schedule-on:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_EXECUTE
      security:
      - JWT: []
      tags:
      - Workflow schedules
      summary: Enable schedule for workflow
      operationId: scheduleOnAutomationDiagram
      description: Enable schedule for a workflow. The schedule must first be set with `POST /automation-brain/diagrams/{diagramId}/schedule`
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      responses:
        '200':
          description: Workflow scheduled or was already scheduled
          content:
            text/plain:
              schema:
                type: string
                enum:
                - OK
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          $ref: '#/components/responses/automation-brain-404'
  /automation-brain/diagrams/{diagramId}/schedule-off:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_EXECUTE
      security:
      - JWT: []
      tags:
      - Workflow schedules
      summary: Disable schedule for workflow
      operationId: scheduleOffAutomationDiagram
      description: Disable schedule for a workflow.
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      responses:
        '200':
          description: Workflow unscheduled or was already unscheduled
          content:
            text/plain:
              schema:
                type: string
                enum:
                - OK
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '401':
          $ref: '#/components/responses/automation-brain-401'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          $ref: '#/components/responses/automation-brain-404'
  /automation-brain/diagrams/{diagramId}/schedule-executed-events:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ
      security:
      - JWT: []
      tags:
      - Workflow schedules
      summary: Get schedule execution events
      operationId: getDiagramScheduleExecutedEvents
      description: |
        Get events (rule executions) that were already processed for the workflow. You can limit the list to a time range defined by `start` and `end`.
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      - name: start
        in: query
        required: true
        description: Start date
        schema:
          type: string
          format: date-time
      - $ref: '#/components/parameters/automation-brain-ScheduleEventFilterEnd'
      responses:
        '200':
          description: Executed schedule events
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasMore:
                    $ref: '#/components/schemas/automation-brain-HasMore'
                  events:
                    type: array
                    description: Executed schedule rules
                    items:
                      $ref: '#/components/schemas/automation-brain-ExecutedDiagramScheduleEvent'
                required:
                - hasMore
                - events
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/diagrams/{diagramId}/schedule-upcoming-events:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ
      security:
      - JWT: []
      tags:
      - Workflow schedules
      summary: Get upcoming schedule events
      operationId: getDiagramSchedulePendingEvents
      description: |
        Get a list of upcoming events (rule executions) caused by a schedule. You can limit the list to a time range defined by `start` and `end`.
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      - $ref: '#/components/parameters/automation-brain-ScheduleEventFilterStart'
      - $ref: '#/components/parameters/automation-brain-ScheduleEventFilterEnd'
      responses:
        '200':
          description: Upcoming schedule events
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasMore:
                    $ref: '#/components/schemas/automation-brain-HasMore'
                  events:
                    type: array
                    description: Upcoming schedule rule executions
                    items:
                      $ref: '#/components/schemas/automation-brain-UpcomingDiagramScheduleEvent'
                required:
                - hasMore
                - events
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/diagrams/{diagramId}/upcoming-status-changes:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ
      security:
      - JWT: []
      tags:
      - Workflow schedules
      summary: Get upcoming workflow status changes
      operationId: getDiagramUpcomingStatusChanges
      description: |
        Get upcoming status changes for a workflow. You can limit the list to a time range defined by `start` and `end`.
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      - name: initialStatus
        in: query
        description: 'Initial status used if diagramId is not present (default: Pending)'
        schema:
          type: string
      - $ref: '#/components/parameters/automation-brain-ScheduleEventFilterStart'
      - $ref: '#/components/parameters/automation-brain-ScheduleEventFilterEnd'
      responses:
        '200':
          description: Upcoming status changes
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasMore:
                    $ref: '#/components/schemas/automation-brain-HasMore'
                  events:
                    type: array
                    description: Upcoming status changes of the workflow
                    items:
                      $ref: '#/components/schemas/automation-brain-UpcomingDiagramStatusChange'
                required:
                - hasMore
                - events
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '403':
          $ref: '#/components/responses/automation-brain-403'
  /automation-brain/diagrams/{diagramId}/statistics:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATION_STATS_READ
      security:
      - JWT: []
      tags:
      - Workflows
      summary: Get workflow statistics with node details
      operationId: getDiagramStatistics
      description: Retrieve workflow execution statistics, including node statistics and metadata (name, type).
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      - name: timePeriod
        in: query
        description: Time period for the statistics
        required: false
        schema:
          type: string
          enum:
          - currentHour
          - currentDay
          - previousHour
          - previousDay
      responses:
        '200':
          description: Diagram statistics with node info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-ExternalDiagramStatsWithInfo'
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          description: Diagram not found
  /automation-brain/diagrams/{diagramId}/blocks/{blockId}/statistics:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - AUTOMATION_STATS_READ
      security:
      - JWT: []
      tags:
      - Workflows
      summary: Get node statistics
      operationId: getBlockStatistics
      description: Retrieve execution statistics for a single block enriched with block metadata (name, type).
      parameters:
      - $ref: '#/components/parameters/automation-brain-diagramId'
      - name: blockId
        in: path
        description: UUID of the node
        required: true
        schema:
          type: string
      - name: timePeriod
        in: query
        description: Time period for statistics
        required: false
        schema:
          type: string
          enum:
          - currentHour
          - currentDay
          - previousHour
          - previousDay
      responses:
        '200':
          description: Block statistics with block info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation-brain-ExternalBlockStatsWithInfo'
        '400':
          $ref: '#/components/responses/automation-brain-genericError'
        '403':
          $ref: '#/components/responses/automation-brain-403'
        '404':
          description: Diagram or block not found
  /boxes-v2/schemas:
    post:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_SCHEMA_CREATE
      operationId: createSchema
      summary: Create schema
      description: Create a new schema.
      security:
      - JWT: []
      tags:
      - Schema Builder
      requestBody:
        description: Structure of the schema
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/boxes-v2-SchemaInput'
      responses:
        '200':
          description: Created schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-Schema'
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_SCHEMA_READ
      operationId: getAllSchemas
      summary: Get all schemas
      description: Retrieve a paginated list of schemas from the current Workspace.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-PaginationLimit'
      - $ref: '#/components/parameters/boxes-v2-PaginationPage'
      - $ref: '#/components/parameters/boxes-v2-NameFilter'
      responses:
        '200':
          description: A list of schemas
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-PaginatedSchema'
  /boxes-v2/schemas/{schemaId}:
    put:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_SCHEMA_UPDATE
      operationId: updateSchema
      summary: Update schema
      description: Update an existing schema.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      requestBody:
        description: Structure of the schema
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/boxes-v2-SchemaInput'
      responses:
        '200':
          description: Updated schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-Schema'
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_SCHEMA_READ
      operationId: getSchema
      summary: Get schema
      description: Retrieve the details of a single schema.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      responses:
        '200':
          description: Details of the schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-Schema'
    delete:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_SCHEMA_DELETE
      operationId: deleteSchema
      summary: Delete schema
      description: Delete a schema. This operation is irreversible.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      responses:
        '204':
          description: Schema deleted
  /boxes-v2/schemas/projections:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_SCHEMA_READ
      operationId: getAllSchemasProjections
      summary: Get all schema projections
      description: Retrieve a paginated list of schema projections (simplified data of schemas) from the current Workspace.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-PaginationLimit'
      - $ref: '#/components/parameters/boxes-v2-PaginationPage'
      - $ref: '#/components/parameters/boxes-v2-NameFilter'
      responses:
        '200':
          description: A list of schemas projections
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-PaginatedSchemaProjection'
  /boxes-v2/predefined-schemas:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_PREDEFINED_SCHEMA_READ
      operationId: getAllPredefinedSchemas
      summary: Get all predefined schemas
      description: Retrieve a paginated list of predefined schemas.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-PaginationLimit'
      - $ref: '#/components/parameters/boxes-v2-PaginationPage'
      responses:
        '200':
          description: A list of predefined schemas
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-PaginatedSchema'
  /boxes-v2/predefined-schemas/{schemaId}:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_PREDEFINED_SCHEMA_READ
      operationId: getPredefinedSchema
      summary: Get predefined schema
      description: Retrieve the details of a single predefined schema.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      responses:
        '200':
          description: Details of the predefined schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-Schema'
  /boxes-v2/records/{schemaId}:
    post:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_RECORD_CREATE
      operationId: createRecord
      summary: Create record
      description: Create a new record. A record creates a database entry according to a schema.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      requestBody:
        description: The record to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/boxes-v2-RecordInput'
      responses:
        '200':
          description: Created record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-Record'
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_RECORD_READ
      operationId: getAllRecords
      summary: Get all records
      description: Retrieve all records from the schema.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      - $ref: '#/components/parameters/boxes-v2-PaginationLimit'
      - $ref: '#/components/parameters/boxes-v2-PaginationPage'
      responses:
        '200':
          description: Fetched records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-PaginatedRecord'
  /boxes-v2/records/{schemaId}/{recordId}:
    put:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_RECORD_UPDATE
      operationId: updateRecord
      summary: Update record
      description: Update a record.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      - $ref: '#/components/parameters/boxes-v2-RecordId'
      requestBody:
        description: Record to update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/boxes-v2-RecordInput'
      responses:
        '200':
          description: Updated record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-Record'
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_RECORD_READ
      operationId: getRecord
      summary: Get record
      description: Retrieve the details of a single record.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      - $ref: '#/components/parameters/boxes-v2-RecordId'
      responses:
        '200':
          description: Fetched record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-Record'
    delete:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_RECORD_DELETE
      operationId: deleteRecord
      summary: Delete record
      description: Delete a record. This operation is irreversible.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      - $ref: '#/components/parameters/boxes-v2-RecordId'
      responses:
        '204':
          description: Record deleted
  /boxes-v2/records/{schemaId}/{recordId}/relative:
    put:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_RECORD_RELATIVE_UPDATE
      operationId: relativeUpdateOfRecord
      summary: Relative update of record
      description: Relative update allows you to easily change the value in a record without updating the entire record. Currently, only numeric values can be changed.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      - $ref: '#/components/parameters/boxes-v2-RecordId'
      requestBody:
        description: Record to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/boxes-v2-RelativeUpdateInput'
      responses:
        '200':
          description: Updated record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-Record'
  /boxes-v2/documentation:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_DOCUMENTATION_READ
      operationId: getDocumentationList
      summary: Get documentation list
      description: Get a list of paths to schemas documentations.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-PaginationLimit'
      - $ref: '#/components/parameters/boxes-v2-PaginationPage'
      responses:
        '200':
          description: Fetched records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/boxes-v2-PaginatedDocumentation'
  /boxes-v2/documentation/{schemaId}:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_schema_builder
      x-snr-permissions:
      - BOXES_DOCUMENTATION_READ
      operationId: getDocumentation
      summary: Get schema documentation
      description: Retrieve an [OpenAPIv3](https://github.com/OAI/OpenAPI-Specification/tree/master/versions) file with documentation for a single schema.
      security:
      - JWT: []
      tags:
      - Schema Builder
      parameters:
      - $ref: '#/components/parameters/boxes-v2-SchemaId'
      responses:
        '200':
          description: Documentation for the schema (OpenAPIv3)
          content:
            text/plain: {}
  /brickworks/v1/schemas:
    get:
      tags:
      - 'Brickworks: Schemas'
      summary: Get schemas
      description: Retrieve a list of schemas. You can paginate the results, filter by schema type, and search for a phrase in schema names.
      operationId: getSchemas
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-queryLimit'
      - $ref: '#/components/parameters/brickworks-service-queryPage'
      - $ref: '#/components/parameters/brickworks-service-querySearch'
      - $ref: '#/components/parameters/brickworks-service-querySortBy'
      - $ref: '#/components/parameters/brickworks-service-querySchemaTypes'
      responses:
        '200':
          description: Schema objects
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-SchemaPagingResult'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_SCHEMAS_READ
    post:
      tags:
      - 'Brickworks: Schemas'
      summary: Create schema
      description: Create a new schema
      operationId: createSchema
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-CreateSchemaRequest'
      responses:
        '200':
          description: Details of the created schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-Schema'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_SCHEMAS_CREATE
  /brickworks/v1/schemas/{SchemaIdentifier}:
    get:
      tags:
      - 'Brickworks: Schemas'
      summary: Get schema
      description: Retrieve the details of a schema.
      operationId: getSchemaById
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      responses:
        '200':
          description: Details of the schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-Schema'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_SCHEMAS_READ
    put:
      tags:
      - 'Brickworks: Schemas'
      summary: Update schema
      description: Update a schema.
      operationId: updateSchema
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      requestBody:
        description: Schema properties to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-UpdateSchemaRequest'
      responses:
        '200':
          description: Schema updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-Schema'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_SCHEMAS_UPDATE
    delete:
      tags:
      - 'Brickworks: Schemas'
      summary: Delete schema
      description: Delete a schema.
      operationId: deleteSchema
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      responses:
        '204':
          description: Schema deleted
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_SCHEMAS_DELETE
  /brickworks/v1/schemas/{SchemaIdentifier}/records:
    get:
      tags:
      - 'Brickworks: Records'
      summary: Get records from schema
      description: Retrieve records from a schema. You can paginate, sort, and refine the results. By default, the records are sorted by status (published > scheduled > draft > unpublished) and then by last update time.
      operationId: getRecordsFromSchema
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      - $ref: '#/components/parameters/brickworks-service-queryLimit'
      - $ref: '#/components/parameters/brickworks-service-queryPage'
      - $ref: '#/components/parameters/brickworks-service-queryRecordFilters'
      - $ref: '#/components/parameters/brickworks-service-querySearchRecords'
      - $ref: '#/components/parameters/brickworks-service-querySortByRecords'
      - $ref: '#/components/parameters/brickworks-service-queryIds'
      - $ref: '#/components/parameters/brickworks-service-queryStatuses'
      - $ref: '#/components/parameters/brickworks-service-querySlugs'
      - $ref: '#/components/parameters/brickworks-service-queryFields'
      responses:
        '200':
          description: A page of records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-RecordPagingResult'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_READ
    post:
      tags:
      - 'Brickworks: Records'
      summary: Add record to schema
      description: Add a record to a schema
      operationId: addRecordToSchema
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      requestBody:
        description: Add record to schema
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-AddRecordToSchemaRequest'
      responses:
        '200':
          description: Record data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-Record'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_CREATE
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}:
    get:
      tags:
      - 'Brickworks: Records'
      summary: Get record
      description: |
        Retrieve a record. You can select the fields that you want to include in the response.

        If the record has multiple versions in different publishing states, the first available version is returned according to publishing status priority:
          - PUBLISHED
          - DRAFT
          - SCHEDULED
          - UNPUBLISHED
        You can use the `statuses` parameter to limit the lookup.
      operationId: getRecord
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      - $ref: '#/components/parameters/brickworks-service-pathRecordIdentifier'
      - $ref: '#/components/parameters/brickworks-service-queryFields'
      - $ref: '#/components/parameters/brickworks-service-queryStatuses'
      responses:
        '200':
          description: Details of the record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-Record'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_READ
    put:
      tags:
      - 'Brickworks: Records'
      summary: Update record
      description: |
        Update a record.

        In a versioned schema, you can't directly edit a published record. To make changes, update the status to DRAFT (you can include the other changes that you want to make). This creates a new version of the record (without modifying the currently published version), which you can edit and publish.
      operationId: updateRecord
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-UpdateRecordRequest'
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      - $ref: '#/components/parameters/brickworks-service-pathRecordIdentifier'
      responses:
        '200':
          description: Details of the updated record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-Record'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_UPDATE
    delete:
      tags:
      - 'Brickworks: Records'
      summary: Delete record
      description: Delete a record **permanently**. If you want to unpublish a record instead, send an update request to change the status to `UNPUBLISHED`
      operationId: deleteRecord
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      - $ref: '#/components/parameters/brickworks-service-pathRecordIdentifier'
      responses:
        '204':
          description: Record deleted
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_DELETE
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/generate/by/{IdentifierType}:
    post:
      tags:
      - 'Brickworks: Content generation'
      summary: Generate object from a record (as workspace)
      description: "Generate content from the latest **published version of a record** by processing Jinjava inserts and requests to external sources. Profile data (if needed, for example for Jinjava) is retrieved automatically from the profile declared in the request.\n\nThe system looks for values to generate in the following order:\n\n  1. Values in the `fieldContext` object (used by recommendations and relations).\n  1. Values saved in the record.\n  2. Values from the `default` object in the schema.  \n    This is available for all field types.  \n  3. Default values nested in the `properties` of a field in the schema.  \n    This is available for some complex field types.  \n\n\nThe content is always generated according to the latest version of a schema:\n  - If fields were deleted from the schema, but they still exist in the record, they are ignored.\n  - If fields were added to the schema and they don't exist in the record, their default values are added. If there are no default values, the fields are ignored.\n\nSome data is cached:\n- profile data (even if the profile is updated)\n- responses from external sources  \nFor details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).\n"
      operationId: generateObjectForProfile
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      - $ref: '#/components/parameters/brickworks-service-pathRecordIdentifier'
      - $ref: '#/components/parameters/brickworks-service-pathIdentifierType'
      requestBody:
        description: Object generation request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-GenerateRequest'
      responses:
        '200':
          $ref: '#/components/responses/brickworks-service-GeneratedObject'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_READ
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/generate:
    post:
      tags:
      - 'Brickworks: Content generation'
      summary: Generate object from a record (as any consumer)
      description: "Generate content from the latest **published version of a record** by processing Jinjava inserts and requests to external sources.  \nIf the request is authorized by a profile, the profile data is automatically retrieve for fields which need it (for example, in Jinjava inserts).\n\nThe system looks for values to generate in the following order:\n\n  1. Values in the `fieldContext` object (used by recommendations and relations).\n  1. Values saved in the record.\n  2. Values from the `default` object in the schema.  \n    This is available for all field types.  \n  3. Default values nested in the `properties` of a field in the schema.  \n    This is available for some complex field types.  \n\n\nThe content is always generated according to the latest version of a schema:\n  - If fields were deleted from the schema, but they still exist in the record, they are ignored.\n  - If fields were added to the schema and they don't exist in the record, their default values are added. If there are no default values, the fields are ignored.\n\nSome data is cached:\n- profile data (even if the profile is updated)\n- responses from external sources  \nFor details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).\n"
      operationId: generateObject
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      - $ref: '#/components/parameters/brickworks-service-pathRecordIdentifier'
      requestBody:
        description: Object generation request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-GenerateRequestWithoutIdentifier'
      responses:
        '200':
          $ref: '#/components/responses/brickworks-service-GeneratedObject'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      - PROFILE
      - USER
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_READ
  /brickworks/v1/schemas/records/preview/by/{IdentifierType}:
    post:
      tags:
      - 'Brickworks: Records'
      summary: Preview object (as workspace)
      description: "Preview an object by sending field values. \n\nWhen generating a preview, fields are only generated when you send their value or they have a default value. Values saved in the record are not used in the preview.\n\nSome data is cached:\n- profile data (even if the profile is updated)\n- responses from external sources  \nFor details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).\n"
      operationId: previewObject
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathIdentifierType'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-PreviewRequest'
      responses:
        '200':
          description: Generated JSON
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-GeneratedObject'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_READ
  /brickworks/v1/schemas/records/preview:
    post:
      tags:
      - 'Brickworks: Records'
      summary: Preview object (as any consumer)
      description: "Preview an object by sending field values. \n\nWhen generating a preview, fields are only generated when you send their value or they have a default value. Values saved in the record are not used in the preview.\n\nSome data is cached:\n- profile data (even if the profile is updated)\n- responses from external sources  \nFor details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).\n"
      operationId: previewObjectByProfile
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-PreviewRequestWithoutIdentifier'
      responses:
        '200':
          description: Generated JSON
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-GeneratedObject'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_READ
  /brickworks/v1/external-sources:
    post:
      tags:
      - 'Brickworks: External sources'
      summary: Create external source
      description: |
        Create an external data source definition. External sources can be used as a special schema field to retrieve data from a given URL when generating an object from a record.

        Before starting, make sure you have a [connection](https://hub.synerise.com/docs/settings/tool/connections/) which you can use in the external source definition.
      operationId: createExternalSource
      security:
      - JWT: []
      requestBody:
        description: External data source definition
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-CreateExternalSourceRequest'
      responses:
        '200':
          description: External Data Source created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-ExternalSourceModel'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_EXTERNALSOURCES_CREATE
    get:
      tags:
      - 'Brickworks: External sources'
      summary: List external sources
      description: Retrieve a list of external data sources. You can sort and paginate the results.
      operationId: listExternalSource
      parameters:
      - $ref: '#/components/parameters/brickworks-service-queryLimit'
      - $ref: '#/components/parameters/brickworks-service-queryPage'
      - $ref: '#/components/parameters/brickworks-service-querySearch'
      - in: query
        name: sortBy
        required: false
        description: |
          You can sort by:
          - `createdAt`
          - `updatedAt`
          - `name`
        schema:
          type: string
          example: createdAt:asc|desc
      - $ref: '#/components/parameters/brickworks-service-methodQueryParam'
      security:
      - JWT: []
      responses:
        '200':
          description: A page of external data sources
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-ExternalSourcePagingResult'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_EXTERNALSOURCES_READ
  /brickworks/v1/external-sources/{ExternalDataSourceId}:
    get:
      tags:
      - 'Brickworks: External sources'
      summary: Get External Source
      description: Retrieve the details of an external data source.
      operationId: getExternalSourceById
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathExternalDataSourceId'
      responses:
        '200':
          description: Details of the external source
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-ExternalSourceModel'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_EXTERNALSOURCES_READ
    put:
      tags:
      - 'Brickworks: External sources'
      summary: Update External Source
      description: Update an external data source definition.
      operationId: updateExternalSource
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathExternalDataSourceId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-UpdateExternalSourceRequest'
      responses:
        '200':
          description: External Source updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-ExternalSourceModel'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_EXTERNALSOURCES_UPDATE
    delete:
      tags:
      - 'Brickworks: External sources'
      summary: Delete external source
      description: Permanently delete an external data source definition.
      operationId: deleteExternalSource
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathExternalDataSourceId'
      responses:
        '204':
          description: No content
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_EXTERNALSOURCES_DELETE
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/duplicate:
    post:
      tags:
      - 'Brickworks: Records'
      summary: Duplicate record
      description: Create a copy of a record. The name of the copy is `{recordName} - copy`
      operationId: duplicateRecordBySchemaAppIdAndRecordId
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      - $ref: '#/components/parameters/brickworks-service-pathRecordIdentifier'
      responses:
        '200':
          description: Data of the created record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-Record'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_CREATE
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/versions:
    get:
      tags:
      - 'Brickworks: Record versions'
      summary: Get record versions
      description: Retrieve all versions of a record. You can paginate, sort, and refine the results. By default, the versions are sorted from newest to oldest.
      operationId: getRecordVersions
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      - $ref: '#/components/parameters/brickworks-service-pathRecordIdentifier'
      - $ref: '#/components/parameters/brickworks-service-queryLimit'
      - $ref: '#/components/parameters/brickworks-service-queryPage'
      - $ref: '#/components/parameters/brickworks-service-queryRecordFilters'
      - $ref: '#/components/parameters/brickworks-service-querySortBy'
      - $ref: '#/components/parameters/brickworks-service-queryStatuses'
      responses:
        '200':
          description: A page of record versions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-RecordVersionPagingResult'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_READ
  /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/versions/{RecordVersionIdentifier}:
    get:
      tags:
      - 'Brickworks: Record versions'
      summary: Get record version
      description: Retrieve the details of a record version. The version can be identified by either a UUID (RecordVersionId) or a version number (integer).
      operationId: getRecordVersion
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      - $ref: '#/components/parameters/brickworks-service-pathRecordIdentifier'
      - $ref: '#/components/parameters/brickworks-service-pathRecordVersionIdentifier'
      responses:
        '200':
          description: Record version object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/brickworks-service-RecordVersion'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_READ
  /brickworks/v1/async/schemas/{SchemaIdentifier}/records:
    post:
      tags:
      - 'Brickworks: Records'
      summary: Batch create or update records (async)
      description: "This endpoint can only be used for simple schemas.\n\n- If a record included in this request already exists, it's entirely overwritten by the content from the request (including the slug - if the slug isn't sent, it's removed).\n- Provide the current identifier value (if your request changes the identifier, provide the one from before the change).\n- The record must conform with the schema.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.\n\nIn some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.\n"
      operationId: createOrUpdateRecordBatchAsync
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      requestBody:
        description: Record data
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/brickworks-service-AsyncRecordRequest'
      responses:
        '201':
          description: Operation added to queue
        '207':
          $ref: '#/components/responses/brickworks-service-207Response'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_CREATE
    patch:
      tags:
      - 'Brickworks: Records'
      summary: Batch create or partially update record (async)
      description: "This endpoint can only be used for simple schemas.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.\n\nIn some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.\n"
      operationId: createOrPartialUpdateRecordBatchAsync
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      requestBody:
        description: Record data
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/brickworks-service-AsyncRecordRequest'
      responses:
        '201':
          description: Operation added to queue
        '207':
          $ref: '#/components/responses/brickworks-service-207Response'
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_CREATE
  /brickworks/v1/async/schemas/{SchemaIdentifier}/record:
    post:
      tags:
      - 'Brickworks: Records'
      summary: Create or update record (async)
      description: "This endpoint can only be used for simple schemas.\n\n- If a record included in this request already exists, it's entirely overwritten by the content from the request (including the slug - if the slug isn't sent, it's removed).\n- Provide the current identifier value (if your request changes the identifier, provide the one from before the change).\n- The record must conform with the schema.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.\n\nIn some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.\n"
      operationId: createOrUpdateRecordSingleAsync
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      requestBody:
        description: Record data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-AsyncRecordRequest'
      responses:
        '201':
          description: Operation added to queue
          content: {}
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_CREATE
    patch:
      tags:
      - 'Brickworks: Records'
      summary: Create or partially update record (async)
      description: "This endpoint can only be used for simple schemas.\n\n- You can use this endpoint to update a record by sending only the fields which you want to change. Other fields are not affected.\n- This endpoint doesn't validate the data against field-specific settings, such as limits on character count or regex in a string field.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.\n\nIn some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.\n"
      operationId: createOrPartialUpdateRecordSingleAsync
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/brickworks-service-pathSchemaIdentifier'
      requestBody:
        description: Record data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/brickworks-service-AsyncRecordRequest'
      responses:
        '201':
          description: Operation added to queue
        '400':
          $ref: '#/components/responses/brickworks-service-GenericBadRequestError'
        '401':
          $ref: '#/components/responses/brickworks-service-GenericUnauthorizedError'
        '403':
          $ref: '#/components/responses/brickworks-service-GenericForbiddenError'
        '404':
          $ref: '#/components/responses/brickworks-service-GenericNotFoundError'
        '409':
          $ref: '#/components/responses/brickworks-service-GenericConflictError'
        '422':
          $ref: '#/components/responses/brickworks-service-GenericUnprocessableContentError'
        '500':
          $ref: '#/components/responses/brickworks-service-GenericError'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_brickworks
      x-snr-permissions:
      - BRICKWORKS_RECORDS_CREATE
  /business-profile-service/organizations/usage/stats/newDataPoints:
    post:
      operationId: generateDailyNewDataPointsStats
      summary: Get consumption metric with new data points
      description: Retrieve the number of new events (events added to the database on a particular day), listed by day. You can limit the metric to particular workspaces and event types (actions).
      x-snr-scopes:
      - USER
      - ORGANIZATION
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      - ORGANIZATION_NEW_DATA_POINTS_USAGE_READ
      security:
      - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/business-profile-service-OrganizationDailyUsageReportRequest'
      responses:
        '200':
          description: Statistics of new events for the specified date range
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/business-profile-service-DailyUsageStats'
        4xx:
          $ref: '#/components/responses/business-profile-service-4xx-bpservice'
        '401':
          $ref: '#/components/responses/business-profile-service-401-bpservice'
        '403':
          $ref: '#/components/responses/business-profile-service-403-bpservice'
      tags:
      - Consumption
  /business-profile-service/organizations/usage/stats/retentionDataPoints:
    post:
      operationId: generateDailyRetentionDataPointsStats
      summary: Get consumption metric with retention data points
      description: "Retrieve the number of events kept in the database, listed by day. This includes events saved in the past, which currently exist in the database according to their retention period. \n\nYou can limit the metric to particular workspaces and event types (actions).\n"
      x-snr-scopes:
      - USER
      - ORGANIZATION
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      - ORGANIZATION_RETENTION_DATA_POINTS_USAGE_READ
      security:
      - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/business-profile-service-OrganizationDailyUsageReportRequest'
      responses:
        '200':
          description: Statistics of retention events for the specified date range
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/business-profile-service-RetentionUsageStats'
        4xx:
          $ref: '#/components/responses/business-profile-service-4xx-bpservice'
        '401':
          $ref: '#/components/responses/business-profile-service-401-bpservice'
        '403':
          $ref: '#/components/responses/business-profile-service-403-bpservice'
      tags:
      - Consumption
  /business-profile-service/business-profiles:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      tags:
      - Organization workspaces
      summary: Get universal list of organization workspaces
      operationId: getBusinessProfilesUniversalList
      description: Retrieve a universal list of workspaces available to the user.
      parameters:
      - $ref: '#/components/parameters/business-profile-service-listPage'
      - $ref: '#/components/parameters/business-profile-service-listLimit'
      - name: favorite
        in: query
        required: false
        schema:
          type: boolean
      - $ref: '#/components/parameters/business-profile-service-listSearch'
      - name: sortBy
        in: query
        schema:
          type: string
          default: CREATED:ASC
          enum:
          - ID:ASC
          - ID:DESC
          - NAME:ASC
          - NAME:DESC
          - CREATED:ASC
          - CREATED:DESC
          - FAVORITE:ASC
          - FAVORITE:DESC
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/business-profile-service-UniversalListBusinessProfilesResponse'
  /business-profile-service/organizations/workspaces:
    get:
      summary: Get all workspaces from organization
      description: Retrieve a list of all workspaces in an organization.
      x-snr-scopes:
      - USER
      - ORGANIZATION
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      - ORGANIZATION_WORKSPACE_READ
      tags:
      - Organization workspaces
      operationId: getWorkspacesOfOrganization
      responses:
        '200':
          description: List of workspaces
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/business-profile-service-OrganizationWorkspacesResponse'
  /business-profile-service/organizations/business-profiles:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      tags:
      - Settings
      summary: Get universal list of organization workspaces
      operationId: getBusinessProfilesForOrganizationUserUniversalList
      description: Retrieve a list of worspaces in the organization in context of the current user.
      parameters:
      - $ref: '#/components/parameters/business-profile-service-listPage'
      - $ref: '#/components/parameters/business-profile-service-listLimit'
      - name: businessProfileGroupId
        in: query
        required: false
        description: Workspace group to filter by.
        schema:
          type: string
      - name: sortBy
        in: query
        required: false
        schema:
          type: string
          default: NAME:ASC
          enum:
          - NAME:ASC
          - NAME:DESC
          - CREATED:ASC
          - CREATED:DESC
      - name: search
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/business-profile-service-UniversalListBusinessProfilesForOrganizationUserResponse'
  /business-profile-service/organizations/business-profiles/with-identifiers:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      tags:
      - Organization workspaces
      summary: Get universal list of organization workspaces with profile identifiers
      operationId: getBusinessProfilesWithIdentifiersForOrganizationUserUniversalList
      description: Retrieve a universal list of workspaces in context of the current user; with profile identifiers used in each workspace.
      parameters:
      - $ref: '#/components/parameters/business-profile-service-listPage'
      - $ref: '#/components/parameters/business-profile-service-listLimit'
      - name: businessProfileGroupId
        in: query
        required: false
        description: Workspace group to filter by.
        schema:
          type: string
      - name: sortBy
        in: query
        required: false
        schema:
          type: string
          default: NAME:ASC
          enum:
          - NAME:ASC
          - NAME:DESC
          - CREATED:ASC
          - CREATED:DESC
      - name: search
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/business-profile-service-UniversalListBusinessProfilesForOrganizationWithIdentifiersUserResponse'
  /catalogs/bags/{catalogId}/csv:
    get:
      tags:
      - Catalogs
      summary: Get all items as CSV file
      description: Download a CSV with all items in the catalog. The unique identifier of an item is saved in the `item_key` column.
      operationId: getItemsCSV
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      - $ref: '#/components/parameters/catalogs-queryDelimiter'
      responses:
        '200':
          description: CSV file. The unique identifier of an item is in the `item_key` column.
          content:
            text/csv:
              schema:
                type: string
              example: |
                item_key,color,type
                3a9d38e8,blue,sneaker
                e96b17b7,red,sneaker
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_READ
  /catalogs/bags/{catalogId}/items/upload:
    post:
      tags:
      - Catalogs
      summary: Add items from CSV
      description: Upload items to a catalog from a CSV file
      operationId: uploadItems
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                itemKey:
                  description: The name of the CSV column that contains unique identifiers. Slashes (`/`) are not allowed in the identifier values.
                  type: string
                file:
                  description: CSV file
                  type: string
                  format: binary
              required:
              - itemKey
              - file
      responses:
        '200':
          description: Upload status
          content:
            application/json:
              schema:
                type: boolean
                description: '`true` when successful'
        '400':
          $ref: '#/components/responses/catalogs-400'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_UPDATE
  /catalogs/bags:
    post:
      tags:
      - Catalogs
      summary: Add catalog
      description: Create a new, empty catalog.
      operationId: addBag
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/catalogs-addBag'
        required: true
      responses:
        '200':
          description: Details of the created catalog
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/catalogs-bag'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '400':
          $ref: '#/components/responses/catalogs-400'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_CREATE
    get:
      tags:
      - Catalogs
      summary: Get catalogs
      description: Retrieve all catalogs from the Workspace. You can filter and sort the results.
      operationId: getBags
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-queryCatalogSearchBy'
      - $ref: '#/components/parameters/catalogs-queryCatalogOrderBy'
      - $ref: '#/components/parameters/catalogs-queryOffset'
      - $ref: '#/components/parameters/catalogs-queryLimit'
      responses:
        '200':
          description: List of catalogs
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: A list of catalogs
                    items:
                      $ref: '#/components/schemas/catalogs-bag'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_READ
    delete:
      tags:
      - Catalogs
      summary: Delete catalogs
      description: ''
      operationId: deleteBagByIds
      security:
      - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
                description: Catalog ID
              example:
              - 1199
              - 1200
              - 1201
      responses:
        '200':
          description: Deletion status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: A list of catalogs and their deletion statuses
                    items:
                      $ref: '#/components/schemas/catalogs-deleteResponse'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '400':
          $ref: '#/components/responses/catalogs-400'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_DELETE
  /catalogs/bags/{catalogId}/keys:
    get:
      tags:
      - Catalogs
      summary: Get catalog keys
      description: Retrieve the list of keys from a catalog.
      operationId: getKeysByBag
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      responses:
        '200':
          description: List of keys
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: A list of keys (column names) in the catalog
                    items:
                      type: string
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
                example:
                  data:
                  - id
                  - isbn
                  - name
                  metaData:
                    totalCount: 3
                    requestTime: 0.071 [s]
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_READ
  /catalogs/bags/{catalogId}:
    get:
      tags:
      - Catalogs
      summary: Get catalog info
      description: Retrieve the metadata of a catalog
      operationId: getBagById
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      responses:
        '200':
          description: Details of the catalog
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/catalogs-bag'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_READ
    delete:
      tags:
      - Catalogs
      summary: Delete catalog
      description: Delete a single catalog. This operation is irreversible.
      operationId: deleteBagById
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      responses:
        '200':
          description: Deletion status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    description: '`true` if the catalog was deleted successfully'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_DELETE
  /catalogs/bags/{catalogId}/items:
    post:
      tags:
      - Catalogs
      summary: Add item
      description: Add a single item to the catalog.
      operationId: addItems
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/catalogs-addItem'
      responses:
        '200':
          description: Upload status
          content:
            application/json:
              schema:
                type: boolean
                description: TRUE if successful
        '400':
          $ref: '#/components/responses/catalogs-400'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-permissions:
      - CATALOGS_ITEM_BATCH_CATALOG_CREATE
      x-snr-groups:
      - assets_catalogs
    get:
      tags:
      - Catalogs
      summary: Get items from catalog
      description: Retrieve the entries from a single catalog.
      operationId: getItemsByBag
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      - $ref: '#/components/parameters/catalogs-queryItemKey'
      - $ref: '#/components/parameters/catalogs-queryOffset'
      - $ref: '#/components/parameters/catalogs-queryLimit'
      responses:
        '200':
          description: A list of items in the catalog
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Details of the items
                    items:
                      $ref: '#/components/schemas/catalogs-item'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_READ
  /catalogs/bags/{catalogId}/items/batch:
    post:
      tags:
      - Catalogs
      summary: Batch add items
      description: |
        Add a number of items at once.

        For better performance, we recommend using the [`/v1/async/bags/{catalogId}/items` endpoint](#operation/addItemsBatchAsync).
      operationId: addItemsBatch
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        description: An array of JSON objects with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/catalogs-addItem'
      responses:
        '200':
          description: Upload status
          content:
            application/json:
              schema:
                type: boolean
                description: TRUE if successful
        '400':
          $ref: '#/components/responses/catalogs-400'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-permissions:
      - CATALOGS_ITEM_BATCH_CATALOG_CREATE
      x-snr-groups:
      - assets_catalogs
  /catalogs/bags/{catalogId}/enrichment/fields:
    patch:
      tags:
      - Catalogs
      summary: Update enrichment fields
      description: Change enrichment fields for given mapping
      operationId: updateEnrichmentFields
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/catalogs-enrichmentUpdateRequest'
      responses:
        '200':
          description: Upload status
          content:
            application/json:
              schema:
                type: integer
                description: Number of rows changed
        '400':
          $ref: '#/components/responses/catalogs-400'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-permissions:
      - CATALOGS_MAPPING_CATALOG_CREATE
      x-snr-groups:
      - assets_catalogs
  /catalogs/bags/{catalogId}/items/itemKey/{itemKey}:
    get:
      tags:
      - Catalogs
      summary: Get single item by itemKey
      description: Retrieve a single item from a catalog by using the item key (unique identifier of an item in the catalog, for example a product's SKU) of the entry in the Synerise database.
      operationId: getItemByKey
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      - in: path
        name: itemKey
        required: true
        description: '`itemKey` parameter of the item to retrieve'
        schema:
          type: string
      responses:
        '200':
          description: A single item
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/catalogs-item'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_READ
    delete:
      tags:
      - Catalogs
      summary: Delete single item by itemKey
      description: Delete a single item by itemKey (unique identifier of an item in the catalog, for example a product's SKU).
      operationId: deleteItemByItemKey
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      - in: path
        name: itemKey
        required: true
        description: '`itemKey` parameter of the item to delete'
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    description: '`true` if the operation was successful.'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_DELETE
  /catalogs/bags/{catalogId}/items/{itemId}:
    post:
      tags:
      - Catalogs
      summary: Update single item by database ID
      description: "Update a single item from a catalog by using the ID of the entry in the Synerise database.\n\nUpdate requests are processed according to the time they reach the service.  \nThis means that updates from the synchronous `/bags/{catalogId}/items/{itemId}` endpoint may overwrite asynchronous operations (see [`/v1/async/*` endpoints](#operation/updateItemAsync)) which were sent earlier and queued due to high traffic.  \nThis behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.\n"
      operationId: updateItem
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      - $ref: '#/components/parameters/catalogs-itemDatabaseId'
      requestBody:
        description: JSON object with any number of key/value pairs
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                description: The properties of the catalog item
      responses:
        '200':
          description: A single item
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/catalogs-item'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_UPDATE
    get:
      tags:
      - Catalogs
      summary: Get single item by database ID
      description: Retrieve a single item from a catalog by using the ID of the entry in the Synerise database. If you want to retrieve an item by its unique identifier in the catalog, use [/bags/{catalogId}/items/itemKey/{itemKey}](#operation/getItemByKey).
      operationId: getItem
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      - $ref: '#/components/parameters/catalogs-itemDatabaseId'
      responses:
        '200':
          description: A single item
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/catalogs-item'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_READ
    delete:
      tags:
      - Catalogs
      summary: Delete single item by database ID
      description: Delete a single item by ID.
      operationId: deleteItem
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      - $ref: '#/components/parameters/catalogs-itemDatabaseId'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    description: '`true` if the operation was successful.'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_DELETE
  /catalogs/items:
    get:
      tags:
      - Catalogs
      summary: Get all items
      description: Retrieve all items from all catalogs in the Workspace.
      operationId: getItemsByBusinessProfileid
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-queryOffset'
      - $ref: '#/components/parameters/catalogs-queryLimit'
      responses:
        '200':
          description: A list of items in the Workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: Details of the items
                    items:
                      $ref: '#/components/schemas/catalogs-item'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_READ
  /catalogs/bags/{catalogId}/mappings:
    post:
      tags:
      - Catalogs
      summary: Add mapping
      description: |-
        Add a new mapping. Mappings can be used to enrich events with data from catalogs.

        For example, you can map the product's SKU from the "product.buy" event to the column in the catalog that includes the SKU. Whenever someone purchases an item with that SKU, you can extract data from the catalog (for example, the product's brand and category) and show that additional in the event log in the Synerise GUI.
      operationId: addMapping
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/catalogs-eventData'
      responses:
        '200':
          description: Mapping data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/catalogs-mapper'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '400':
          $ref: '#/components/responses/catalogs-400'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_MAPPING_CATALOG_CREATE
  /catalogs/mappings:
    get:
      tags:
      - Catalogs
      summary: Get all mappings
      description: Retrieve all mappings from the Workspace.
      operationId: getMappingsByBP
      security:
      - JWT: []
      responses:
        '200':
          description: List of mappings
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: A list of mappings
                    items:
                      $ref: '#/components/schemas/catalogs-mapper'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_MAPPING_CATALOG_READ
  /catalogs/mappings/{bpActionParamKey}:
    delete:
      tags:
      - Catalogs
      summary: Delete mapping
      description: Delete a single mapping.
      operationId: deleteMappingBykey
      security:
      - JWT: []
      parameters:
      - in: path
        name: bpActionParamKey
        description: The unique identifier of the mapping
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Deletion status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    description: '`true` if successful'
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_MAPPING_CATALOG_DELETE
  /catalogs/itemDetail:
    get:
      tags:
      - Catalogs
      summary: Get single item by unique key
      description: Retrieve a single item from a catalog by using the value of the unique identifier (key) in the catalog. If you want to retrieve an item by its ID in the Synerise database, use [/bags/{catalogId}/items/{itemId}](#operation/getItem).
      operationId: getItemDetailByKey
      security:
      - JWT: []
      parameters:
      - name: catalogName
        in: query
        required: true
        description: Name of the catalog
        schema:
          type: string
      - name: key
        in: query
        required: true
        description: |
          Value of the unique identifier of the item in the catalog. When you retrieve an item using [this endpoint](#operation/getItemsByBag), the identifier is in the `itemKey` field.

          ```
          {
              "creationDate": "2020-09-30T11:31:16.314Z",
              "id": 73753,
              "itemKey": "uniqueValue", // this is the value of the key
              "lastModified": null,
              "value": "{\"exampleKey\":\"uniqueValue\",\"exampleKey2\":\"exampleValue\"}",
              "bag": {
                  "author": "authorName",
                  "creationDate": "2020-09-30T10:52:31.264Z",
                  "id": 1053,
                  "lastModified": "2020-09-30T11:41:11.808Z",
                  "name": "sampleCatalog"
              }
          },
          ```
        schema:
          type: string
      responses:
        '200':
          description: A single item
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: The column values from this item's catalog row.
                    properties:
                      itemId:
                        type: string
                        description: Unique ID, equal to the `itemKey` used in the request to this endpoint.
                    additionalProperties:
                      description: Column values
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - ITEMS_COLLECTOR_CATALOG_READ
  /catalogs/v2/bags/{catalogId}/items:
    delete:
      tags:
      - Catalogs
      summary: Delete all items from a catalog
      description: |
        Delete all the contents of a catalog.

        Information about the keys (columns) remains.
      operationId: deleteBagsItemsV2
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      responses:
        '200':
          description: Items deleted. The `metaData` object always shows a `totalCount` of 1, regardless of the number of deleted items.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    format: uuid
                    description: ID of the deletion job
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
        4xx:
          $ref: '#/components/responses/catalogs-400generic'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_DELETE
  /catalogs/v2/bags/{catalogId}/items/batch:
    delete:
      tags:
      - Catalogs
      summary: Delete items by itemKeys
      description: Delete items by itemKeys (unique identifier of an item in the catalog, for example a product's SKU). In the Synerise Portal, it's called the **Primary key**.
      operationId: deleteItemsByItemKeys
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        description: Array of itemKeys
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/catalogs-401'
        '403':
          $ref: '#/components/responses/catalogs-403'
        '404':
          $ref: '#/components/responses/catalogs-404'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_catalogs
      x-snr-permissions:
      - CATALOGS_CATALOG_DELETE
  /catalogs/v2/bags/{catalogId}/enable/filtering:
    patch:
      tags:
      - Catalogs
      summary: Enable filtering
      description: Enable filtering for a catalog on selected fields
      operationId: enableFilteringV2
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/catalogs-enableFilteringRequest'
      responses:
        '200':
          description: Upload status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    format: uuid
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-permissions:
      - CATALOGS_CATALOG_UPDATE
      x-snr-groups:
      - assets_catalogs
  /catalogs/v2/bags/{catalogId}/disable/filtering:
    patch:
      tags:
      - Catalogs
      summary: Disable filtering
      description: Disable filtering for a catalog on selected fields
      operationId: disableFilteringV2
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/catalogs-disableFilteringRequest'
      responses:
        '200':
          description: Number of rows changed
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: integer
                  metaData:
                    $ref: '#/components/schemas/catalogs-responseMeta'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-permissions:
      - CATALOGS_CATALOG_UPDATE
      x-snr-groups:
      - assets_catalogs
  /catalogs/v1/async/bags/{catalogId}/item:
    post:
      tags:
      - Catalogs
      summary: Add or update item asynchronously
      description: "Add a single item asynchronously to the catalog. If the item already exists, it's entirely overwritten by the item you send.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  \nThis behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.\n\nThe request body can't exceed 256KB.\n"
      operationId: addItemAsync
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/catalogs-addItem'
      responses:
        '204':
          description: Operation added to queue
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-permissions:
      - CATALOGS_ITEM_BATCH_CREATE
      - CATALOGS_ITEM_BATCH_CATALOG_CREATE
      x-snr-groups:
      - assets_catalogs
    patch:
      tags:
      - Catalogs
      summary: Add or update (partial) item asynchronously
      description: "Update a single item asynchronously to the catalog. If the item doesn't exist, it will be created.\n\nThis endpoint allows you to perform partial updates - you can send only the properties that you want to add/modify, instead of sending the entire item.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  \nThis behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.\n\nThe request body can't exceed 256KB.\n"
      operationId: updateItemAsync
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/catalogs-addItem'
      responses:
        '204':
          description: Operation added to queue
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-permissions:
      - CATALOGS_ITEM_BATCH_UPDATE
      - CATALOGS_ITEM_BATCH_CATALOG_UPDATE
      x-snr-groups:
      - assets_catalogs
  /catalogs/v1/async/bags/{catalogId}/items:
    post:
      tags:
      - Catalogs
      summary: Batch add or update items asynchronously
      description: "Add a number of items asynchronously at once. If an item already exists, it's entirely overwritten by the item you send.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  \nThis behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.\n\nThe request body can't exceed 256KB.\n"
      operationId: addItemsBatchAsync
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              type: array
              maxItems: 200
              items:
                $ref: '#/components/schemas/catalogs-addItem'
      responses:
        '204':
          description: Operation added to queue
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-permissions:
      - CATALOGS_ITEM_BATCH_CREATE
      - CATALOGS_ITEM_BATCH_CATALOG_CREATE
      x-snr-groups:
      - assets_catalogs
    patch:
      tags:
      - Catalogs
      summary: Batch add or update (partial) items asynchronously
      description: "Update a number of items asynchronously at once. If an item doesn't exist, it will be created.\n\nThis endpoint allows you to perform partial updates - you can send only the properties that you want to add/modify, instead of sending the entire item.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  \nThis behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.\n\nThe request body can't exceed 256KB.\n"
      operationId: updateItemsBatchAsync
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/catalogs-pathCatalogId'
      requestBody:
        description: JSON object with any number of key/value pairs
        required: true
        content:
          application/json:
            schema:
              type: array
              maxItems: 200
              items:
                $ref: '#/components/schemas/catalogs-addItem'
      responses:
        '204':
          description: Operation added to queue
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-permissions:
      - CATALOGS_ITEM_BATCH_UPDATE
      - CATALOGS_ITEM_BATCH_CATALOG_UPDATE
      x-snr-groups:
      - assets_catalogs
  /crm/v1/clients/{clientId}/contacts:
    get:
      deprecated: true
      tags:
      - Profile management
      summary: Get Profile details
      description: "<span style=\"color:red\">This method is deprecated. It will be disabled on August 30, 2026.</span>  \n\nYou can use these methods instead:\n  - [GET /v4/clients/{clientId}](#operation/GetClientData)\n  - [GET /v4/clients/{identifierType}/{identifierValue}](#operation/FindAClient)\n\nRetrieve the details of a Profile.\n"
      operationId: getClient
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/crm-pathClientId'
      responses:
        '200':
          description: Profile details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/crm-ClientDetails'
        '404':
          $ref: '#/components/responses/crm-404-pii'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - CRM_DETAILS_CLIENT_READ
  /crm/v1/contacts/{clientId}:
    put:
      deprecated: true
      tags:
      - Profile management
      summary: Update Profile
      description: "<span style=\"color:red\">This method is deprecated. It will be disabled on August 16, 2026</span>  \nUse one of these endpoints instead:\n  - [POST /v4/clients/{clientId}](#operation/UpdateAClient)\n  - [POST /v4/clients/by-email/{clientEmail}](#operation/UpdateAClientByEmail)\n  - [POST /v4/clients/by-customid/{customId}](#operation/UpdateAClientByCustomId)\n\nSending a null value **deletes** an attribute (if it's a custom attribute) or **sets it to null/default value** (if the attribute is Synerise-native)\n"
      operationId: updateClient
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/crm-pathClientId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/crm-CustomerCommon'
        required: true
      responses:
        '200':
          description: Profile details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/crm-ClientDetails'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_management
      x-snr-permissions:
      - CRM_CLIENT_UPDATE
  /items/v2/filter/validate:
    post:
      summary: Validate item filter
      description: |
        This endpoint lets you validate the syntax of a filter and preview its results.

        The `parserResult` object in the response validates only the IQL syntax, it does not check if the attributes or contexts referenced in the IQL query exist!
      operationId: ValidateItemFilter
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-permissions:
      - ITEMS_FILTER_VALIDATE_READ
      x-snr-groups:
      - campaigns_recommendations
      tags:
      - Item filters
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-filter-all-itemsCatalogId'
      - $ref: '#/components/parameters/items-filter-all-exampleItems'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/items-filter-all-ValidateItemsFilterRequestBody'
      responses:
        '200':
          description: Validation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-filter-all-FilterValidateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-filter-all-Error'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-filter-all-Error'
        '502':
          description: Catalog not ready
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-filter-all-Error'
  /search/v2/indices/{indexId}/visual:
    get:
      summary: Visual items search
      description: Retrieves items that match an image. The results can be filtered and sorted.
      operationId: SearchVisualGet
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Visual Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-imageUrl'
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      - $ref: '#/components/parameters/items-search-clientUUID'
      - $ref: '#/components/parameters/items-search-personalize'
      - $ref: '#/components/parameters/items-search-correlationId'
      - $ref: '#/components/parameters/items-search-searchId'
      - $ref: '#/components/parameters/items-search-sortByMetric'
      - $ref: '#/components/parameters/items-search-sortByGeoPoint'
      - $ref: '#/components/parameters/items-search-filterGeoPoints'
      - $ref: '#/components/parameters/items-search-filterAroundRadius'
      - $ref: '#/components/parameters/items-search-filterAnchor'
      - $ref: '#/components/parameters/items-search-filters'
      - $ref: '#/components/parameters/items-search-facets'
      - $ref: '#/components/parameters/items-search-facetsSize'
      - $ref: '#/components/parameters/items-search-maxValuesPerFacet'
      - $ref: '#/components/parameters/items-search-caseSensitiveFacetValues'
      - $ref: '#/components/parameters/items-search-displayAttributes'
      - $ref: '#/components/parameters/items-search-context'
      - $ref: '#/components/parameters/items-search-includeFacets'
      - $ref: '#/components/parameters/items-search-facetsOrderBy'
      - $ref: '#/components/parameters/items-search-paginationPage'
      - $ref: '#/components/parameters/items-search-paginationLimit'
      - $ref: '#/components/parameters/items-search-paginationSortBy'
      - $ref: '#/components/parameters/items-search-paginationOrdering'
      - $ref: '#/components/parameters/items-search-paginationIncludeMeta'
      - $ref: '#/components/parameters/items-search-ignoreQueryRules'
      - $ref: '#/components/parameters/items-search-excludeQueryRules'
      - $ref: '#/components/parameters/items-search-params'
      responses:
        '200':
          description: Search response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-VisualSearchResponse'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
    post:
      summary: Visual items search
      description: Retrieves items that match an image. The results can be filtered and sorted.
      operationId: SearchVisualPost
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Visual Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-VisualSearchJsonBody'
      responses:
        '200':
          description: Search response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-VisualSearchResponse'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices/{indexId}/visual/explain:
    get:
      summary: Explained visual items search
      description: Retrieves items that match an image. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.
      operationId: SearchVisualGetWithExplanation
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Visual Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-imageUrl'
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      - $ref: '#/components/parameters/items-search-clientUUID'
      - $ref: '#/components/parameters/items-search-personalize'
      - $ref: '#/components/parameters/items-search-correlationId'
      - $ref: '#/components/parameters/items-search-searchId'
      - $ref: '#/components/parameters/items-search-sortByMetric'
      - $ref: '#/components/parameters/items-search-sortByGeoPoint'
      - $ref: '#/components/parameters/items-search-filterGeoPoints'
      - $ref: '#/components/parameters/items-search-filterAroundRadius'
      - $ref: '#/components/parameters/items-search-filterAnchor'
      - $ref: '#/components/parameters/items-search-filters'
      - $ref: '#/components/parameters/items-search-facets'
      - $ref: '#/components/parameters/items-search-facetsSize'
      - $ref: '#/components/parameters/items-search-maxValuesPerFacet'
      - $ref: '#/components/parameters/items-search-caseSensitiveFacetValues'
      - $ref: '#/components/parameters/items-search-displayAttributes'
      - $ref: '#/components/parameters/items-search-context'
      - $ref: '#/components/parameters/items-search-includeFacets'
      - $ref: '#/components/parameters/items-search-facetsOrderBy'
      - $ref: '#/components/parameters/items-search-paginationPage'
      - $ref: '#/components/parameters/items-search-paginationLimit'
      - $ref: '#/components/parameters/items-search-paginationSortBy'
      - $ref: '#/components/parameters/items-search-paginationOrdering'
      - $ref: '#/components/parameters/items-search-paginationIncludeMeta'
      - $ref: '#/components/parameters/items-search-ignoreQueryRules'
      - $ref: '#/components/parameters/items-search-excludeQueryRules'
      - $ref: '#/components/parameters/items-search-crossWorkspaceModeEnabled'
      - $ref: '#/components/parameters/items-search-params'
      responses:
        '200':
          description: Search response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-VisualSearchResponseWithExplanation'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
    post:
      summary: Explained visual items search
      description: Retrieves items that match an image. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.
      operationId: SearchVisualPostWithExplanation
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Visual Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-ExplainVisualSearchJsonBody'
      responses:
        '200':
          description: Search response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-VisualSearchResponseWithExplanation'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices/{indexId}/query:
    get:
      summary: Full-text items search
      description: Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.
      operationId: SearchFullTextGet
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-searchQuery'
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      - $ref: '#/components/parameters/items-search-clientUUID'
      - $ref: '#/components/parameters/items-search-personalize'
      - $ref: '#/components/parameters/items-search-correlationId'
      - $ref: '#/components/parameters/items-search-searchId'
      - $ref: '#/components/parameters/items-search-sortByMetric'
      - $ref: '#/components/parameters/items-search-sortByGeoPoint'
      - $ref: '#/components/parameters/items-search-filterGeoPoints'
      - $ref: '#/components/parameters/items-search-filterAroundRadius'
      - $ref: '#/components/parameters/items-search-filters'
      - $ref: '#/components/parameters/items-search-facets'
      - $ref: '#/components/parameters/items-search-facetsSize'
      - $ref: '#/components/parameters/items-search-maxValuesPerFacet'
      - $ref: '#/components/parameters/items-search-caseSensitiveFacetValues'
      - $ref: '#/components/parameters/items-search-displayAttributes'
      - $ref: '#/components/parameters/items-search-context'
      - $ref: '#/components/parameters/items-search-includeFacets'
      - $ref: '#/components/parameters/items-search-facetsOrderBy'
      - $ref: '#/components/parameters/items-search-paginationPage'
      - $ref: '#/components/parameters/items-search-paginationLimit'
      - $ref: '#/components/parameters/items-search-paginationSortBy'
      - $ref: '#/components/parameters/items-search-paginationOrdering'
      - $ref: '#/components/parameters/items-search-paginationIncludeMeta'
      - $ref: '#/components/parameters/items-search-distinctFilter'
      - $ref: '#/components/parameters/items-search-ignoreQueryRules'
      - $ref: '#/components/parameters/items-search-excludeQueryRules'
      - $ref: '#/components/parameters/items-search-disableQueryClassification'
      - $ref: '#/components/parameters/items-search-disableDynamicReranker'
      - $ref: '#/components/parameters/items-search-params'
      responses:
        '200':
          $ref: '#/components/responses/items-search-FullTextSearchResponse200'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
    post:
      summary: Full-text items search
      description: Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.
      operationId: SearchFullTextPost
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-FullTextSearchJsonBody'
      responses:
        '200':
          $ref: '#/components/responses/items-search-FullTextSearchResponse200'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices/{indexId}/query/explain:
    get:
      summary: Explained full-text items search
      description: Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.  The response contains an explanation of the factors that influenced the result.
      operationId: SearchFullTextGetWithExplanation
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-searchQuery'
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      - $ref: '#/components/parameters/items-search-clientUUID'
      - $ref: '#/components/parameters/items-search-personalize'
      - $ref: '#/components/parameters/items-search-correlationId'
      - $ref: '#/components/parameters/items-search-searchId'
      - $ref: '#/components/parameters/items-search-sortByMetric'
      - $ref: '#/components/parameters/items-search-sortByGeoPoint'
      - $ref: '#/components/parameters/items-search-filterGeoPoints'
      - $ref: '#/components/parameters/items-search-filterAroundRadius'
      - $ref: '#/components/parameters/items-search-filters'
      - $ref: '#/components/parameters/items-search-facets'
      - $ref: '#/components/parameters/items-search-facetsSize'
      - $ref: '#/components/parameters/items-search-maxValuesPerFacet'
      - $ref: '#/components/parameters/items-search-caseSensitiveFacetValues'
      - $ref: '#/components/parameters/items-search-displayAttributes'
      - $ref: '#/components/parameters/items-search-context'
      - $ref: '#/components/parameters/items-search-includeFacets'
      - $ref: '#/components/parameters/items-search-facetsOrderBy'
      - $ref: '#/components/parameters/items-search-paginationPage'
      - $ref: '#/components/parameters/items-search-paginationLimit'
      - $ref: '#/components/parameters/items-search-paginationSortBy'
      - $ref: '#/components/parameters/items-search-paginationOrdering'
      - $ref: '#/components/parameters/items-search-paginationIncludeMeta'
      - $ref: '#/components/parameters/items-search-distinctFilter'
      - $ref: '#/components/parameters/items-search-ignoreQueryRules'
      - $ref: '#/components/parameters/items-search-disableQueryClassification'
      - $ref: '#/components/parameters/items-search-disableDynamicReranker'
      - $ref: '#/components/parameters/items-search-excludeQueryRules'
      - $ref: '#/components/parameters/items-search-crossWorkspaceModeEnabled'
      - $ref: '#/components/parameters/items-search-params'
      responses:
        '200':
          $ref: '#/components/responses/items-search-FullTextSearchResponse200WithExplanation'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
    post:
      summary: Explained full-text items search
      description: Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.
      operationId: SearchFullTextPostWithExplanation
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-ExplainFullTextSearchJsonBody'
      responses:
        '200':
          $ref: '#/components/responses/items-search-FullTextSearchResponse200WithExplanation'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices/{indexId}/autocomplete:
    get:
      summary: Autocomplete items search
      description: Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached.
      operationId: SearchAutocompleteGet
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-searchQuery'
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      - $ref: '#/components/parameters/items-search-clientUUID'
      - $ref: '#/components/parameters/items-search-personalize'
      - $ref: '#/components/parameters/items-search-sortByMetric'
      - $ref: '#/components/parameters/items-search-sortByGeoPoint'
      - $ref: '#/components/parameters/items-search-filterGeoPoints'
      - $ref: '#/components/parameters/items-search-filterAroundRadius'
      - $ref: '#/components/parameters/items-search-filters'
      - $ref: '#/components/parameters/items-search-facets'
      - $ref: '#/components/parameters/items-search-facetsSize'
      - $ref: '#/components/parameters/items-search-maxValuesPerFacet'
      - $ref: '#/components/parameters/items-search-caseSensitiveFacetValues'
      - $ref: '#/components/parameters/items-search-displayAttributes'
      - $ref: '#/components/parameters/items-search-context'
      - $ref: '#/components/parameters/items-search-includeFacets'
      - $ref: '#/components/parameters/items-search-facetsOrderBy'
      - $ref: '#/components/parameters/items-search-paginationPage'
      - $ref: '#/components/parameters/items-search-paginationLimit'
      - $ref: '#/components/parameters/items-search-paginationSortBy'
      - $ref: '#/components/parameters/items-search-paginationOrdering'
      - $ref: '#/components/parameters/items-search-paginationIncludeMeta'
      - $ref: '#/components/parameters/items-search-distinctFilter'
      - $ref: '#/components/parameters/items-search-ignoreQueryRules'
      - $ref: '#/components/parameters/items-search-excludeQueryRules'
      - $ref: '#/components/parameters/items-search-params'
      - $ref: '#/components/parameters/items-search-disableQueryClassification'
      - $ref: '#/components/parameters/items-search-disableDynamicReranker'
      responses:
        '200':
          $ref: '#/components/responses/items-search-AutocompleteSearchResponse200'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
    post:
      summary: Autocomplete items search
      description: Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached.
      operationId: SearchAutocompletePost
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-AutocompleteJsonBody'
      responses:
        '200':
          $ref: '#/components/responses/items-search-AutocompleteSearchResponse200'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices/{indexId}/autocomplete/explain:
    get:
      summary: Explained autocomplete items search
      description: Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached. The response contains an explanation of the factors that influenced the result.
      operationId: SearchAutocompleteGetWithExplanation
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-searchQuery'
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      - $ref: '#/components/parameters/items-search-clientUUID'
      - $ref: '#/components/parameters/items-search-personalize'
      - $ref: '#/components/parameters/items-search-sortByMetric'
      - $ref: '#/components/parameters/items-search-sortByGeoPoint'
      - $ref: '#/components/parameters/items-search-filterGeoPoints'
      - $ref: '#/components/parameters/items-search-filterAroundRadius'
      - $ref: '#/components/parameters/items-search-filters'
      - $ref: '#/components/parameters/items-search-facets'
      - $ref: '#/components/parameters/items-search-facetsSize'
      - $ref: '#/components/parameters/items-search-maxValuesPerFacet'
      - $ref: '#/components/parameters/items-search-caseSensitiveFacetValues'
      - $ref: '#/components/parameters/items-search-displayAttributes'
      - $ref: '#/components/parameters/items-search-context'
      - $ref: '#/components/parameters/items-search-includeFacets'
      - $ref: '#/components/parameters/items-search-facetsOrderBy'
      - $ref: '#/components/parameters/items-search-paginationPage'
      - $ref: '#/components/parameters/items-search-paginationLimit'
      - $ref: '#/components/parameters/items-search-paginationSortBy'
      - $ref: '#/components/parameters/items-search-paginationOrdering'
      - $ref: '#/components/parameters/items-search-paginationIncludeMeta'
      - $ref: '#/components/parameters/items-search-distinctFilter'
      - $ref: '#/components/parameters/items-search-ignoreQueryRules'
      - $ref: '#/components/parameters/items-search-excludeQueryRules'
      - $ref: '#/components/parameters/items-search-crossWorkspaceModeEnabled'
      - $ref: '#/components/parameters/items-search-params'
      - $ref: '#/components/parameters/items-search-disableQueryClassification'
      - $ref: '#/components/parameters/items-search-disableDynamicReranker'
      responses:
        '200':
          $ref: '#/components/responses/items-search-AutocompleteSearchResponse200WithExplanation'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
    post:
      summary: Explained autocomplete items search
      description: Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached. The response contains an explanation of the factors that influenced the result.
      operationId: SearchAutocompletePostWithExplanation
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-ExplainAutocompleteJsonBody'
      responses:
        '200':
          $ref: '#/components/responses/items-search-AutocompleteSearchResponse200WithExplanation'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices/{indexId}/list:
    get:
      summary: Items listing
      description: Retrieves item listing, which is a search without a query. The results can be filtered and sorted.
      operationId: ListingGet
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Listing
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      - $ref: '#/components/parameters/items-search-clientUUID'
      - $ref: '#/components/parameters/items-search-personalize'
      - $ref: '#/components/parameters/items-search-correlationId'
      - $ref: '#/components/parameters/items-search-searchId'
      - $ref: '#/components/parameters/items-search-sortByMetric'
      - $ref: '#/components/parameters/items-search-sortByGeoPoint'
      - $ref: '#/components/parameters/items-search-filterGeoPoints'
      - $ref: '#/components/parameters/items-search-filterAroundRadius'
      - $ref: '#/components/parameters/items-search-filters'
      - $ref: '#/components/parameters/items-search-facets'
      - $ref: '#/components/parameters/items-search-facetsSize'
      - $ref: '#/components/parameters/items-search-maxValuesPerFacet'
      - $ref: '#/components/parameters/items-search-caseSensitiveFacetValues'
      - $ref: '#/components/parameters/items-search-displayAttributes'
      - $ref: '#/components/parameters/items-search-context'
      - $ref: '#/components/parameters/items-search-includeFacets'
      - $ref: '#/components/parameters/items-search-facetsOrderBy'
      - $ref: '#/components/parameters/items-search-paginationPage'
      - $ref: '#/components/parameters/items-search-paginationLimit'
      - $ref: '#/components/parameters/items-search-paginationSortBy'
      - $ref: '#/components/parameters/items-search-paginationOrdering'
      - $ref: '#/components/parameters/items-search-paginationIncludeMeta'
      - $ref: '#/components/parameters/items-search-distinctFilter'
      - $ref: '#/components/parameters/items-search-ignoreQueryRules'
      - $ref: '#/components/parameters/items-search-excludeQueryRules'
      - $ref: '#/components/parameters/items-search-params'
      responses:
        '200':
          $ref: '#/components/responses/items-search-ListingResponse200'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
    post:
      summary: Items listing
      description: Retrieves item listing, which is a search without a query. The results can be filtered and sorted.
      operationId: ListingPost
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Listing
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-ListingJsonBody'
      responses:
        '200':
          $ref: '#/components/responses/items-search-ListingResponse200'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices/{indexId}/list/explain:
    get:
      summary: Explained items listing
      description: Retrieves item listing, which is a search without a query. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.
      operationId: ListingGetWithExplanation
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Listing
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      - $ref: '#/components/parameters/items-search-clientUUID'
      - $ref: '#/components/parameters/items-search-personalize'
      - $ref: '#/components/parameters/items-search-correlationId'
      - $ref: '#/components/parameters/items-search-searchId'
      - $ref: '#/components/parameters/items-search-sortByMetric'
      - $ref: '#/components/parameters/items-search-sortByGeoPoint'
      - $ref: '#/components/parameters/items-search-filterGeoPoints'
      - $ref: '#/components/parameters/items-search-filterAroundRadius'
      - $ref: '#/components/parameters/items-search-filters'
      - $ref: '#/components/parameters/items-search-facets'
      - $ref: '#/components/parameters/items-search-facetsSize'
      - $ref: '#/components/parameters/items-search-maxValuesPerFacet'
      - $ref: '#/components/parameters/items-search-caseSensitiveFacetValues'
      - $ref: '#/components/parameters/items-search-displayAttributes'
      - $ref: '#/components/parameters/items-search-context'
      - $ref: '#/components/parameters/items-search-includeFacets'
      - $ref: '#/components/parameters/items-search-facetsOrderBy'
      - $ref: '#/components/parameters/items-search-paginationPage'
      - $ref: '#/components/parameters/items-search-paginationLimit'
      - $ref: '#/components/parameters/items-search-paginationSortBy'
      - $ref: '#/components/parameters/items-search-paginationOrdering'
      - $ref: '#/components/parameters/items-search-paginationIncludeMeta'
      - $ref: '#/components/parameters/items-search-distinctFilter'
      - $ref: '#/components/parameters/items-search-ignoreQueryRules'
      - $ref: '#/components/parameters/items-search-excludeQueryRules'
      - $ref: '#/components/parameters/items-search-crossWorkspaceModeEnabled'
      - $ref: '#/components/parameters/items-search-params'
      responses:
        '200':
          $ref: '#/components/responses/items-search-ListingResponse200WithExplanation'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
    post:
      summary: Explained items listing
      description: Retrieves item listing, which is a search without a query. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.
      operationId: ListingPostWithExplanation
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Listing
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-ExplainListingJsonBody'
      responses:
        '200':
          $ref: '#/components/responses/items-search-ListingResponse200WithExplanation'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices/{indexId}/attributes/filterable/values:
    get:
      summary: Get values of filterable attributes
      description: Retrieve values of filterable attributes.
      operationId: getFilterableAttributesValues
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Search Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      - $ref: '#/components/parameters/items-search-filterableAttributes'
      responses:
        '200':
          description: Values returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-FilterableAttributesValues'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices/{indexId}/query-classification:
    post:
      summary: Query classification
      description: Predicting the optimal categories that will provide the most relevant results for the searched phrase.
      operationId: queryClassification
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Query classification
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-QueryClassificationJsonBody'
      responses:
        '200':
          $ref: '#/components/responses/items-search-QueryClassificationResponse200'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices/{indexId}/explain-match:
    get:
      summary: Searchable attributes match
      description: |
        Enter a query and an item ID to check if a token (a word or a synonym which replaced it) matches a value or part of a value from the item's searchable attributes.
      operationId: searchableAttributesMatch
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_SEARCH_READ
      tags:
      - Search
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-inPathIndexId'
      - $ref: '#/components/parameters/items-search-searchQuery'
      - $ref: '#/components/parameters/items-search-itemId'
      responses:
        '200':
          $ref: '#/components/responses/items-search-SearchableAttributesMatchResponse200'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-Error'
  /search/v2/indices:
    get:
      summary: Get configurations of all indices
      description: Retrieve the configurations of all indices.
      operationId: getIndicesConfigsV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_READ
      tags:
      - Search Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-paginationPage'
      - $ref: '#/components/parameters/items-search-config-paginationLimit'
      - $ref: '#/components/parameters/items-search-config-paginationSortBy'
      - $ref: '#/components/parameters/items-search-config-paginationOrdering'
      - $ref: '#/components/parameters/items-search-config-paginationIncludeMeta'
      - $ref: '#/components/parameters/items-search-config-nameFilter'
      - $ref: '#/components/parameters/items-search-config-queryFilter'
      - $ref: '#/components/parameters/items-search-config-excludeAbTests'
      - $ref: '#/components/parameters/items-search-config-inQueryDirectoryId'
      - $ref: '#/components/parameters/items-search-config-inQueryType'
      responses:
        '200':
          description: Configurations returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-PaginatedSearchConfigsSchema'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
    post:
      summary: Post index configuration
      description: Creates a new configuration of a single index.
      operationId: postIndexConfigV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_CREATE
      tags:
      - Search Configuration
      security:
      - JWT: []
      requestBody:
        $ref: '#/components/requestBodies/items-search-config-PutSearchConfigJsonBody'
      responses:
        '200':
          description: Returned created configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-SearchConfigSchema'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
  /search/v2/indices/{indexId}/config:
    get:
      summary: Get index configuration
      description: Retrieve the configuration of a single index.
      operationId: getIndexConfigV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_READ
      tags:
      - Search Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-InPathIndexId'
      responses:
        '200':
          description: Configuration returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-SearchConfigSchema'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
    delete:
      summary: Delete index configuration
      description: Delete the configuration of a single index.
      operationId: deleteIndexConfigV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_DELETE
      tags:
      - Search Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-InPathIndexId'
      responses:
        '204':
          description: Configuration deleted
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
    put:
      summary: Update index configuration
      description: Update the configuration of a single index.
      operationId: updateIndexConfigV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_UPDATE
      tags:
      - Search Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-InPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-config-PutSearchConfigJsonBody'
      responses:
        '200':
          description: Returned updated configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-SearchConfigSchema'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
  /search/v2/indices/{indexId}/state:
    get:
      summary: Get index state
      description: Retrieve the state of a single index.
      operationId: getIndexStateV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_READ
      tags:
      - Search Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-InPathIndexId'
      responses:
        '200':
          description: State returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-IndexStateResponseSchema'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
  /search/v2/supported-languages:
    get:
      summary: Get supported languages
      description: Retrieve supported languages.
      operationId: getSupportedLanguagesV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_READ
      tags:
      - Search Configuration
      security:
      - JWT: []
      responses:
        '200':
          description: Supported search languages as ISO 639-1 codes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-SupportedLanguages'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
  /search/v2/indices/{indexId}/duplicate:
    get:
      summary: Duplicate index
      description: duplicate index.
      operationId: duplicateIndexV2Get
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_CREATE
      tags:
      - Search Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-InPathIndexId'
      responses:
        '200':
          description: Returned newly created duplicate index
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-SearchConfigSchema'
        '500':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
  /search/v2/suggestion-indices:
    get:
      summary: Get suggestion indices
      description: Retrieve a list of all suggestion index configurations in the workspace.
      operationId: GetSuggestionsIndices
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_READ
      tags:
      - Suggestions Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-paginationPage'
      - $ref: '#/components/parameters/items-search-config-paginationLimit'
      - $ref: '#/components/parameters/items-search-config-paginationSortBy'
      - $ref: '#/components/parameters/items-search-config-paginationOrdering'
      - $ref: '#/components/parameters/items-search-config-paginationIncludeMeta'
      - $ref: '#/components/parameters/items-search-config-nameFilter'
      - $ref: '#/components/parameters/items-search-config-queryFilter'
      responses:
        '200':
          description: List of suggestion index configurations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-GetSuggestionIndicesResponseSchema'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
    post:
      summary: Create suggestion index
      description: Create a suggestion index configuration.
      operationId: PostSuggestionIndexConfig
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_CREATE
      tags:
      - Suggestions Configuration
      security:
      - JWT: []
      requestBody:
        $ref: '#/components/requestBodies/items-search-config-SuggestionIndexConfigBody'
      responses:
        '200':
          description: Suggestion index config created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-SuggestionIndexSchema'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
  /search/v2/suggestion-indices/{indexId}/config:
    get:
      summary: Get suggestion index
      description: Retrieve a suggestion index configuration.
      operationId: GetSuggestionsIndex
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_READ
      tags:
      - Suggestions Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-InPathIndexId'
      responses:
        '200':
          description: Suggestion index configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-SuggestionIndexSchema'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
    put:
      summary: Create/replace suggestion index
      description: Create a suggestion index configuration or replace an existing one, given the index ID.
      operationId: PutSuggestionIndexConfig
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_UPDATE
      tags:
      - Suggestions Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-InPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/items-search-config-SuggestionIndexConfigBody'
      responses:
        '200':
          description: Suggestion index config created or replaced successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-SuggestionIndexSchema'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
    delete:
      summary: Delete suggestion index
      description: Delete a suggestion index configuration.
      operationId: DeleteSuggestionIndexConfig
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_DELETE
      tags:
      - Suggestions Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-InPathIndexId'
      responses:
        '204':
          description: Suggestion index config deleted
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
  /search/v2/suggestion-indices/{indexId}/state:
    get:
      summary: Get suggestion index state
      description: Retrieve the state of a single suggestion index.
      operationId: GetSuggestionsIndexState
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - ITEMS_SEARCH_CONFIG_SEARCH_READ
      tags:
      - Suggestions Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/items-search-config-InPathIndexId'
      responses:
        '200':
          description: Suggestion index state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-IndexStateResponseSchema'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-config-Error'
  /search/v2/indices/{indexId}/deleted-searches:
    get:
      summary: Get deleted searches
      description: Retrieve the searches deleted from a profile's history.
      operationId: GetDeletedSearches
      tags:
      - Search
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_RECENT_SEARCH_READ
      security:
      - JWT: []
      - TrackerKey: []
      parameters:
      - $ref: '#/components/parameters/items-search-recent-indexId'
      - $ref: '#/components/parameters/items-search-recent-clientUUID'
      responses:
        '200':
          description: Deleted searches returned
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/items-search-recent-DeletedSearch'
        '400':
          description: Check error message for more details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-recent-Error'
    post:
      summary: Soft-delete a recent search
      description: Delete a recent search from the history accessible to a profile. The search remains in the database and you can retrieve it by using [this endpoint](#operation/GetDeletedSearches).
      operationId: PostDeletedSearch
      tags:
      - Search
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_RECENT_SEARCH_CREATE
      security:
      - JWT: []
      - TrackerKey: []
      parameters:
      - $ref: '#/components/parameters/items-search-recent-indexId'
      - $ref: '#/components/parameters/items-search-recent-clientUUID'
      requestBody:
        $ref: '#/components/requestBodies/items-search-recent-DeletedSearchBody'
      responses:
        '204':
          description: Soft-delete successful
        '400':
          description: Check error message for more details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-recent-Error'
  /search/v2/indices/{indexId}/recent-searches:
    get:
      summary: Get recent searches
      description: Get a profile's recent searches from a particular index.
      operationId: GetRecentSearches
      tags:
      - Search
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-groups: []
      x-snr-permissions:
      - ITEMS_SEARCH_RECENT_SEARCH_READ
      security:
      - JWT: []
      - TrackerKey: []
      parameters:
      - $ref: '#/components/parameters/items-search-recent-indexId'
      - $ref: '#/components/parameters/items-search-recent-clientUUID'
      - $ref: '#/components/parameters/items-search-recent-windowSize'
      - $ref: '#/components/parameters/items-search-recent-timeUnit'
      - $ref: '#/components/parameters/items-search-recent-timeValue'
      responses:
        '200':
          description: Recent searches returned
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  description: Recent search query
        '400':
          description: Check error message for more details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/items-search-recent-Error'
  /metrics/v2/available:
    get:
      summary: Check available metrics (recommendations)
      description: Returns metrics available for the Workspace. The metrics can be used when defining boostMetric and sortMetric query parameters in recommendations and in metric-based recommendations.
      operationId: ApiGetAvailableMetricsV2
      tags:
      - 'AI: Metrics'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - METRICS_RECOMMENDATIONS_READ
      security:
      - JWT: []
      responses:
        '200':
          description: Available metrics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/metrics-AvailableMetrics'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/metrics-Error'
  /metrics/v2/available-ids:
    get:
      summary: Retrieve IDs of available metrics (recommendations)
      description: Returns IDs of metrics that are available for the Workspace. The metrics can be used when defining boostMetric and sortMetric query parameters in recommendations and in metric-based recommendations.
      operationId: ApiGetAvailableMetricsIdsV2
      tags:
      - 'AI: Metrics'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - METRICS_RECOMMENDATIONS_READ
      security:
      - JWT: []
      responses:
        '200':
          description: IDs of available metrics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/metrics-AvailableMetricsIds'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/metrics-Error'
  /morph/logs/automation/{automationWorkflowId}/last-run/with-stages:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - automation_2_journeys
      x-snr-permissions:
      - MORPH_JOBS_READ
      tags:
      - Data Processing Job Logs
      operationId: getExtendedInfoAboutLastRun
      summary: Get last log with stages
      description: |2

        Retrieve the status of a workflow's last run and its stages.

        The workflow must contain at least one of the following nodes:
        - Any Data Transformation node
        - Any node that pulls data into a workflow (for example local file, SFTP, Azure Blob Storage)
        - Any node that pushes data out of the workflow (for example SFTP, Pub/Sub)
        - Any node that imports data into Synerise
      parameters:
      - name: automationWorkflowId
        in: path
        required: true
        description: '`diagramId` of the workflow to fetch last job from'
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/morph-LogsLimitInQuery'
      responses:
        '200':
          description: Information about last data transformation journey status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/morph-DtDiagramLastRunResponse'
        '401':
          $ref: '#/components/responses/morph-401'
        '403':
          $ref: '#/components/responses/morph-403'
        '404':
          description: "- workflow doesn't exist; \n- no journeys exist for a workflow; \n- workflow doesn't contain any of the required nodes (returns a \"no journeys found\" error)\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/morph-HttpErrorDetails'
              example:
                error: Not found
                status: 404
                timestamp: 2023-09-06T11:54:08.564Z
                message: No journeys for diagram fe7e3a80-91bb-433a-94cf-744253cc442c found
      security:
      - JWT: []
  /morph/logs/batch/{automationWorkflowId}/last-run:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - client_management
      x-snr-permissions:
      - MORPH_BATCH_JOBS_READ
      tags:
      - Batch Operations Job Logs
      operationId: getExtendedInfoAboutLastBatchDiagramRun
      summary: Get extended information about last batch operation run including counts and logs
      description: |2

        Retrieve the status of a workflow's last run and its stages.
      parameters:
      - name: automationWorkflowId
        in: path
        required: true
        description: '`diagramId` of the workflow to fetch last job from'
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/morph-LogsLimitInQuery'
      responses:
        '200':
          description: Information about last data transformation journey status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/morph-DtDiagramLastRunResponse'
        '401':
          $ref: '#/components/responses/morph-401'
        '403':
          $ref: '#/components/responses/morph-403'
        '404':
          description: "- workflow doesn't exist; \n- no journeys exist for a workflow; \n- workflow doesn't contain any of the required nodes (returns a \"no journeys found\" error)\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/morph-HttpErrorDetails'
              example:
                error: Not found
                status: 404
                timestamp: 2023-09-06T11:54:08.564Z
                message: No journeys for diagram fe7e3a80-91bb-433a-94cf-744253cc442c found
      security:
      - JWT: []
  /morph/exports/clients/segmentation:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - settings_export
      x-snr-permissions:
      - CLIENT_EXPORTER_REPORT_CREATE
      tags:
      - Profile management
      operationId: runProfileExport
      summary: Create and run profile export
      description: Request an export of profiles. The group of profiles to export is selected by pointing to a segmentation. After the export is completed, you can access the data with [GET /exports/clients/{taskId}/data](#operation/getExportedProfileData) or from [https://app.synerise.com/assets/exports](https://app.synerise.com/assets/exports).
      security:
      - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/morph-NewProfileExport'
      responses:
        '200':
          description: Export task created and queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/morph-ExportResponse'
        '400':
          $ref: '#/components/responses/morph-BadRequest'
  /morph/exports/clients/{taskId}/status:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - settings_export
      x-snr-permissions:
      - CLIENT_EXPORTER_REPORT_CREATE
      tags:
      - Profile management
      operationId: getProfileExportStatus
      summary: Check profile export status
      description: After creating an export with [POST /exports/clients/segmentation](#operation/runProfileExport), you can check its status. When the export is ready, you can access the data with [GET /exports/clients/{taskId}/data](#operation/getExportedProfileData).
      security:
      - JWT: []
      parameters:
      - name: taskId
        in: path
        required: true
        description: Unique ID of the export task
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Status of the export task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/morph-JobStatus'
  /morph/exports/clients/{taskId}/data:
    get:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - settings_export
      x-snr-permissions:
      - CLIENT_EXPORTER_REPORT_CREATE
      tags:
      - Profile management
      operationId: getExportedProfileData
      summary: Get exported profiles
      description: |
        Get exported profiles as a list. To create the export, use [POST /exports/clients/segmentation](#operation/runProfileExport).

        **Tip**: If you want to download a CSV, JSON, or JSONL, find your export in [https://app.synerise.com/assets/exports](https://app.synerise.com/assets/exports).
      security:
      - JWT: []
      parameters:
      - name: taskId
        in: path
        required: true
        description: Unique ID of the export task
        schema:
          type: string
          format: uuid
      - name: offset
        in: query
        required: true
        description: The index of the first record to retrieve. Use this to paginate the exported data.
        schema:
          type: number
          minimum: 0
      - name: limit
        in: query
        required: true
        description: The number of records to retrieve. Use this to paginate the exported data.
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Exported profile data
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  example:
                    id: '1234'
                    exampleAttribute: foo
                    exampleTag: 'true'
                    exampleExpression: '23'
                    exampleAggregate: '74'
                    exampleSegmentation: 'false'
                  additionalProperties:
                    type: string
                    description: |
                      - Profile attributes are key/value pairs.
                      - Tags are key/value pairs, where the key is the name of the tag and the value is "true" (string) if the tag is assigned to the profile.
                      - Expressions are key/value pairs, where the key is the name of the expression and the value is the result of the expression.
                      - Aggregates are key/value pairs, where the key is the name of the aggregate and the value is the result of the aggregate.
                      - Segmentations are key/value pairs, where the key is the name of the segmentation, and the value is "true" (string) if the profile belongs to the segmentation.
        '400':
          $ref: '#/components/responses/morph-BadRequest'
  /notes-service/by-id/{clientId}:
    get:
      tags:
      - Profile management
      summary: Get all Profile notes
      description: Retrieve all notes associated with a single profile.
      operationId: getAllNotesUsingGET
      parameters:
      - $ref: '#/components/parameters/notes-service-profileId'
      responses:
        '200':
          description: An array of notes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/notes-service-NoteResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      x-snr-groups:
      - client_notes
      x-snr-permissions:
      - NOTES_SERVICE_ALL_NOTES_READ
      security:
      - JWT: []
    post:
      tags:
      - Profile management
      summary: Create a note
      description: Create a new note in the profile
      operationId: createNoteUsingPOST
      parameters:
      - $ref: '#/components/parameters/notes-service-profileId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/notes-service-NoteRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notes-service-NoteResponse'
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      x-snr-groups:
      - client_notes
      x-snr-permissions:
      - NOTES_SERVICE_NOTE_CREATE
      security:
      - JWT: []
  /notes-service/by-id/{clientId}/{noteId}:
    get:
      tags:
      - Profile management
      summary: Get note
      description: Retrieve a single note
      operationId: getNoteUsingGET
      parameters:
      - $ref: '#/components/parameters/notes-service-profileId'
      - name: noteId
        in: path
        description: Note UUID
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notes-service-NoteResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      x-snr-groups:
      - client_notes
      x-snr-permissions:
      - NOTES_SERVICE_NOTE_READ
      security:
      - JWT: []
    put:
      tags:
      - Profile management
      summary: Update note
      description: You can update an existing note.
      operationId: updateNoteUsingPUT
      parameters:
      - name: clientId
        in: path
        required: true
        description: Profile ID
        schema:
          type: integer
          format: int64
      - name: noteId
        in: path
        description: Note UUID
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/notes-service-NoteRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notes-service-NoteResponse'
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      x-snr-groups:
      - client_notes
      x-snr-permissions:
      - NOTES_SERVICE_NOTE_UPDATE
      security:
      - JWT: []
    delete:
      tags:
      - Profile management
      summary: Delete note
      description: You can delete a note. This operation is irreversible.
      operationId: deleteNoteUsingDELETE
      parameters:
      - $ref: '#/components/parameters/notes-service-profileId'
      - name: noteId
        in: path
        description: Note UUID
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      x-snr-scopes:
      - USER
      x-snr-groups:
      - client_notes
      x-snr-permissions:
      - NOTES_SERVICE_NOTE_DELETE
      security:
      - JWT: []
  /optimizer/v2/experiments:
    post:
      summary: Create experiment
      description: Create a new A/B/X test for recommendations or item search.
      operationId: CreateExperimentV2
      tags:
      - Experiments
      x-snr-permissions:
      - OPTIMIZER_MANAGER_TESTOPTIMIZER_CREATE
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_test_optimizer
      security:
      - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/optimizer-manager-ExperimentCreateOrUpdateRequestV2'
      responses:
        '200':
          description: ID of the created experiment
          content:
            application/json:
              schema:
                type: object
                properties:
                  experimentId:
                    $ref: '#/components/schemas/optimizer-manager-ExperimentId'
        '400':
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
    get:
      summary: Find experiments
      description: Find experiments. You can filter the results by campaign type, status, author, or search for a string in the name, or declare the ID of the experiment.
      operationId: FindExperimentsV2
      tags:
      - Experiments
      x-snr-permissions:
      - OPTIMIZER_MANAGER_TESTOPTIMIZER_READ
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_test_optimizer
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/optimizer-manager-InQueryCampaignType'
      - $ref: '#/components/parameters/optimizer-manager-InQueryStatus'
      - $ref: '#/components/parameters/optimizer-manager-InQuerySearch'
      responses:
        '200':
          description: Experiments returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ExperimentV2Seq'
  /optimizer/v2/experiments/{id}:
    put:
      summary: Update experiment
      description: Update an existing experiment.
      operationId: UpdateExperimentV2
      tags:
      - Experiments
      x-snr-permissions:
      - OPTIMIZER_MANAGER_TESTOPTIMIZER_UPDATE
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_test_optimizer
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/optimizer-manager-InPathExperimentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/optimizer-manager-ExperimentCreateOrUpdateRequestV2'
      responses:
        '204':
          description: Experiment updated successfully
        '400':
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
        '404':
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
    get:
      summary: Get experiment
      description: Retrieve the details of an experiment.
      operationId: FindExperimentV2
      tags:
      - Experiments
      x-snr-permissions:
      - OPTIMIZER_MANAGER_TESTOPTIMIZER_READ
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_test_optimizer
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/optimizer-manager-InPathExperimentId'
      responses:
        '200':
          description: Extended experiment returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ExperimentDetailsResponseV2'
        '404':
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
    delete:
      summary: Delete experiment
      description: Delete an experiment permanently.
      operationId: DeleteExperimentV2
      tags:
      - Experiments
      x-snr-permissions:
      - OPTIMIZER_MANAGER_TESTOPTIMIZER_DELETE
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_test_optimizer
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/optimizer-manager-InPathExperimentId'
      responses:
        '204':
          description: Experiment deleted successfully
        '404':
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
  /optimizer/v2/experiments/{id}/start:
    post:
      summary: Start experiment
      description: Start an experiment (for paused experiments, use [this method](#operation/ResumeExperiment)).
      operationId: StartExperimentV2
      tags:
      - Experiments
      x-snr-permissions:
      - OPTIMIZER_MANAGER_TESTOPTIMIZER_EXECUTE
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_test_optimizer
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/optimizer-manager-InPathExperimentId'
      responses:
        '204':
          description: Experiment started successfully
        '400':
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
        '404':
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
  /optimizer/v2/experiments/{id}/stop:
    post:
      summary: Stop experiment
      description: Stop an experiment. It **cannot** be started again.
      operationId: StopExperimentV2
      tags:
      - Experiments
      x-snr-permissions:
      - OPTIMIZER_MANAGER_TESTOPTIMIZER_EXECUTE
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_test_optimizer
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/optimizer-manager-InPathExperimentId'
      responses:
        '204':
          description: Experiment stopped successfully
        '400':
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
        '404':
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
  /optimizer/v2/experiments/{id}/pause:
    post:
      summary: Pause experiment
      description: Pause an experiment. It can be resumed later.
      operationId: PauseExperimentV2
      tags:
      - Experiments
      x-snr-permissions:
      - OPTIMIZER_MANAGER_TESTOPTIMIZER_EXECUTE
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_test_optimizer
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/optimizer-manager-InPathExperimentId'
      responses:
        '204':
          description: Experiment paused successfully
        '400':
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
        '404':
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
  /optimizer/v2/experiments/{id}/resume:
    post:
      summary: Resume experiment
      description: Resume an experiment after it was paused.
      operationId: ResumeExperimentV2
      tags:
      - Experiments
      x-snr-permissions:
      - OPTIMIZER_MANAGER_TESTOPTIMIZER_EXECUTE
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_test_optimizer
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/optimizer-manager-InPathExperimentId'
      responses:
        '204':
          description: Experiment resumed successfully
        '400':
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
        '404':
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-Error'
  /optimizer/v2/experiments/{id}/duplicate:
    post:
      summary: Duplicate experiment
      description: Create a copy of an existing experiment. You can only duplicate experiments that are stopped.
      operationId: CopyExperimentV2
      tags:
      - Experiments
      x-snr-permissions:
      - OPTIMIZER_MANAGER_TESTOPTIMIZER_CREATE
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_test_optimizer
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/optimizer-manager-InPathExperimentId'
      responses:
        '200':
          description: ID of the created experiment
          content:
            application/json:
              schema:
                type: object
                properties:
                  experimentId:
                    $ref: '#/components/schemas/optimizer-manager-ExperimentId'
        '400':
          description: Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
        '404':
          description: Experiment not found. Check error message for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/optimizer-manager-ErrorV2'
  /v4/promotions/promotion/get-for-client:
    get:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - PROMOTIONS_LIST_PROMOTIONS_READ
      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.\n\n**IMPORTANT**: \n- 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.\n- The endpoint is limited to 25000 requests per minute (per workspace).\n"
      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: []
  /v4/promotions/promotion/duplicate:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_DUPLICATE_PROMOTIONS_CREATE
      tags:
      - Promotions
      summary: Duplicate existing promotion
      description: You can duplicate an existing promotion.
      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
  /v4/promotions/promotion/activate:
    post:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - PROMOTIONS_ACTIVATE_PROMOTIONS_UPDATE
      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.
      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: []
  /v4/promotions/promotion/batch-activate:
    post:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - PROMOTIONS_ACTIVATE_PROMOTIONS_UPDATE
      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.
      operationId: BatchActivate
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 200
              items:
                $ref: '#/components/schemas/promotions-promotionActivation'
        required: true
      responses:
        '200':
          description: Promotions activated
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
        '404':
          $ref: '#/components/responses/promotions-Promotion404'
        '409':
          $ref: '#/components/responses/promotions-WaitingForProfileLockReleaseError'
        '412':
          $ref: '#/components/responses/promotions-PromotionActivate412'
        '423':
          $ref: '#/components/responses/promotions-ProfilePromotionsBlockedError'
        '500':
          $ref: '#/components/responses/promotions-500'
      deprecated: false
      security:
      - JWT: []
  /v4/promotions/promotion/deactivate:
    post:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - PROMOTIONS_DEACTIVATE_PROMOTIONS_UPDATE
      tags:
      - Promotions
      summary: Deactivate a promotion
      description: A Profile can change the status of an activated promotion back to `assigned`.
      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: []
  /v4/promotions/promotion/batch-deactivate:
    post:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - PROMOTIONS_DEACTIVATE_PROMOTIONS_UPDATE
      tags:
      - Promotions
      summary: Batch deactivate promotions
      description: A Profile can change the status of a number of activated promotions back to `assigned`.
      operationId: BatchDeactivate
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 200
              items:
                $ref: '#/components/schemas/promotions-promotionActivation'
        required: true
      responses:
        '200':
          description: Promotions deactivated
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotions-PromotionResponseMessage'
              example:
                message: Promotions for profile not found
        '429':
          $ref: '#/components/responses/promotions-WaitingForProfileLockReleaseError'
      deprecated: false
      security:
      - JWT: []
  /v4/promotions/promotion/deactivate-all-for-client/{identifierType}/{identifierValue}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_DEACTIVATE_PROMOTIONS_UPDATE
      tags:
      - Promotions
      summary: Deactivate all promotions for a Profile as Workspace
      description: You can deactivate all promotions assigned to a Profile.
      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
  /v4/promotions/promotion/redeem:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_REDEEM_PROMOTIONS_CREATE
      tags:
      - Promotions
      summary: Redeem a promotion
      description: You can redeem a promotion and loyalty points.
      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: []
  /v4/promotions/promotion/batch-redeem:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_BATCH_REDEEM_PROMOTIONS_CREATE
      tags:
      - Promotions
      summary: Batch redeem promotions
      description: You can redeem up to 100 promotions and loyalty points relevant to them.
      operationId: BatchRedeemPromotions
      requestBody:
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 200
              items:
                $ref: '#/components/schemas/promotions-RedeemPromotionsRequest'
        required: true
      responses:
        '201':
          description: Promotion redeemed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotions-PromotionResponseMessage'
              example:
                message: Promotion redeemed successfully
        '209':
          description: Promotion is already redeemed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotions-PromotionResponseMessage'
              example:
                message: Promotion is already redeemed
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
        '404':
          description: Not found error
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/promotions-ProfileNotFoundErrorV1'
                - $ref: '#/components/schemas/promotions-PromotionNotFoundErrorV1'
        '409':
          $ref: '#/components/responses/promotions-WaitingForProfileLockReleaseError'
        '412':
          description: Unprocessable redemption
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/promotions-PromotionNotActivatedErrorV1'
                - $ref: '#/components/schemas/promotions-PromotionRedeemLimitExceededErrorV1'
                - $ref: '#/components/schemas/promotions-PromotionAlreadyRedeemedErrorV1'
        '423':
          $ref: '#/components/responses/promotions-ProfilePromotionsBlockedError'
      deprecated: false
      security:
      - JWT: []
  /v4/promotions/v2/promotion/get-for-client/{identifierType}/{identifierValue}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_LIST_PROMOTIONS_READ
      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.\n\n**IMPORTANT**: \n- 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.\n- The endpoint is limited to 25000 requests per minute (per workspace).\n"
      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: []
  /v4/promotions/promotion/get-item-for-client/{identifierType}/{identifierValue}:
    get:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_DETAILS_FOR_CLIENT_READ
      tags:
      - Promotions
      summary: View promotion details as Profile
      description: A Profile can view all the details of an assigned or activated promotion.
      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: []
  /v4/promotions/promotion/get-item-for-client-no-data/{identifierType}/{identifierValue}:
    get:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_DETAILS_FOR_CLIENT_READ
      tags:
      - Promotions
      summary: View promotion details as Profile
      description: A Profile can view all the details of an assigned or activated promotion.
      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: []
  /v4/promotions/promotion/list:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_LIST_PROMOTIONS_READ
      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.
      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: []
  /v4/promotions/promotion/diff-list:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_DIFF_LIST_PROMOTIONS_READ
      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.
      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: []
  /v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_LIST_PROMOTIONS_READ
      tags:
      - Promotions
      summary: Get a Profile's promotions as Workspace
      description: |
        **Deprecated.** Use [/v2/promotion/get-for-client/{identifierType}/{identifierValue}](#operation/GetAllClientPromotionsV2) instead.

        A Workspace can retrieve a list of all promotions assigned to a Profile.

        **IMPORTANT**:
        - As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 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).
      operationId: GetAllClientPromotions
      parameters:
      - $ref: '#/components/parameters/promotions-pathClientIdentifierType'
      - $ref: '#/components/parameters/promotions-pathIdentifierValue'
      - $ref: '#/components/parameters/promotions-queryPromotionSort'
      - name: status
        in: query
        description: Filter by promotion status. If not provided, defaults to ACTIVE. If status is not provided and no promotions are active, the response is an empty array.
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
            enum:
            - ACTIVE
            - ASSIGNED
            - REDEEMED
            default: ACTIVE
      - $ref: '#/components/parameters/promotions-queryTagNames'
      - $ref: '#/components/parameters/promotions-queryTarget'
      - $ref: '#/components/parameters/promotions-queryPromotionType'
      - $ref: '#/components/parameters/promotions-queryPromotionPresentOnly'
      - $ref: '#/components/parameters/promotions-queryLastingOnly'
      - $ref: '#/components/parameters/promotions-queryPromotionDisplayableOnly'
      - $ref: '#/components/parameters/promotions-queryLimit'
      - $ref: '#/components/parameters/promotions-queryPage'
      - $ref: '#/components/parameters/promotions-queryIncludeMeta'
      - $ref: '#/components/parameters/promotions-queryIncludeVouchers'
      - $ref: '#/components/parameters/promotions-queryStoreIds'
      responses:
        '200':
          description: An array of promotions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/promotions-promotionClientDataResponse'
                    description: An array of promotions
                  meta:
                    $ref: '#/components/schemas/promotions-responseMeta'
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
        '404':
          $ref: '#/components/responses/promotions-ClientNotFoundError'
      deprecated: true
      security:
      - JWT: []
  /v4/promotions/promotion/get-for-client-possible-to-redeem/{identifierType}/{identifierValue}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_REDEEM_PROMOTIONS_READ
      tags:
      - Promotions
      summary: Get redeemable promotions of a Profile
      description: "Retrieve all redeemable promotions related to a Profile.\n\n**IMPORTANT**: \n- 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.\n- The endpoint is limited to 25000 requests per minute (per workspace)."
      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: []
  /v4/promotions/promotion/{identifierType}/{identifierValue}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_DETAILS_FOR_PROFILE_PROMOTIONS_READ
      tags:
      - Promotions
      summary: Get promotion details as Workspace
      description: Retrieve the details of a promotion by its code.
      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: []
    put:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_DETAILS_FOR_PROFILE_PROMOTIONS_UPDATE
      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.
      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: []
  /v4/promotions/promotion/get-for-client-by-custom-settings/{identifierType}/{identifierValue}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_GET_FOR_CLIENT_BY_CUSTOM_SETTINGS_PROMOTIONS_READ
      tags:
      - Promotions
      summary: Get Profile promotions by a custom filter
      description: "Retrieve a list of promotions related to a Profile by a custom,\npre-defined filter.\n\nThe filter is maintained by your backend administrator.\n\n**IMPORTANT**: \n- 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.\n- The endpoint is limited to 25000 requests per minute (per workspace).\n"
      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: []
  /v4/promotions/promotion/activate-for-client/{identifierType}/{identifierValue}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_ACTIVATE_PROMOTIONS_UPDATE
      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.
      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: []
  /v4/promotions/promotion/batch-activate-for-client/{identifierType}/{identifierValue}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_BATCH_ACTIVATE_PROMOTIONS_UPDATE
      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.
      operationId: BatchActivateAsProfile
      parameters:
      - $ref: '#/components/parameters/promotions-pathClientIdentifierType'
      - $ref: '#/components/parameters/promotions-pathIdentifierValue'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 200
              items:
                $ref: '#/components/schemas/promotions-promotionActivation'
        required: true
      responses:
        '200':
          description: Promotions activated
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotions-PromotionResponseMessage'
              example:
                message: Promotions for profile not found
        '409':
          $ref: '#/components/responses/promotions-WaitingForProfileLockReleaseError'
        '412':
          $ref: '#/components/responses/promotions-PromotionActivate412'
        '500':
          $ref: '#/components/responses/promotions-500'
      deprecated: false
      security:
      - JWT: []
  /v4/promotions/promotion/deactivate-for-client/{identifierType}/{identifierValue}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_DEACTIVATE_PROMOTIONS_UPDATE
      tags:
      - Promotions
      summary: Deactivate a promotion as Workspace
      description: You can change the status of a Profile's activated promotion back to `assigned`.
      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: []
  /v4/promotions/promotion/batch-deactivate-for-client/{identifierType}/{identifierValue}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_BATCH_DEACTIVATE_PROMOTIONS_UPDATE
      tags:
      - Promotions
      summary: Batch deactivate promotions
      description: You can change the status of a number of Profile's activated promotions back to `assigned`.
      operationId: BatchDeactivateAsProfile
      parameters:
      - $ref: '#/components/parameters/promotions-pathClientIdentifierType'
      - $ref: '#/components/parameters/promotions-pathIdentifierValue'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 200
              items:
                $ref: '#/components/schemas/promotions-promotionActivation'
        required: true
      responses:
        '200':
          description: Promotions deactivated
          content:
            application/json:
              schema:
                type: object
                example: '{}'
              example: '{}'
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/promotions-PromotionResponseMessage'
              example:
                message: Promotions for profile not found
        '429':
          $ref: '#/components/responses/promotions-WaitingForProfileLockReleaseError'
      deprecated: false
      security:
      - JWT: []
  /v4/promotions/promotion:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_PROMOTIONS_CREATE
      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.
      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: []
    delete:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_PROMOTIONS_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.
      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: []
  /v4/promotions/promotion/create-or-update:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_PROMOTIONS_CREATE
      - PROMOTIONS_PROMOTIONS_UPDATE
      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.
      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: []
  /v4/promotions/promotion/locking/check-client:
    get:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - PROMOTIONS_CHECK_CLIENT_PROMOTIONS_READ
      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.
      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: []
  /v4/promotions/voucher/batch-redeem:
    post:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_BATCH_REDEEM_VOUCHERS_PROMOTIONS_CREATE
      tags:
      - Promotions
      summary: Batch redeem vouchers
      description: You can redeem up to 100 vouchers.
      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: []
  /v4/promotions/voucher/batch-redeem-for-profile:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_BATCH_REDEEM_VOUCHERS_PROMOTIONS_CREATE
      tags:
      - Promotions
      summary: Batch redeem vouchers for profiles
      description: You can redeem up to 100 vouchers.
      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: []
  /v4/promotions/v2/promotion/batch:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_IMPORT_PROMOTIONS_CREATE
      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.
      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: []
    delete:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_IMPORT_PROMOTIONS_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.  \nThis method doesn't check if a promotion with the provide code exists."
      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: []
  /v4/promotions/v2/sale/process-sale/{identifierType}/{identifierValue}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_SALE_PROMOTIONS_READ
      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.
      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'
  /v4/promotions/sale/process-checkout/{identifierType}/{identifierValue}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_SALE_PROMOTIONS_READ
      tags:
      - Promotions
      summary: Process checkout on POS
      description: |
        Assign checkout handbill coupons for a profile, based on items in the basket and historical transactions.

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

        **IMPORTANT**: When assigning handbill promotions, candidate promotions are bounded by configurable limits: at most 40,000 candidates are read per handbill slot (ordered by priority), and the total number of candidates sent to the recommendation (AI) engine in a single request is capped at 45,000. If the combined candidates across all slots exceed the AI request cap, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.
      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'
  /v4/promotions/v2/sale/process-anonymous-sale:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_SALE_PROMOTIONS_READ
      tags:
      - Promotions
      summary: Process anonymous Profile's basket
      description: Assign promotions to a basket and recalculate item values after discount.
      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'
  /v4/promotions/sale/process-anonymous-checkout:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_SALE_PROMOTIONS_READ
      tags:
      - Promotions
      summary: Process anonymous Profile's checkout on POS
      description: |
        Assign checkout handbill coupons for anonymous profile, based on items in basket and historical transactions.

        **IMPORTANT**: When assigning handbill promotions, candidate promotions are bounded by configurable limits: at most 40,000 candidates are read per handbill slot (ordered by priority), and the total number of candidates sent to the recommendation (AI) engine in a single request is capped at 45,000. If the combined candidates across all slots exceed the AI request cap, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.
      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'
  /v4/promotions/handbill:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_personalised_promotions
      x-snr-permissions:
      - PROMOTIONS_HANDBILL_READ
      tags:
      - Handbills
      summary: Get all handbill configurations
      description: Retrieve a list of all handbill configurations available in the current Workspace.
      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: []
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_personalised_promotions
      x-snr-permissions:
      - PROMOTIONS_HANDBILL_CREATE
      tags:
      - Handbills
      summary: Create handbill configuration
      description: Create a new handbill configuration for use in handbill-type promotions.
      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'
        '422':
          $ref: '#/components/responses/promotions-Validation422'
  /v4/promotions/handbill/{handbillUuid}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_personalised_promotions
      x-snr-permissions:
      - PROMOTIONS_HANDBILL_READ
      tags:
      - Handbills
      summary: Get handbill configuration
      description: Retrieve the details of a single handbill configuration.
      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'
    patch:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_personalised_promotions
      x-snr-permissions:
      - PROMOTIONS_HANDBILL_UPDATE
      tags:
      - Handbills
      summary: Update handbill configuration
      description: Update an existing handbill configuration.
      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'
        '422':
          $ref: '#/components/responses/promotions-Validation422'
  /v4/promotions/promotion/get-for-client/handbill/{handbillUuid}:
    get:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - PROMOTIONS_FOR_CLIENT_HANDBILL_READ
      tags:
      - Handbills
      summary: Generate handbill for Profile
      description: "Assign handbill promotions to a Profile. They can be randomized or suggested by the AI engine.\n\n**IMPORTANT**: \n- The endpoint is limited to 1000 requests per minute (per workspace).\n- The algorithm that selects promotions for assignment candidates applies all the following filters:\n    - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.\n    - 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. \n    - Promotions can't currently be assigned within another handbill campaign.\n    - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.\n    - 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.\n    - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)\n    - 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).\n    - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.\n    - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.\n    - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.\n    - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n"
      operationId: getHandbillForClient_GET
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/promotions-pathHandbillUuid'
      - $ref: '#/components/parameters/promotions-queryLimit'
      - $ref: '#/components/parameters/promotions-queryPage'
      - $ref: '#/components/parameters/promotions-queryPromotionFields'
      responses:
        '200':
          description: A list of handbill-type promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: '#/components/schemas/promotions-promotionClientDataResponse'
                  meta:
                    $ref: '#/components/schemas/promotions-responseMeta'
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
        '409':
          $ref: '#/components/responses/promotions-WaitingForProfileLockReleaseError'
  /v4/promotions/promotion/get-for-client/handbills:
    get:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - PROMOTIONS_FOR_CLIENT_HANDBILL_READ
      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.\n\n**IMPORTANT**: \n- The endpoint is limited to 1000 requests per minute (per workspace).\n- The algorithm that selects promotions for assignment candidates applies all the following filters:\n    - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.\n    - 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. \n    - Promotions can't currently be assigned within another handbill campaign.\n    - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.\n    - 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.\n    - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)\n    - 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).\n    - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.\n    - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.\n    - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.\n    - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n"
      operationId: getBatchHandbillForClient_GET
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/promotions-queryHandbillUuid'
      - $ref: '#/components/parameters/promotions-queryPage'
      - $ref: '#/components/parameters/promotions-queryLimit'
      - $ref: '#/components/parameters/promotions-queryIncludeMeta'
      - $ref: '#/components/parameters/promotions-queryPromotionFields'
      responses:
        '200':
          description: A list of handbill-type promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: '#/components/schemas/promotions-promotionClientDataResponse'
                  meta:
                    $ref: '#/components/schemas/promotions-responseMeta'
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
        '409':
          $ref: '#/components/responses/promotions-WaitingForProfileLockReleaseError'
  /v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_personalised_promotions
      x-snr-permissions:
      - PROMOTIONS_FOR_CLIENT_HANDBILL_READ
      tags:
      - Handbills
      summary: Generate handbill for Profile and get Profile promotions
      description: "**Deprecated.** Use [/v2/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}](#operation/getHandbillForClientV2_GET) instead.\n\nAssign a handbill to a Profile and retrieve a list of promotions assigned to the Profile.\n\n**IMPORTANT**:\n- The endpoint is limited to 1000 requests per minute (per workspace).\n- The algorithm that selects promotions for assignment candidates applies all the following filters:\n    - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.\n    - 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. \n    - Promotions can't currently be assigned within another handbill campaign.\n    - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.\n    - 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.\n    - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)\n    - 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).\n    - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.\n    - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.\n    - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.\n    - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n"
      operationId: getAssignHandbillForClient_GET
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/promotions-pathClientIdentifierType'
      - $ref: '#/components/parameters/promotions-pathIdentifierValue'
      - $ref: '#/components/parameters/promotions-pathHandbillUuid'
      - $ref: '#/components/parameters/promotions-queryPromotionType'
      - $ref: '#/components/parameters/promotions-queryPromotionStatus'
      - $ref: '#/components/parameters/promotions-queryVisibilityStatus'
      - $ref: '#/components/parameters/promotions-queryTagNames'
      - $ref: '#/components/parameters/promotions-queryTarget'
      - $ref: '#/components/parameters/promotions-queryPromotionPresentOnly'
      - $ref: '#/components/parameters/promotions-queryLastingOnly'
      - $ref: '#/components/parameters/promotions-queryPage'
      - $ref: '#/components/parameters/promotions-queryLimit'
      - $ref: '#/components/parameters/promotions-queryHandbillSort'
      - $ref: '#/components/parameters/promotions-queryIncludeMeta'
      - $ref: '#/components/parameters/promotions-queryPromotionFields'
      responses:
        '200':
          description: A list of promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: '#/components/schemas/promotions-promotionClientDataResponse'
                  meta:
                    $ref: '#/components/schemas/promotions-responseMeta'
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
      deprecated: true
  /v4/promotions/v2/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_personalised_promotions
      x-snr-permissions:
      - PROMOTIONS_FOR_CLIENT_HANDBILL_READ
      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.\n\n**IMPORTANT**: \n- The endpoint is limited to 1000 requests per minute (per workspace).\n- The algorithm that selects promotions for assignment candidates applies all the following filters:\n    - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.\n    - 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. \n    - Promotions can't currently be assigned within another handbill campaign.\n    - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.\n    - 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.\n    - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)\n    - 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).\n    - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.\n    - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.\n    - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.\n    - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n"
      operationId: getHandbillForClientV2_GET
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/promotions-pathClientIdentifierType'
      - $ref: '#/components/parameters/promotions-pathIdentifierValue'
      - $ref: '#/components/parameters/promotions-pathHandbillUuid'
      - $ref: '#/components/parameters/promotions-queryLimit'
      - $ref: '#/components/parameters/promotions-queryPage'
      responses:
        '200':
          description: A list of handbill-type promotions assigned to this profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of promotions
                    items:
                      $ref: '#/components/schemas/promotions-promotionClientDataResponse'
                  meta:
                    $ref: '#/components/schemas/promotions-responseMeta'
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
        '409':
          $ref: '#/components/responses/promotions-WaitingForProfileLockReleaseError'
  /v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}/with-handbills:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_personalised_promotions
      x-snr-permissions:
      - PROMOTIONS_FOR_CLIENT_HANDBILL_READ
      tags:
      - Handbills
      summary: Generate batch handbill for Profile and get Profile promotions
      description: "\nAssign a batch handbill to a Profile and retrieve a list of promotions assigned to the Profile.\n\n**IMPORTANT**: \n- The endpoint is limited to 1000 requests per minute (per workspace).\n- The algorithm that selects promotions for assignment candidates applies all the following filters:\n    - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.\n    - 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. \n    - Promotions can't currently be assigned within another handbill campaign.\n    - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.\n    - 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.\n    - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)\n    - 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).\n    - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.\n    - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.\n    - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.\n    - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n"
      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'
  /v4/promotions/settings:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_personalised_promotions
      x-snr-permissions:
      - PROMOTIONS_SETTINGS_PROMOTIONS_READ
      tags:
      - Promotion settings
      summary: Get settings for current Workspace
      operationId: endpointSettingsGetSettingsGET
      parameters:
      - in: query
        name: only
        required: false
        description: |
          Return only the settings property at this dotted path (e.g. `saleSettings.discountOrder.strategy`) instead of the whole settings object. Responds with 404 when the property is not defined.
        schema:
          type: string
          pattern: ^[A-Za-z0-9]+(\.[A-Za-z0-9]+)*$
        example: saleSettings.combineBasketDiscounts
      - in: query
        name: withDefaults
        required: false
        description: |
          When true, missing values are filled from the server-side defaults before the response is built. Combined with `only`, a property that has a configured default resolves even when the Workspace has not stored it; a property without a default still responds with 404.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/promotions-promotionsSettingsBody'
              example:
                data:
                  expression: xxxxxxx-d047-40fd-99c8-yyyyxxxxyyy
                  blockTag: BLOCK_PROMOTIONS
                  checkoutSettings:
                    handbilUuids:
                    - 1eb6c8f0-dc7a-4d9c-9e0e-bb995ee87699
                  cashbackSettings:
                    exchangeRate: 10
                    limits:
                      minPoints: 10
                      maxPoints: 100
                      maxTransactionAmount: 80
                      maxTransactionPercentage: 60
                  promotionListSettings:
                    fields:
                    - code
                    - possibleRedeems
                    - lastingAt
                    - vouchers
                    sort: NONE
                    limit: 200
                    where:
                      status:
                      - ASSIGNED
                      - ACTIVE
                      type:
                      - CUSTOM
                      - MEMBERS_ONLY
                      - HANDBILL
                      target:
                      - ALL
                      - SEGMENT
                      tagNames: null
                      lastingOnly: true
                      presentOnly: true
                      statusByType:
                        CUSTOM:
                        - ACTIVE
                        HANDBILL:
                        - ASSIGNED
                      targetByType:
                        CUSTOM:
                        - ALL
                        HANDBILL:
                        - ALL
                        MEMBERS_ONLY:
                        - SEGMENT
                      visibilityStatus:
                      - PUBLISH
                      - HIDDEN
        '400':
          $ref: '#/components/responses/promotions-400'
        '401':
          $ref: '#/components/responses/promotions-401'
        '403':
          $ref: '#/components/responses/promotions-403'
        '404':
          $ref: '#/components/responses/promotions-404'
    put:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_personalised_promotions
      x-snr-permissions:
      - PROMOTIONS_SETTINGS_PROMOTIONS_UPDATE
      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.
      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'
  /v4/promotions/lock/create-points-lock-for-client/{identifierType}/{identifierValue}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_LOCK_UPDATE
      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.  \nThis lock is released with the [\"Release point lock for profile\" endpoint](#operation/endpointLockReleaseLockForClientPOST) or when its TTL (defined in the query parameters) expires.\n"
      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'
  /v4/promotions/lock/release-points-lock-for-client/{identifierType}/{identifierValue}/{lockIdentifier}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_LOCK_UPDATE
      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.
      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'
  /v4/promotions/lock/release-promotion-requested-lock-for-client/{identifierType}/{identifierValue}/{lockIdentifier}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - campaigns_promotions
      x-snr-permissions:
      - PROMOTIONS_LOCK_UPDATE
      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.
      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'
  /v4/promotions/v2/points/transfer:
    post:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups: []
      x-snr-permissions:
      - PROMOTIONS_POINTS_TRANSFER_EXECUTE
      tags:
      - Promotions points
      summary: Transfer points to another profile
      description: With this method, a profile can send some of their points to another profile.
      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'
  /push-devices/web-push/clean-up/{clientId}:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      security:
      - JWT: []
      x-snr-groups:
      - client_detail
      x-snr-permissions:
      - PUSH_DEVICES_SERVICE_WEB_PUSH_DEVICES_DELETE
      tags:
      - Profile devices
      operationId: cleanUpWebPushSubscriber
      summary: |
        Clean up web push tokens
      description: "Remove mobile push Firebase tokens from profile. You can use this endpoint to clean up tokens updated before a selected date or by service worker version. \n\nUsing this endpoint generates a `webpush.tokenDelete` event for each deleted token.\n\nIf no tokens are left after the clean-up, the `has_webpush_devices` attribute in the profile is set to false.\n"
      parameters:
      - $ref: '#/components/parameters/push-devices-service-pathClientId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/push-devices-service-WebPushCleanupRequest'
        required: true
      responses:
        '200':
          description: Tokens deleted
        4xx:
          $ref: '#/components/responses/push-devices-service-4xx'
  /push-devices/mobile-push-subscriber/clean-up/{clientId}:
    post:
      x-snr-scopes:
      - USER
      - PROFILE
      security:
      - JWT: []
      x-snr-groups:
      - client_detail
      x-snr-permissions:
      - PUSH_DEVICES_SERVICE_MOBILE_PUSH_DEVICES_DELETE
      tags:
      - Profile devices
      operationId: cleanUpMobilePushSubscriber
      summary: Clean up mobile push tokens
      description: "Remove mobile push Firebase tokens from profile. You can use this endpoint to clean up tokens updated before a selected date. \n\nUsing this endpoint generates a `push.tokenDelete` event for each deleted token.  \n\nIf no tokens are left after the clean-up, the `has_mobile_push_devices` attribute in the profile is set to false.\n"
      parameters:
      - $ref: '#/components/parameters/push-devices-service-pathClientId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/push-devices-service-MobilePushCleanupRequest'
        required: true
      responses:
        '200':
          description: Tokens deleted
        4xx:
          $ref: '#/components/responses/push-devices-service-4xx'
  /push-devices/clients/by-uuid/{identifierValue}/linked-devices:
    post:
      x-snr-scopes:
      - PROFILE
      - CLIENT
      - ANONYMOUS_CLIENT
      security:
      - JWT: []
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_BY_IDENTIFY_DEVICE_CLIENT_UPDATE
      summary: Link a device by other parameters
      description: ' Assign a device to a profile UUID. A profile may have many devices assigned. If request is made by PROFILE or ANONYMOUS_PROFILE uuid is taken from jwt token.'
      operationId: LinkAClientDeviceByClientUuid
      parameters:
      - name: identifierType
        in: path
        required: true
        description: The profile identifier to use for the request
        schema:
          type: string
          enum:
          - by-customId
          - by-uuid
      - $ref: '#/components/parameters/push-devices-service-pathIdentifierValue'
      - $ref: '#/components/parameters/push-devices-service-acceptHeader'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/push-devices-service-LinkaClientdeviceRequest'
        required: true
      responses:
        '202':
          description: Request accepted
          headers: {}
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/push-devices-service-HTTP400'
              example:
                error: Bad Request
                status: 400
                timestamp: '2020-10-29T12:34:02.222Z'
                path: /clients/by-uuid/779465fc-a0c5-41e5-9be2-51c00b2588b4/linked-devices
                message: Some fields did not pass validation
                errors:
                - code: 12301
                  field: deviceId
                  message: '12301'
        '401':
          $ref: '#/components/responses/push-devices-service-401'
        '404':
          description: Profile not found
        '403':
          $ref: '#/components/responses/push-devices-service-403'
        '415':
          $ref: '#/components/responses/push-devices-service-415'
      deprecated: false
      tags:
      - Profile devices
  /push-devices/clients/linked-devices:
    post:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      security:
      - JWT: []
      x-snr-groups:
      - client_info
      x-snr-permissions:
      - API_PERSONAL_DEVICE_CLIENT_UPDATE
      summary: Link a device by other parameters
      description: ' Assign a device to a profile UUID from JWT token. A profile may have many devices assigned.'
      operationId: LinkAClientDeviceByClientUuidFromJwtToken
      parameters:
      - name: identifierType
        in: path
        required: true
        description: The profile identifier to use for the request
        schema:
          type: string
          enum:
          - by-customId
          - by-uuid
      - $ref: '#/components/parameters/push-devices-service-pathIdentifierValue'
      - $ref: '#/components/parameters/push-devices-service-acceptHeader'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/push-devices-service-LinkaClientdeviceRequest'
        required: true
      responses:
        '202':
          description: Request accepted
          headers: {}
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/push-devices-service-HTTP400'
              example:
                error: Bad Request
                status: 400
                timestamp: '2020-10-29T12:34:02.222Z'
                path: /clients/linked-devices
                message: Some fields did not pass validation
                errors:
                - code: 12301
                  field: deviceId
                  message: '12301'
        '401':
          $ref: '#/components/responses/push-devices-service-401'
        '404':
          description: Profile not found
        '403':
          $ref: '#/components/responses/push-devices-service-403'
        '415':
          $ref: '#/components/responses/push-devices-service-415'
      deprecated: false
      tags:
      - Profile devices
  /search/v2/indices/{indexId}/rules:
    get:
      summary: Get rules
      description: Retrieves a list of rules.
      operationId: GetRulesV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - QUERY_RULES_SEARCH_READ
      tags:
      - Query Rules
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/query-rules-v2-inPathIndexId'
      - $ref: '#/components/parameters/query-rules-v2-statusFilter'
      - $ref: '#/components/parameters/query-rules-v2-nameFilter'
      - $ref: '#/components/parameters/query-rules-v2-paginationPage'
      - $ref: '#/components/parameters/query-rules-v2-paginationLimit'
      - $ref: '#/components/parameters/query-rules-v2-paginationSortBy'
      - $ref: '#/components/parameters/query-rules-v2-paginationOrdering'
      - $ref: '#/components/parameters/query-rules-v2-paginationIncludeMeta'
      - $ref: '#/components/parameters/query-rules-v2-inQueryDirectoryId'
      - $ref: '#/components/parameters/query-rules-v2-InQuerySearch'
      - $ref: '#/components/parameters/query-rules-v2-consequenceTypeFilter'
      responses:
        '200':
          description: List of rules
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-PaginatedRules'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
    post:
      summary: Create rule
      description: Creates a new rule.
      operationId: PostRuleV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - QUERY_RULES_SEARCH_CREATE
      tags:
      - Query Rules
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/query-rules-v2-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/query-rules-v2-postRuleBody'
      responses:
        '200':
          description: ID of the new rule
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-RuleWithStatus'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
  /search/v2/indices/{indexId}/rules/{ruleId}:
    get:
      summary: Get rule
      description: Retrieves a rule.
      operationId: GetRuleV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - QUERY_RULES_SEARCH_CREATE
      tags:
      - Query Rules
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/query-rules-v2-inPathIndexId'
      - $ref: '#/components/parameters/query-rules-v2-inPathRuleId'
      responses:
        '200':
          description: Query rule returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-RuleWithStatus'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
    put:
      summary: Update query rule
      description: Updates a rule identified by `id`.
      operationId: PutRuleV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - QUERY_RULES_SEARCH_UPDATE
      tags:
      - Query Rules
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/query-rules-v2-inPathIndexId'
      - $ref: '#/components/parameters/query-rules-v2-inPathRuleId'
      requestBody:
        $ref: '#/components/requestBodies/query-rules-v2-postRuleBody'
      responses:
        '200':
          description: Query rule updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-RuleWithStatus'
        '409':
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
    delete:
      summary: Delete rule
      description: Deletes a rule identified by `id`.
      operationId: DeleteRuleV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - QUERY_RULES_SEARCH_DELETE
      tags:
      - Query Rules
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/query-rules-v2-inPathIndexId'
      - $ref: '#/components/parameters/query-rules-v2-inPathRuleId'
      responses:
        '204':
          description: Query rule deleted
        '409':
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
  /search/v2/indices/{indexId}/rules/{ruleId}/activate:
    post:
      summary: Activate rule
      description: Activates a rule identified by `id`.
      operationId: ActivateRuleV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - QUERY_RULES_SEARCH_UPDATE
      tags:
      - Query Rules
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/query-rules-v2-inPathIndexId'
      - $ref: '#/components/parameters/query-rules-v2-inPathRuleId'
      responses:
        '204':
          description: Query rule activated
        '409':
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
  /search/v2/indices/{indexId}/rules/{ruleId}/pause:
    post:
      summary: Pause rule
      description: Pauses a rule identified by `id`.
      operationId: PauseRuleV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - QUERY_RULES_SEARCH_UPDATE
      tags:
      - Query Rules
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/query-rules-v2-inPathIndexId'
      - $ref: '#/components/parameters/query-rules-v2-inPathRuleId'
      responses:
        '204':
          description: Query rule paused
        '409':
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
  /search/v2/indices/{indexId}/rules/{ruleId}/draft:
    post:
      summary: Draft rule
      description: Marks a rule as draft.
      operationId: DraftRuleV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - QUERY_RULES_SEARCH_UPDATE
      tags:
      - Query Rules
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/query-rules-v2-inPathIndexId'
      - $ref: '#/components/parameters/query-rules-v2-inPathRuleId'
      responses:
        '204':
          description: Query rule marked as draft
        '409':
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
  /search/v2/indices/{indexId}/rules/{ruleId}/finish:
    post:
      summary: Finish rule
      description: Marks a rule as finished. The rule becomes inactive and can never be activated again.
      operationId: FinishRuleV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - QUERY_RULES_SEARCH_UPDATE
      tags:
      - Query Rules
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/query-rules-v2-inPathIndexId'
      - $ref: '#/components/parameters/query-rules-v2-inPathRuleId'
      responses:
        '204':
          description: Query rule marked as finished
        '409':
          description: The rule is inherited from the parent index and cannot be modified on the child index
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/query-rules-v2-Error'
  /recommendations/v2/campaigns:
    get:
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - RECOMMENDATIONS_V2_MANY_CAMPAIGN_READ
      summary: Get all recommendation campaigns
      description: Fetch all recommendation campaigns.
      operationId: GetRecommendationCampaignsV2
      tags:
      - Recommendation campaigns
      x-snr-scopes:
      - PROFILE
      - USER
      security:
      - JWT: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
          minimum: 1
          default: 1
      - name: limit
        in: query
        required: false
        description: Maximum number of campaigns on a page
        schema:
          type: integer
          default: 50
      - name: sortBy
        in: query
        required: false
        description: Name of the field by which data will be sorted
        schema:
          type: string
          default: createdAt
          enum:
          - createdAt
          - updatedAt
          - startDate
          - endDate
          - state
          - type
      - name: ordering
        in: query
        required: false
        description: Sorting order
        schema:
          type: string
          default: desc
          enum:
          - asc
          - desc
      - name: includeMeta
        in: query
        required: false
        description: |
          If true, a `meta` JSON block with pagination data is included in the response body.
          If false, the pagination data is included in the response headers.
        schema:
          type: boolean
          default: false
      - name: type
        in: query
        required: false
        description: Filters the results by campaign type.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Shows only results with states matching this parameter. When this parameter is omitted, all campaigns are returned regardless of state.
        schema:
          type: array
          items:
            type: string
            enum:
            - draft
            - active
            - paused
      - name: search
        in: query
        required: false
        description: Searches campaigns by the specified phrase in their `id` and `title`.
        schema:
          type: string
      responses:
        '200':
          description: Returns paginated campaigns. If `showMeta` was set to `true`, the metadata is included in the JSON response. If it was set to `false`, the metadata is included in the headers.
          headers:
            Link:
              description: Links to neighboring pages, first page, and last page in pagination
              schema:
                type: string
            X-Pagination-Total-Count:
              description: Total number of campaigns
              schema:
                type: integer
            X-Pagination-Total-Pages:
              description: Total number of pages
              schema:
                type: integer
            X-Pagination-Page:
              description: The current page
              schema:
                type: integer
            X-Pagination-Limit:
              description: Maximal number of items on a page
              schema:
                type: integer
            X-Pagination-Sorted-By:
              description: The column (attribute) that the campaigns were sorted by
              schema:
                type: string
            X-Pagination-Ordering:
              description: Sorting order
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-RecommendationCampaignsResponseV2'
        '404':
          description: Could not find campaigns
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
    post:
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - RECOMMENDATIONS_V2_CAMPAIGN_CREATE
      summary: Create a recommendation campaign
      description: Create a new recommendation campaign.
      operationId: CreateRecommendationCampaignV2
      tags:
      - Recommendation campaigns
      x-snr-scopes:
      - PROFILE
      - USER
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/recommendation-campaigns-SimilarRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-MetricsRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-CrossSellRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-SetComplementRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-LastViewedRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-PersonalizedRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-VisuallySimilarRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-ItemComparisonRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-SectionRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-AttributeRecommendationCampaignsCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-ExternalItemsRecommendationCampaignCreateRequestV2'
              - $ref: '#/components/schemas/recommendation-campaigns-NextInteractionRecommendationCampaignsCreateRequestV2'
        description: All the details of a campaign
        required: true
      responses:
        '200':
          description: OK campaign has been returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
  /recommendations/v2/campaigns/{campaignId}:
    parameters:
    - $ref: '#/components/parameters/recommendation-campaigns-campaignId'
    get:
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - RECOMMENDATIONS_V2_SINGLE_CAMPAIGN_READ
      summary: Get recommendation campaign details
      description: Retrieve the details of a single campaign.
      operationId: GetRecommendationCampaignV2
      tags:
      - Recommendation campaigns
      x-snr-scopes:
      - PROFILE
      - USER
      security:
      - JWT: []
      responses:
        '200':
          description: Data of a single campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2'
        '404':
          description: Could not find campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
    post:
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - RECOMMENDATIONS_V2_CAMPAIGN_UPDATE
      summary: Update a recommendation campaign
      description: |
        Update a recommendation campaign by changing the parameters or copying the definition from another campaign.

        When you copy from another campaign:
        - the following campaign data is NOT updated:
          - `title`
          - `state`
          - `start_date`
          - `end_date`
          - `campaignId`
          - `createdAt`
        - `modified_by_user_id` changes to the user who performed the update
      operationId: UpdateRecommendationCampaignV2
      tags:
      - Recommendation campaigns
      x-snr-scopes:
      - PROFILE
      - USER
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendation-campaigns-RecommendationCampaignUpdateRequest'
        description: Definition of the updated campaign.
        required: true
      responses:
        '200':
          description: Campaign updated and returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2'
        '404':
          description: Could not find campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
    delete:
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - RECOMMENDATIONS_V2_CAMPAIGN_DELETE
      summary: Delete a recommendation campaign
      description: Delete a recommendation campaign. This operation is irreversible.
      operationId: DeleteRecommendationCampaign
      tags:
      - Recommendation campaigns
      x-snr-scopes:
      - PROFILE
      - USER
      security:
      - JWT: []
      responses:
        '200':
          description: OK campaign has been deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2'
        '404':
          description: Could not find campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
  /recommendations/v2/campaigns/state:
    post:
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - RECOMMENDATIONS_V2_STATE_CAMPAIGN_UPDATE
      summary: Change campaigns' states
      description: Change the status of one or more campaigns.
      operationId: UpdateRecommendationsStatesV2
      tags:
      - Recommendation campaigns
      x-snr-scopes:
      - PROFILE
      - USER
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendation-campaigns-RecommendationStateChangeRequestV2'
        description: List of updated campaign IDs and new states.
        required: true
      responses:
        '200':
          description: Campaigns status changed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-RecommendationStateChangeResponseV2'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
  /recommendations/v2/campaigns/{campaignId}/copy:
    post:
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - RECOMMENDATIONS_V2_COPY_CAMPAIGN_CREATE
      summary: Copy a recommendation campaign
      description: Copy a campaign. The copied campaign's `state` will be `draft` and `slug` will be undefined.
      operationId: CopyRecommendationCampaignV2
      tags:
      - Recommendation campaigns
      x-snr-scopes:
      - PROFILE
      - USER
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendation-campaigns-campaignId'
      responses:
        '200':
          description: Copy created and returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2'
        '404':
          description: Could not find campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
  /recommendations/v2/campaigns/simplified:
    get:
      x-snr-groups:
      - campaigns_recommendations
      x-snr-permissions:
      - RECOMMENDATIONS_V2_MANY_SIMPLIFIED_CAMPAIGN_READ
      summary: Get simplified recommendation campaigns
      description: Fetch simplified recommendation campaign data.
      operationId: GetSimplifiedRecommendationCampaign
      tags:
      - Recommendation campaigns
      x-snr-scopes:
      - PROFILE
      - USER
      security:
      - JWT: []
      parameters:
      - name: type
        in: query
        description: Filter by campaign type.
        required: false
        schema:
          type: array
          items:
            type: string
      - name: state
        in: query
        description: Filter by states.
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - draft
            - active
            - paused
      responses:
        '200':
          description: Simplified campaigns returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-SimpleRecommendationCampaignsV2'
        '404':
          description: Could not find campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
        '500':
          description: An error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendation-campaigns-Error'
  /recommendations/v2/recommend/campaigns/{campaignIdentifier}:
    get:
      summary: Get recommendations by campaign
      description: |
        This method allows you to retrieve recommendations based on a campaignID or a slug and a context. The context is built based on:

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


          This is the recommended and simplest way to fetch recommendations.

          Before you use this method, you must to create a recommendations campaign in Synerise. All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.
      operationId: GetRecommendationsByCampaignV2
      security:
      - TrackerKey: []
      - JWT: []
      tags:
      - Recommendations
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-permissions:
      - API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_READ
      x-snr-groups: []
      parameters:
      - $ref: '#/components/parameters/recommendations-api-materializer-campaignIdentifier'
      - in: query
        name: clientUUID
        description: |
          Profile UUID. This parameter is required for these recommendation types:
            - Personalized
            - Last seen
            - Recent interactions
            - Section
            - Attribute

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

          - required for similar/complementary items campaigns.

          - optional for personalized campaigns.

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

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

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

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

          You can repeat this parameter to pass multiple external items.

          This parameter is used with campaigns of type "external-items".
        required: false
        schema:
          type: string
      - name: itemIdExcluded
        in: query
        description: IDs of items that will be excluded from the generated recommendations. For example, items already added to the basket.
        required: false
        schema:
          type: string
      - name: additionalFilters
        in: query
        required: false
        schema:
          type: string
        description: "<hr>\n<strong>IMPORTANT</strong>:\n\n- The `filtersJoiner` attribute is REQUIRED when `additionalFilters` is included. If `filtersJoiner` is missing, the additional filters do not work.  \n- Do NOT send multiple instances of this parameter.\n\n<hr>\n\nAdditional filters. These are merged with the campaign's own filters according to the logic in `filtersJoiner`.\n\nThis parameter must include all the additional filters as a single string, for example `additionalFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).\n"
        example: effectivePrice>300 AND effectivePrice<400
      - name: filtersJoiner
        in: query
        required: false
        schema:
          type: string
          enum:
          - AND
          - OR
          - REPLACE
        description: |
          Defines the logic of merging `additionalFilters` with the campaign's existing filters.
          - `REPLACE` replaces the campaign's filters with your filters.
          - `AND` matches if both your filters and the campaign filters are met.
          - `OR` matches if at least one of the filters is met.
      - name: additionalElasticFilters
        in: query
        required: false
        schema:
          type: string
        description: "<hr>\n<strong>IMPORTANT</strong>:\n\n- The `elasticFiltersJoiner` attribute is REQUIRED when `additionalElasticFilters` is included. If `elasticFiltersJoiner` is missing, the additional filters do not work.  \n- Do NOT send multiple instances of this parameter.\n\n<hr>\n\nAdditional elastic filters. These are merged with the campaign's own elastic filters according to the logic in `elasticFiltersJoiner`.\n\nThis parameter must include all the additional filters as a single string, for example `additionalElasticFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).\n"
        example: effectivePrice>300 AND effectivePrice<400
      - name: elasticFiltersJoiner
        in: query
        required: false
        schema:
          type: string
          enum:
          - AND
          - OR
          - REPLACE
        description: |
          Defines the logic of merging `additionalElasticFilters` with the campaign's existing elastic filters.
          - `REPLACE` replaces the campaign's filters with your filters.
          - `AND` matches if both your filters and the campaign filters are met.
          - `OR` matches if at least one of the filters is met.
      - name: displayAttribute
        in: query
        required: false
        schema:
          type: string
        description: Item attribute whose value will be returned in the recommendation response. The parameter value will be merged with the configuration of the recommendation. This parameter can be passed multiple times.
      - name: includeContextItems
        in: query
        description: When true, the recommendation response will include context items metadata.
        required: false
        schema:
          type: boolean
      - $ref: '#/components/parameters/recommendations-api-materializer-paramsMaterializer'
      responses:
        '200':
          description: Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer'
        '404':
          $ref: '#/components/responses/recommendations-api-materializer-404cannotGenerate'
        '500':
          $ref: '#/components/responses/recommendations-api-materializer-500error'
  /recommendations/v2/recommend/campaigns:
    post:
      summary: Get recommendations by campaign
      description: |
        This method allows you to retrieve recommendations based on a campaignID or slug and a context. The context is built based on:

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

        This is the recommended and simplest way to fetch recommendations.

        Before you use this method, you must to create a recommendations campaign in Synerise. All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.
      operationId: PostRecommendationsByCampaignV2
      security:
      - TrackerKey: []
      - JWT: []
      tags:
      - Recommendations
      x-snr-scopes:
      - LEGACY_AI_KEY
      - TRACKER
      - PROFILE
      x-snr-permissions:
      - API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_READ
      x-snr-groups: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-api-materializer-PostRecommendationsRequest'
      responses:
        '200':
          description: Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer'
        '404':
          $ref: '#/components/responses/recommendations-api-materializer-404cannotGenerate'
        '500':
          $ref: '#/components/responses/recommendations-api-materializer-500error'
  /recommendations/v2/recommend/campaigns/{campaignIdentifier}/by/{identifierName}:
    post:
      summary: Get recommendations by campaign and profile identifier
      description: |2

        **Before you use this method**: you must [create a recommendations campaign in Synerise](https://help.synerise.com/docs/campaign/recommendations-v2/). All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.

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

        - campaign identifier (required)
        - identifierName (required)
        - identifierValue (required)
        - items (for example, items currently in the basket)
        - item exclusions
      operationId: PostRecommendationsByCampaignAndidentifierNameV2
      security:
      - JWT: []
      tags:
      - Recommendations
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-permissions:
      - API_MATERIALIZER_V2_RECOMMEND_WITH_CUSTOM_ID_RECOMMENDATIONS_READ
      x-snr-groups:
      - campaigns_recommendations
      parameters:
      - $ref: '#/components/parameters/recommendations-api-materializer-campaignIdentifier'
      - $ref: '#/components/parameters/recommendations-api-materializer-identifierName'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-api-materializer-PostRecommendationsWithIdentifierValueRequest'
      responses:
        '200':
          description: Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer'
        '404':
          $ref: '#/components/responses/recommendations-api-materializer-404cannotGenerate'
        '500':
          $ref: '#/components/responses/recommendations-api-materializer-500error'
  /recommendations/v2/recommend/campaigns/preview:
    post:
      summary: Preview campaign recommendations
      description: |
        This method allows you to preview recommendations for a campaign with a given configuration before creating it.

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

        The recommendation context is built based on:
        - profile UUID
        - items
        - item exclusions
      operationId: PostPreviewRecommendations
      security:
      - TrackerKey: []
      - JWT: []
      tags:
      - Recommendations
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-permissions:
      - API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_PREVIEW_READ
      x-snr-groups:
      - campaigns_recommendations
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/recommendations-api-materializer-PreviewRecommendationContext'
              - oneOf:
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewSimilarRecommendationCampaignsCreateRequest'
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewMetricsRecommendationCampaignsCreateRequest'
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewCrossSellRecommendationCampaignsCreateRequest'
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewSetComplementRecommendationCampaignsCreateRequest'
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewLastViewedRecommendationCampaignsCreateRequest'
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewPersonalizedRecommendationCampaignsCreateRequest'
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewVisuallySimilarRecommendationCampaignsCreateRequest'
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewItemComparisonRecommendationCampaignsCreateRequest'
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewRecentInteractionsRecommendationCampaignsCreateRequest'
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewSectionRecommendationCampaignsCreateRequest'
                - $ref: '#/components/schemas/recommendations-api-materializer-PreviewAttributeRecommendationCampaignsCreateRequest'
      responses:
        '200':
          description: Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer'
        '404':
          $ref: '#/components/responses/recommendations-api-materializer-404cannotGenerate'
        '429':
          $ref: '#/components/responses/recommendations-api-materializer-429toManyRequestsError'
        '500':
          $ref: '#/components/responses/recommendations-api-materializer-500error'
  /recommendations/v3/config/{itemFeedId}:
    get:
      summary: Get configuration and model states for a feed
      description: Retrieve the configuration of recommendations for a given item feed ID, including with the model states of the recommendations.
      operationId: getFeedConfigurationWithModelsState
      x-snr-permissions:
      - RECOMMENDATIONS_V2_CONFIG_RECOMMENDATIONS_READ
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - settings_ai_suite
      tags:
      - Recommendations Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-config-InPathItemFeedId'
      responses:
        '200':
          description: Configurations with model states returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-config-RecommendationFeedConfigurationWithModelsStateV3Schema'
        '401':
          $ref: '#/components/responses/recommendations-config-401'
        '403':
          $ref: '#/components/responses/recommendations-config-403'
        '500':
          $ref: '#/components/responses/recommendations-config-500'
    patch:
      summary: Update feed configuration
      description: After creating an item feed with PUT, you can edit the configuration. Only send the values that you want to change; the others will not be modified.
      operationId: updateConfigurationV3
      x-snr-permissions:
      - RECOMMENDATIONS_V2_CONFIG_RECOMMENDATIONS_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - settings_ai_suite
      tags:
      - Recommendations Configuration
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-config-InPathItemFeedId'
      requestBody:
        $ref: '#/components/requestBodies/recommendations-config-PatchRecommendationConfigV3JsonBody'
      responses:
        '200':
          description: Returned updated configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-config-RecommendationCatalogConfigurationV3Schema'
        '400':
          $ref: '#/components/responses/recommendations-config-400'
        '401':
          $ref: '#/components/responses/recommendations-config-401'
        '403':
          $ref: '#/components/responses/recommendations-config-403'
        '500':
          $ref: '#/components/responses/recommendations-config-500'
    put:
      summary: Create AI recommendation engine configuration
      description: Create the configuration for a single catalog ID, with default feed and model configuration values. You can then change the values with the PATCH method.
      operationId: createConfigurationV3
      x-snr-permissions:
      - RECOMMENDATIONS_V2_CONFIG_RECOMMENDATIONS_UPDATE
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - settings_ai_suite
      tags:
      - Recommendations Configuration
      security:
      - JWT: []
      parameters:
      - in: path
        required: true
        name: itemFeedId
        description: The ID of the item feed that will be created. Must match an existing catalog ID.
        schema:
          type: string
      - $ref: '#/components/parameters/recommendations-config-InQueryCatalogType'
      responses:
        '200':
          description: Returned created configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-config-RecommendationCatalogConfigurationV3Schema'
        '400':
          $ref: '#/components/responses/recommendations-config-400'
        '401':
          $ref: '#/components/responses/recommendations-config-401'
        '403':
          $ref: '#/components/responses/recommendations-config-403'
        '500':
          $ref: '#/components/responses/recommendations-config-500'
  /recommendations/v2/training-events:
    get:
      summary: Get custom events usable for model training
      description: |
        Retrieve a paginated list of custom events that can be selected as training inputs for recommendation models.
        Events known to be unusable for training (for example `recommendation.view`, `event.log`, `newsletter.dropped`) and events flagged by the params-collector service as unused are filtered out before pagination.
      operationId: getTrainingCustomEvents
      x-snr-permissions:
      - RECOMMENDATIONS_V2_CONFIG_RECOMMENDATIONS_READ
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - settings_ai_suite
      tags:
      - Recommendations Configuration
      security:
      - JWT: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
          minimum: 1
          default: 1
      - name: limit
        in: query
        required: false
        description: Maximum number of events on a page
        schema:
          type: integer
          default: 50
      - name: includeMeta
        in: query
        required: false
        description: |
          If true, a `meta` JSON block with pagination data is included in the response body.
          If false, the pagination data is included in the response headers.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: Training events returned
          headers:
            Link:
              description: Links to neighboring pages, first page, and last page in pagination
              schema:
                type: string
            X-Pagination-Total-Count:
              description: Total number of events
              schema:
                type: integer
            X-Pagination-Total-Pages:
              description: Total number of pages
              schema:
                type: integer
            X-Pagination-Page:
              description: The current page
              schema:
                type: integer
            X-Pagination-Limit:
              description: Maximal number of items on a page
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-config-TrainingCustomEventsSchema'
        '401':
          $ref: '#/components/responses/recommendations-config-401'
        '403':
          $ref: '#/components/responses/recommendations-config-403'
        '500':
          $ref: '#/components/responses/recommendations-config-500'
  /recommendations/v2/recommend/items/users/{clientUuid}:
    get:
      summary: Personalized recommendations
      description: |-
        Retrieve item recommendations for a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: RecommendForUserV2
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_PERSONALIZED_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-inPathClientUUID'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMinNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignName'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince'
      - $ref: '#/components/parameters/recommendations-rust-all-filterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-elasticFilterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-inParamsItemId'
      - $ref: '#/components/parameters/recommendations-rust-all-itemCatalogId'
      - $ref: '#/components/parameters/recommendations-rust-all-distinctFilter'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems'
      - $ref: '#/components/parameters/recommendations-rust-all-params'
      - $ref: '#/components/parameters/recommendations-rust-all-inventoryChannelId'
      - $ref: '#/components/parameters/recommendations-rust-all-crossWorkspaceMode'
      responses:
        '200':
          description: Personalized recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
    post:
      summary: Personalized recommendations
      description: |-
        Retrieve item recommendations for a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: PostRecommendForUserV2
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_PERSONALIZED_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-inPathClientUUID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Personalized recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /recommendations/v2/recommend/items/users/{clientUuid}/sections:
    post:
      summary: Section recommendations
      description: |-
        Retrieve item recommendations grouped by attribute.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_SECTION_RECOMMENDATIONS_READ
      operationId: PostRecommendSectionsForUserV2
      tags:
      - Recommendations
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-pathClientUuid'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-SectionsSlotsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Section recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SectionsSlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /recommendations/v2/recommend/items/users/{clientUuid}/attributes:
    post:
      summary: Attribute recommendations
      description: |-
        Retrieve attribute recommendations.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_ATTRIBUTE_RECOMMENDATIONS_READ
      operationId: PostRecommendAttributesForUserV2
      tags:
      - Recommendations
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-pathClientUuid'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-AttributesSlotsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Attribute recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /recommendations/v2/recommend/items/users/{clientUuid}/last:
    get:
      summary: Last viewed recommendations
      description: |-
        Retrieve recent item recommendations seen by a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_LAST_VIEWED_RECOMMENDATIONS_READ
      operationId: RecommendLastViewedForUserItems
      tags:
      - Recommendations
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-pathClientUuid'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignName'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMinNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-distinctFilter'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems'
      - $ref: '#/components/parameters/recommendations-rust-all-params'
      - $ref: '#/components/parameters/recommendations-rust-all-inventoryChannelId'
      - $ref: '#/components/parameters/recommendations-rust-all-crossWorkspaceMode'
      responses:
        '200':
          description: Last viewed recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
    post:
      summary: Last viewed recommendations
      description: |-
        Retrieve recent item recommendations seen by a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_LAST_VIEWED_RECOMMENDATIONS_READ
      operationId: PostRecommendLastViewedForUserItems
      tags:
      - Recommendations
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-pathClientUuid'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Last viewed recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /recommendations/v2/recommend/items/users/{clientUuid}/aggregates/{aggregateUUID}:
    get:
      summary: Recent interactions recommendations
      description: |-
        Retrieve recent interactions recommendations for a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_RECENT_INTERACTIONS_RECOMMENDATIONS_READ
      operationId: GetRecommendRecentInteractions
      tags:
      - Recommendations
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-pathClientUuid'
      - $ref: '#/components/parameters/recommendations-rust-all-pathAggregateUuid'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignName'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMinNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-distinctFilter'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems'
      - $ref: '#/components/parameters/recommendations-rust-all-params'
      - $ref: '#/components/parameters/recommendations-rust-all-inventoryChannelId'
      - $ref: '#/components/parameters/recommendations-rust-all-crossWorkspaceMode'
      responses:
        '200':
          description: Recent interactions recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
    post:
      summary: Recent interactions recommendations
      description: |-
        Retrieve recent interactions recommendations for a profile.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_RECENT_INTERACTIONS_RECOMMENDATIONS_READ
      operationId: PostRecommendRecentInteractions
      tags:
      - Recommendations
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-pathClientUuid'
      - $ref: '#/components/parameters/recommendations-rust-all-pathAggregateUuid'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Recent interactions recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /recommendations/v2/recommend/items/metric:
    get:
      summary: Scoring by metric
      description: |-
        Returns items with the highest score of a chosen metric. A list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: GetItemsByMetric
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_METRICS_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsSortMetric'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMinNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignName'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsClientUUID'
      - $ref: '#/components/parameters/recommendations-rust-all-inParamsItemId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince'
      - $ref: '#/components/parameters/recommendations-rust-all-filterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-elasticFilterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-itemCatalogId'
      - $ref: '#/components/parameters/recommendations-rust-all-distinctFilter'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems'
      - $ref: '#/components/parameters/recommendations-rust-all-params'
      - $ref: '#/components/parameters/recommendations-rust-all-inventoryChannelId'
      - $ref: '#/components/parameters/recommendations-rust-all-crossWorkspaceMode'
      responses:
        '200':
          description: Items with the highest metric scores
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
    post:
      summary: Scoring by metric
      description: |-
        Returns items with the highest score of a chosen metric. A list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: PostItemsByMetric
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_METRICS_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-MetricsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Items with the highest metric scores
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /recommendations/v2/recommend/items/complementary:
    get:
      summary: Complementary items for a cart
      description: |-
        Show recommendations based on the contents of a cart.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: ComplementItems
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_COMPLEMENTARY_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsClientUUID'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMinNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignName'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince'
      - $ref: '#/components/parameters/recommendations-rust-all-filterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-elasticFilterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-inParamsItemIdList'
      - $ref: '#/components/parameters/recommendations-rust-all-itemCatalogId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsBoostMetric'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsSortMetric'
      - $ref: '#/components/parameters/recommendations-rust-all-distinctFilter'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems'
      - $ref: '#/components/parameters/recommendations-rust-all-params'
      - $ref: '#/components/parameters/recommendations-rust-all-inventoryChannelId'
      - $ref: '#/components/parameters/recommendations-rust-all-crossWorkspaceMode'
      responses:
        '200':
          description: Cart complementary recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
    post:
      summary: Complementary items for a cart
      description: |-
        Show recommendations based on the contents of a cart.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: PostComplementItems
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_COMPLEMENTARY_RECOMMENDATIONS_READ
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Cart complementary recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /recommendations/v2/recommend/items/{itemId}/complementary:
    get:
      summary: Complementary items
      description: |-
        Returns items complementary to the given items.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: GetComplementaryItems
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_COMPLEMENTARY_PRODUCTS_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMinNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignName'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsClientUUID'
      - $ref: '#/components/parameters/recommendations-rust-all-inPathItemId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince'
      - $ref: '#/components/parameters/recommendations-rust-all-filterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-elasticFilterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-itemCatalogId'
      - $ref: '#/components/parameters/recommendations-rust-all-distinctFilter'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems'
      - $ref: '#/components/parameters/recommendations-rust-all-params'
      - $ref: '#/components/parameters/recommendations-rust-all-inventoryChannelId'
      - $ref: '#/components/parameters/recommendations-rust-all-crossWorkspaceMode'
      responses:
        '200':
          description: Items complementary to the given item
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
    post:
      summary: Complementary items
      description: |-
        Returns items complementary to the given items.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: PostComplementaryItems
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_COMPLEMENTARY_PRODUCTS_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-inPathItemId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Items complementary to the given item
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /recommendations/v2/recommend/items/{itemId}/similar:
    get:
      summary: Similar items
      description: |-
        Returns items similar to a given item.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: GetSimilarItems
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_SIMILAR_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMinNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignName'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsClientUUID'
      - $ref: '#/components/parameters/recommendations-rust-all-inPathItemId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince'
      - $ref: '#/components/parameters/recommendations-rust-all-filterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-elasticFilterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-itemCatalogId'
      - $ref: '#/components/parameters/recommendations-rust-all-distinctFilter'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems'
      - $ref: '#/components/parameters/recommendations-rust-all-params'
      - $ref: '#/components/parameters/recommendations-rust-all-inventoryChannelId'
      - $ref: '#/components/parameters/recommendations-rust-all-crossWorkspaceMode'
      responses:
        '200':
          description: Items similar to the given item
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
    post:
      summary: Similar items
      description: |-
        Returns items similar to a given item.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: PostSimilarItems
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_SIMILAR_RECOMMENDATIONS_READ
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-inPathItemId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Items similar to the given item
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /recommendations/v2/recommend/items/{itemId}/similar/visual:
    get:
      summary: Visually similar
      description: |-
        Returns items visually similar to the given items.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: GetSimilarVisualItems
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_VISUAL_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMinNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsClientUUID'
      - $ref: '#/components/parameters/recommendations-rust-all-inPathItemId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince'
      - $ref: '#/components/parameters/recommendations-rust-all-filterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-elasticFilterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-itemCatalogId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignName'
      - $ref: '#/components/parameters/recommendations-rust-all-distinctFilter'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems'
      - $ref: '#/components/parameters/recommendations-rust-all-params'
      - $ref: '#/components/parameters/recommendations-rust-all-inventoryChannelId'
      - $ref: '#/components/parameters/recommendations-rust-all-crossWorkspaceMode'
      responses:
        '200':
          description: Items visually similar to the given item
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
    post:
      summary: Visually similar
      description: |-
        Returns items visually similar to the given items.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: PostSimilarVisualItems
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_VISUAL_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-inPathItemId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Items visually similar to the given item
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /recommendations/v2/recommend/items/next-interaction:
    get:
      summary: Next interaction
      description: |
        The "next interaction" model recommends items that are most likely to produce a `page.visit` or `product.buy` event.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: NextInteractionRecommendation
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_NEXT_INTERACTION_RECOMMENDATIONS_READ
      security:
      - TrackerKey: []
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsClientUUID'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMinNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsCampaignName'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince'
      - $ref: '#/components/parameters/recommendations-rust-all-filterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-elasticFilterExpr'
      - $ref: '#/components/parameters/recommendations-rust-all-inParamsItemIdList'
      - $ref: '#/components/parameters/recommendations-rust-all-itemCatalogId'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsBoostMetric'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsSortMetric'
      - $ref: '#/components/parameters/recommendations-rust-all-distinctFilter'
      - $ref: '#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems'
      - $ref: '#/components/parameters/recommendations-rust-all-params'
      responses:
        '200':
          description: Next interaction recommendation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
    post:
      summary: Next interaction
      description: |
        The "next interaction" model recommends items that are most likely to produce a `page.visit` or `product.buy` event.

        **Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.
      operationId: PostNextInteractionRecommendation
      tags:
      - Recommendations
      x-snr-groups: []
      x-snr-scopes:
      - LEGACY_AI_KEY
      - PROFILE
      - TRACKER
      x-snr-permissions:
      - RECOMMENDATIONS_V2_NEXT_INTERACTION_RECOMMENDATIONS_READ
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2'
        description: Definition of the requested recommendation
        required: true
      responses:
        '200':
          description: Next interaction recommendations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2'
        '404':
          $ref: '#/components/responses/recommendations-rust-all-404-no-recommendation'
        '500':
          $ref: '#/components/responses/recommendations-rust-all-500-error-occurred'
  /sauth/auth/login/client:
    post:
      tags:
      - Authorization (deprecated)
      summary: Authenticate as Profile
      description: Obtain a new Profile JWT Token.
      operationId: LogInAsClient
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-LogInAsClientRequestBody'
            example:
              apiKey: 5AEAA3D5-E147-C7EB-invalid50109A3D1
              email: testDoc@example.com
              password: testPass1!
              uuid: b3f56868-9667-4843-a8e5-0509456baa9b
        required: true
      responses:
        '200':
          description: Profile authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 401
                error: Unauthorized
                message: Access denied
                path: /auth/login/client
                traceId: 61b4aa7c0cb1167a
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 404
                error: Not Found
                message: Account does not exist
                path: /auth/login/client
                traceId: 61b4aa7c0cb1167a
        '406':
          $ref: '#/components/responses/sauth-406-account-locked'
        '423':
          $ref: '#/components/responses/sauth-423-device-control-enabled'
      deprecated: true
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /sauth/auth/login/client/anonymous:
    post:
      tags:
      - Authorization (deprecated)
      summary: Authenticate anonymously
      description: Obtain a new JWT for an anonymous Profile. The token can be used and refreshed in the same way as tokens of registered Profiles.
      operationId: LogInAnonymously
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-LogInAnonymouslyRequestBody'
        required: true
      responses:
        '200':
          description: Anonymous authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2019-03-19T14:03:35.413+00:00'
                status: 401
                error: Unauthorized
                message: Could not fetch ApiKey
                path: /auth/login/client/anonymous
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      deprecated: true
  /sauth/auth/login/client/facebook:
    post:
      tags:
      - Authorization (deprecated)
      summary: Authenticate with Facebook
      description: Use a Facebook token to obtain a Profile JWT. If a Facebook account is logging on for the first time, a self-managed account for the profile is registered in Synerise.
      operationId: AuthenticateWithFacebook
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-AuthenticateWithFacebookRequestBody'
            example: '{"facebookToken":"EAAfsMmaWLW0BAOZAqSoh8ZB5y2ZAixtSrlvvq3fpWGlcrfcoWOiAwBCZBpBDlzwHFSZB58nUBjOz2UMuopO7p2Q65QU1ZAiB2XaxRzje0bBd7Tu87f6C2pcoZAP65agWAF0ElZCNyKn4iAtFd9RhppkwU9ll0AokBZBnDroZCIaxE3IHSWGtE567AUrXkZAsQEjYsZAZAcYx0ki1w7XUToy9Wps9NA0OuBdMhruB3htuiukwOFAZDZD","apiKey":"5AEAA3D5-E147-C7EB-invalid","uuid":"91b8e035-dca3-4805-8915-2cfb01d31fde","deviceId":"deviceId","agreements":{"email":true,"sms":true,"push":true,"bluetooth":true,"rfid":true,"wifi":true},"attributes":{"property1":"string","property2":"string"}}'
        required: true
      responses:
        '200':
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      deprecated: true
  /sauth/auth/login/client/facebook/no-registration:
    post:
      tags:
      - Authorization (deprecated)
      summary: Authenticate with Facebook without registration
      description: Use a Facebook token to obtain a Profile JWT without creating a self-managed account for this Profile in Synerise.
      operationId: AuthenticateWithFacebookWithoutRegistration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-AuthenticateWithFacebookWithoutRegistrationRequestBody'
            example: '{"facebookToken":"EAAfsMmaWLW0BAOZAqSoh8ZB5y2ZAixtSrlvvq3fpWGlcrfcoWOiAwBCZBpBDlzwHFSZB58nUBjOz2UMuopO7p2Q65QU1ZAiB2XaxRzje0bBd7Tu87f6C2pcoZAP65agWAF0ElZCNyKn4iAtFd9RhppkwU9ll0AokBZBnDroZCIaxE3IHSWGtE567AUrXkZAsQEjYsZAZAcYx0ki1w7XUToy9Wps9NA0OuBdMhruB3htuiukwOFAZDZD","apiKey":"5AEAA3D5-E147-C7EB-invalid","uuid":"91b8e035-dca3-4805-8915-2cfb01d31fde","deviceId":"deviceId","agreements":{"email":true,"sms":true,"push":true,"bluetooth":true,"rfid":true,"wifi":true},"attributes":{"property1":"string","property2":"string"}}'
        required: true
      responses:
        '200':
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      deprecated: true
  /sauth/auth/login/client/oauth:
    post:
      tags:
      - Authorization (deprecated)
      summary: Authenticate with OAuth
      description: Obtain a new JWT token by using OAuth authentication token.
      operationId: AuthenticateWithOauth
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-OauthAuthBody'
        required: true
      responses:
        '200':
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      deprecated: true
  /sauth/auth/login/client/oauth/no-registration:
    post:
      tags:
      - Authorization (deprecated)
      summary: Authenticate with OAuth without registration
      description: Use an OAuth token to obtain a Profile JWT. This method does not create a Profile in Synerise.
      operationId: loginWithOauthWithoutRegistrationUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-OauthAuthBody'
        required: true
      responses:
        '200':
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      deprecated: true
  /sauth/auth/login/client/apple:
    post:
      tags:
      - Authorization (deprecated)
      summary: Authenticate with Sign in with Apple
      description: Obtain a new JWT token by using Sign in with Apple authentication token.
      operationId: AuthenticateWithApple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-AuthenticateWithAppleRequestBody'
            example: '{"accessToken":"EAAfsMmaWLW0BAOZAqSoh8ZB5y2ZAixtSrlvvq3fpWGlcrfcoWOiAwBCZBpBDlzwHFSZB58nUBjOz2UMuopO7p2Q65QU1ZAiB2XaxRzje0bBd7Tu87f6C2pcoZAP65agWAF0ElZCNyKn4iAtFd9RhppkwU9ll0AokBZBnDroZCIaxE3IHSWGtE567AUrXkZAsQEjYsZAZAcYx0ki1w7XUToy9Wps9NA0OuBdMhruB3htuiukwOFAZDZD","apiKey":"5AEAA3D5-E147-C7EB-invalid","uuid":"91b8e035-dca3-4805-8915-2cfb01d31fde","deviceId":"deviceId","agreements":{"email":true,"sms":true,"push":true,"bluetooth":true,"rfid":true,"wifi":true},"attributes":{"property1":"string","property2":"string"}}'
        required: true
      responses:
        '200':
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      deprecated: true
  /sauth/auth/login/client/apple/no-registration:
    post:
      tags:
      - Authorization (deprecated)
      summary: Authenticate with Sign in with Apple without registration
      description: Use an Apple token to obtain a Profile JWT. This method does not create a Profile in Synerise.
      operationId: loginWithAppleWithoutRegistrationUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-LoginWithAppleWithoutRegistrationRequestBody'
        required: true
      responses:
        '200':
          description: Profile authorization token
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      deprecated: true
  /sauth/clients/registered:
    post:
      tags:
      - Profile registration
      summary: Register a Profile
      description: Create a new account for a Profile. This account is owned by the Profile and can be accessed and edited by it. If you don't have some information about the profile, don't insert a null-value parameter - omit the parameter entirely.
      operationId: RegisterAClient
      requestBody:
        content:
          application/json:
            schema:
              required:
              - uuid
              - email
              - password
              $ref: '#/components/schemas/sauth-RegisterAClientRequestBody'
        required: true
      responses:
        '202':
          description: Request accepted
        '400':
          description: Profile already exists or request body malformed
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-603`: A profile with this UUID already exists, you probably need to re-generate the UUID
                        - `SAU-604`: A profile with this id already exists
                        - `SAU-605`: A profile with this customId already exists and is registered
                        - `SAU-606`: This UUID cannot be used, re-generate the UUID and try again
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '424':
          description: 'Only if customId was obtained from loyalty card code pool: provided customId does not exist in loyalty card code pool'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
      deprecated: false
      security:
      - JWT: []
      x-snr-scopes:
      - anonymous_client
      - profile
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_REGISTER_CLIENT_CREATE
  /sauth/auth/refresh/client:
    get:
      tags:
      - Authorization (deprecated)
      summary: Refresh a Profile token
      description: |-
        Retrieve a refreshed JWT Token to prolong the Profile session.

        The current token must still be active at the time of the request.
      operationId: RefreshAClientToken
      responses:
        '200':
          description: New authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2019-03-19T13:57:33.244+00:00'
                status: 401
                error: Unauthorized
                message: Full authentication is required to access this resource
                path: /auth/refresh/client
      security:
      - JWT: []
      deprecated: true
      x-snr-scopes:
      - client
      - anonymous_client
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /sauth/v2/auth/refresh/client:
    post:
      deprecated: true
      tags:
      - Authorization (deprecated)
      summary: Refresh a Profile token
      description: |-
        This method is deprecated. Use [the v3 method](#operation/RefreshAClientTokenV3) instead.

        Retrieve a refreshed JWT Token to prolong the session.

        The current token must still be active at the time of the request.
      operationId: RefreshAClientTokenV2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ClientRefreshRequest'
        required: true
      responses:
        '200':
          description: New authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2019-03-19T13:57:33.244+00:00'
                status: 401
                error: Unauthorized
                message: Full authentication is required to access this resource
                path: /v2/auth/refresh/client
      security:
      - JWT: []
      x-snr-scopes:
      - client
      - anonymous_client
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /sauth/v3/auth/refresh/client:
    post:
      tags:
      - Authorization
      summary: Refresh a Profile token
      description: |-
        Retrieve a refreshed JWT Token to prolong the session.

        The current token must still be active at the time of the request.
      operationId: RefreshAClientTokenV3
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ClientRefreshRequest'
        required: true
      responses:
        '200':
          description: New authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtokenV3'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2019-03-19T13:57:33.244+00:00'
                status: 401
                error: Unauthorized
                message: Full authentication is required to access this resource
                path: /v3/auth/refresh/client
      security:
      - JWT: []
      x-snr-scopes:
      - client
      - anonymous_client
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /sauth/clients/activation/by-pin-code/confirmation:
    post:
      x-snr-scopes:
      - anonymous_client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_PIN_CODE_CONFIRMATION_CLIENT_CREATE
      security:
      - JWT: []
      tags:
      - Profile registration
      summary: Confirm registration with PIN code
      description: Confirm account registration with PIN code received by email (code is sent automatically at registration).
      operationId: confirmByPinCodeUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-PinCodeConfirmationRequest'
      responses:
        '200':
          description: OK, account confirmed
        '400':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-602`: Account is already confirmed
                        - `SAU-601`: Device ID is required and missing
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-304`: Wrong PIN
                        - `SAU-305`: PIN expired
                        - `SAU-306`: PIN was sent from a different device than the account was registered (by default, this is not allowed)
        '404':
          description: Not Found
      deprecated: false
  /sauth/clients/activation/by-pin-code/request:
    post:
      x-snr-scopes:
      - anonymous_client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_PIN_CODE_RESEND_CLIENT_CREATE
      security:
      - JWT: []
      tags:
      - Profile registration
      summary: Re-send PIN code
      description: Re-send a PIN code to the Profile's email.
      operationId: resendByPinCodeUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ClientPinActivationResendRequest'
      responses:
        '200':
          description: OK
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '400':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-601`: Device ID is required and missing
        '403':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-304`: Wrong PIN
                        - `SAU-305`: PIN expired
                        - `SAU-306`: PIN was sent from a different device than the account was registered (by default, this is not allowed)
        '404':
          description: Not Found
      deprecated: false
  /sauth/clients/activation/confirmation:
    post:
      tags:
      - Profile registration
      summary: Activate a Profile's account
      description: Activate the Profile's account. This is used when registration is configured to keep the account inactive until the email is confirmed.
      operationId: ConfirmAClientAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ConfirmAClientAccountRequestBody'
            example:
              token: 8a0be35a-f6be-437b-ab18-339cc6194df5
        required: true
      responses:
        '200':
          description: Request accepted
          headers: {}
        '400':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-602`: Account is already confirmed
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-08-09T07:53:32.406+00:00'
                status: 409
                error: Conflict
                message: Account already activated
                path: /clients/activation/request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
      x-snr-scopes:
      - client
      - anonymous_client
      - profile
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_CONFIRMATION_CLIENT_CREATE
      security:
      - JWT: []
  /sauth/clients/activation/request:
    post:
      tags:
      - Profile registration
      summary: Re-send email confirmation
      description: Request a re-sending of the confirmation email.
      operationId: resendUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ClientActivationResendRequest'
        required: true
      responses:
        '200':
          description: OK
          content: {}
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - client
      - anonymous_client
      - profile
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_CONFIRMATION_CLIENT_CREATE
      security:
      - JWT: []
  /sauth/client/device-control/{token}:
    get:
      tags:
      - Devices
      summary: Authenticate device
      description: When a Profile logs in from a new device, the device must be confirmed. A token is sent by email.
      operationId: authenticateDevice
      parameters:
      - name: token
        in: path
        description: The device confirmation token received by email
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: string
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /sauth/clients/password-reset/request:
    post:
      tags:
      - Profile account management
      summary: Request Profile password reset
      description: |-
        Allows a Profile to send a password reset request. A reset link is sent to the specified email address.
        To confirm the request, use the [Confirm a Profile's password reset](#operation/ConfirmClientPasswordReset) endpoint.
      operationId: RequestClientPasswordReset
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-RequestClientpasswordresetRequest'
        required: true
      responses:
        '200':
          description: Request accepted
        '201':
          description: Created
          content: {}
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-307`: Cannot reset password, email confirmation by hash code (activation link) required
                        - `SAU-308`: Cannot reset password, email confirmation by PIN (activation link) required
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - anonymous_client
      - profile
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_PASSWORD_RESET_CLIENT_CREATE
      security:
      - JWT: []
  /sauth/clients/password-reset/confirmation:
    post:
      tags:
      - Profile account management
      summary: Confirm Profile password reset
      description: Confirm a password reset using the token obtained from the [Request Profile password reset](#operation/RequestClientPasswordReset) endpoint.
      operationId: ConfirmClientPasswordReset
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ConfirmClientpasswordresetRequest'
        required: true
      responses:
        '200':
          description: Request accepted
          headers: {}
      deprecated: false
      security:
      - JWT: []
      x-snr-scopes:
      - anonymous_client
      - profile
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_PASSWORD_RESET_CLIENT_CREATE
  /sauth/my-account/change-password:
    post:
      tags:
      - Profile account management
      summary: Change Profile password
      description: A Profile can update the password to its account.
      operationId: ChangeClientPassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ChangeClientPasswordRequestBody'
            example: '{"oldPassword":"test1.1234","password":"Test.1234","deviceId":"optional"}'
        required: true
      responses:
        '200':
          description: Request accepted
          headers: {}
          content:
            text/plain:
              schema:
                type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                error: Bad Request
                status: 400
                timestamp: '2018-08-01T19:46:52.178Z'
                message: Password must have at least 6 characters and must contain at least one digit, one letter and one special character
                path: /my-account/change-password
      x-snr-scopes:
      - client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_CHANGE_PASSWORD_CLIENT_UPDATE
      security:
      - JWT: []
  /sauth/v2/auth/login/client:
    post:
      deprecated: true
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      tags:
      - Authorization (deprecated)
      summary: Authenticate as Profile
      description: |
        This method is deprecated. Use [the v3 method](#operation/authenticateUsingPOST_v3) instead.

        Obtain a new JWT token for a Profile. If an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.
      operationId: authenticateUsingPOST_v2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-AuthenticationRequestV2_and_3'
      responses:
        '200':
          description: Profile authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        '400':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-601`: Device ID is required and missing
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 401
                error: Unauthorized
                message: Access denied
                path: /v2/auth/login/client
                traceId: 61b4aa7c0cb1167a
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v2/auth/login/client
                traceId: 61b4aa7c0cb1167a
        '403':
          $ref: '#/components/responses/sauth-403-login'
        '406':
          $ref: '#/components/responses/sauth-406-account-locked'
        '423':
          $ref: '#/components/responses/sauth-423-device-control-enabled'
  /sauth/v2/auth/login/client/conditional:
    post:
      deprecated: true
      summary: Authenticate as Profile (conditional)
      description: "This method is deprecated. Use [the v3 method](#operation/authenticateConditionalUsingPOSTv3) instead.      \n\n\nObtain a new JWT token for a Profile.\n\n- If the account does not exist, an account is not created.\n- If any additional conditions are required for logging in, the response is HTTP200 and lists the conditions.\n- Note that using this endpoint requires authenticating as an anonymous Profile first.\n"
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      security:
      - JWT: []
      tags:
      - Authorization (deprecated)
      operationId: authenticateConditionalUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-AuthenticationRequestV2_and_3'
      responses:
        '200':
          description: Details of the login operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-ConditionalAuthenticationResponse'
        '400':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-601`: Device ID is required and missing
        '401':
          description: See error message for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v2/auth/login/client/conditional
                traceId: 61b4aa7c0cb1167a
        '403':
          $ref: '#/components/responses/sauth-403-login'
        '406':
          $ref: '#/components/responses/sauth-406-account-locked'
        '423':
          $ref: '#/components/responses/sauth-423-device-control-enabled'
  /sauth/v2/auth/login/client/anonymous:
    post:
      deprecated: true
      tags:
      - Authorization (deprecated)
      summary: Authenticate anonymously
      description: |
        This method is deprecated. Use [the v3 method](#operation/LogInAnonymouslyV3) instead.

        Obtain a new JWT for an anonymous Profile. The token can be used and refreshed in the same way
        as tokens of registered Profiles.
      operationId: LogInAnonymouslyV2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-LogInAnonymouslyV2RequestBody'
        required: true
      responses:
        '200':
          description: Anonymous authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtoken'
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2019-03-19T14:03:35.413+00:00'
                status: 401
                error: Unauthorized
                message: Could not fetch ApiKey
                path: /v2/auth/login/client/anonymous
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /sauth/v3/auth/login/client:
    post:
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      tags:
      - Authorization
      summary: Authenticate as Profile
      description: Obtain a new JWT for a Profile. If an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.
      operationId: authenticateUsingPOST_v3
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-AuthenticationRequestV2_and_3'
      responses:
        '200':
          description: Profile authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtokenV3'
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        '400':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-601`: Device ID is required and missing
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 401
                error: Unauthorized
                message: Access denied
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        '403':
          $ref: '#/components/responses/sauth-403-login'
        '406':
          $ref: '#/components/responses/sauth-406-account-locked'
        '423':
          $ref: '#/components/responses/sauth-423-device-control-enabled'
      deprecated: false
  /sauth/v2/auth/server/login/client:
    post:
      deprecated: true
      x-snr-scopes:
      - profile
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_SERVER_LOGIN_CLIENT_CREATE
      tags:
      - Authorization (deprecated)
      summary: Authenticate as Profile
      description: |
        This method is deprecated. Use [the v3 method](#operation/authenticateViaServerV3) instead.

        Obtain a new JWT for a Profile. It is designed to be used from backend server. If an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.
      operationId: authenticateViaServerV2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ServerAuthenticationRequestV2_and_3'
      responses:
        '200':
          description: Profile authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtokenV3'
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        '400':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-601`: Device ID is required and missing
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 401
                error: Unauthorized
                message: Access denied
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        '403':
          $ref: '#/components/responses/sauth-403-login'
        '406':
          $ref: '#/components/responses/sauth-406-account-locked'
        '423':
          $ref: '#/components/responses/sauth-423-device-control-enabled'
  /sauth/v3/auth/server/login/client:
    post:
      x-snr-scopes:
      - profile
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_SERVER_LOGIN_CLIENT_CREATE
      tags:
      - Authorization
      summary: Authenticate Profile with a server
      description: "Obtain a new JWT for a Profile. This method is designed to be used from a backend server that handles login requests and communicates with Synerise to execute them.  \nIf an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.\n"
      operationId: authenticateViaServerV3
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ServerAuthenticationRequestV2_and_3'
      responses:
        '200':
          description: Profile authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtokenV3'
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        '400':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-601`: Device ID is required and missing
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 401
                error: Unauthorized
                message: Access denied
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v3/auth/login/client
                traceId: 61b4aa7c0cb1167a
        '403':
          $ref: '#/components/responses/sauth-403-login'
        '406':
          $ref: '#/components/responses/sauth-406-account-locked'
        '423':
          $ref: '#/components/responses/sauth-423-device-control-enabled'
      deprecated: false
  /sauth/v3/auth/login/client/conditional:
    post:
      summary: Authenticate as Profile (conditional)
      description: |
        Obtain a new JWT token for a Profile.

        - If the account does not exist, an account is not created.
        - If any additional conditions are required for logging in, the response is HTTP200 and lists the conditions.
        - Note that using this endpoint requires authenticating as an anonymous Profile first.
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      security:
      - JWT: []
      tags:
      - Authorization
      operationId: authenticateConditionalUsingPOSTv3
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-AuthenticationRequestV2_and_3'
      responses:
        '200':
          description: Details of the login operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-ConditionalAuthenticationResponseV3'
        '400':
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/sauth-4xx-base'
                - type: object
                  properties:
                    errorCode:
                      type: string
                      description: |
                        Error code, if applicable.
                        - `SAU-601`: Device ID is required and missing
        '401':
          description: See error message for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
        '404':
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2018-06-07T07:17:41.734+00:00'
                status: 404
                error: Not Found
                message: Account does not exist
                path: /v3/auth/login/client/conditional
                traceId: 61b4aa7c0cb1167a
        '403':
          $ref: '#/components/responses/sauth-403-login'
        '406':
          $ref: '#/components/responses/sauth-406-account-locked'
        '423':
          $ref: '#/components/responses/sauth-423-device-control-enabled'
      deprecated: false
  /sauth/v3/auth/login/client/anonymous:
    post:
      tags:
      - Authorization
      summary: Authenticate anonymously
      description: Obtain a new JWT for an anonymous Profile. The token can be used and refreshed in the same way as tokens of registered Profiles.
      operationId: LogInAnonymouslyV3
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-LogInAnonymouslyV3RequestBody'
        required: true
      responses:
        '200':
          description: Anonymous authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-JWTtokenV3'
              example:
                token: eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
              example:
                timestamp: '2019-03-19T14:03:35.413+00:00'
                status: 401
                error: Unauthorized
                message: Could not fetch ApiKey
                path: /v3/auth/login/client/anonymous
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /sauth/v2/my-account/delete:
    post:
      tags:
      - Profile account management
      summary: Delete account
      description: |
        A Profile can delete its own account. Its history shows an `client.deleteAccount` event. All marketing agreements are cancelled. The profile is signed out on all devices and cannot sign in again.
      operationId: deleteAccountUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-DeleteAccountV2RequestBody'
        required: true
      responses:
        '200':
          description: Account deleted
        '400':
          $ref: '#/components/responses/sauth-400-malformed'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-invalid-credentials-in-body'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_CLIENT_DELETE
      security:
      - JWT: []
  /sauth/v2/my-account/email-change/request:
    post:
      x-snr-scopes:
      - client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_EMAIL_CHANGE_CLIENT_UPDATE
      tags:
      - Profile account management
      summary: Request Profile email change
      description: A Profile can request an email change for its own account. A confirmation token is sent to the new email by and must be applied by clicking the link in the message or using the [Confirm Profile email change](#operation/confirmClientEmailChange) endpoint.
      operationId: changeEmailRequestUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-GenericClientEmailChangeRequest'
      responses:
        '200':
          description: Email change requested, confirmation token sent to new email
        '400':
          $ref: '#/components/responses/sauth-400-malformed'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-invalid-credentials-in-body'
        '404':
          description: Not Found
          content: {}
      deprecated: false
  /sauth/v3/my-account/logout:
    post:
      tags:
      - Profile account management
      summary: Log out a Profile
      description: Log out a Profile when authenticated as that Profile.
      operationId: logoutUsingPOST
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT_CONDITIONAL
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_LOGOUT_CLIENT_CREATE
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ClientLogoutRequest'
      responses:
        '200':
          description: OK
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Profile not found
      deprecated: false
  /sauth/my-account/email-change/confirmation:
    post:
      tags:
      - Profile account management
      summary: Confirm Profile email change
      description: The Profile can confirm the email change by providing the token that they received by email as a result of the [Request a Profile email change](#operation/changeEmailRequestUsingPOST) call.
      operationId: confirmClientEmailChange
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ConfirmClientEmailChangeRequestBody'
            example: '{"token":"token_from_email_change_mail","newsletterAgreement":true}'
        required: true
      responses:
        '200':
          description: Request accepted
        '400':
          $ref: '#/components/responses/sauth-400-malformed'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          description: Invalid confirmation token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-4xx-base'
      deprecated: false
      security:
      - JWT: []
      x-snr-scopes:
      - client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_CHANGE_EMAIL_CLIENT_UPDATE
  /sauth/clients/facebook/email-change/request:
    post:
      tags:
      - Profile account management
      summary: Change Facebook Profile email
      description: Change the email address of a Profile registered by Facebook
      operationId: changeEmailUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ClientEmailChangeRequest'
        required: true
      responses:
        '200':
          description: OK
          content: {}
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_EMAIL_CHANGE_CLIENT_UPDATE
      security:
      - JWT: []
  /sauth/management/client/{clientID}/logout:
    post:
      tags:
      - Profile management
      summary: Log out a Profile
      description: Log out a Profile when authenticated as a Synerise User or a Workspace.
      operationId: logoutClientUsingPOST
      x-snr-scopes:
      - user
      - profile
      x-snr-groups:
      - settings_customers_iam
      x-snr-permissions:
      - SAUTH_LOGOUT_CLIENT_CREATE
      parameters:
      - $ref: '#/components/parameters/sauth-pathClientId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-ClientLogoutRequest'
      responses:
        '200':
          description: OK
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Profile not found
      deprecated: false
  /sauth/settings/ban:
    get:
      tags:
      - Settings
      summary: Get ban settings
      description: Retrieve the configuration of applying bans after a number of failed logins.
      operationId: getBanSettingsUsingGET
      security:
      - JWT: []
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-BanSettingsPayload'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_locking_policy
      x-snr-permissions:
      - SAUTH_SETTINGS_READ
    post:
      tags:
      - Settings
      summary: Update ban settings
      description: Update the configuration of applying bans after a number of failed logins.
      operationId: updateBanSettingsUsingPOST
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-BanSettingsPayload'
        required: true
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-BanSettingsPayload'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_locking_policy
      x-snr-permissions:
      - SAUTH_SETTINGS_UPDATE
  /sauth/settings/templates:
    get:
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_account_confirmation
      x-snr-permissions:
      - SAUTH_SETTINGS_READ
      security:
      - JWT: []
      tags:
      - Settings
      summary: Get email template settings
      operationId: getTemplateSettingsUsingGET
      description: Get settings for email templates.
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-TemplateSettingsData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      deprecated: false
    post:
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_account_confirmation
      x-snr-permissions:
      - SAUTH_SETTINGS_UPDATE
      security:
      - JWT: []
      tags:
      - Settings
      summary: Update email template settings
      operationId: updateTemplateSettingsUsingPOST
      description: Update email template settings. **Omitted settings are reset to null!**
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-TemplateSettingsData'
        required: true
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-TemplateSettingsData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      deprecated: false
  /sauth/settings/device-control:
    get:
      tags:
      - Settings
      summary: Get device authorization settings
      description: Retrieve the settings related to authorization of logins from unknown devices.
      operationId: getDeviceControlSettingsUsingGET
      security:
      - JWT: []
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-DeviceControlSettingsPayload'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_locking_policy
      x-snr-permissions:
      - SAUTH_SETTINGS_READ
    post:
      tags:
      - Settings
      summary: Update device authorization settings
      description: Update the settings related to authorization of logins from unknown devices.
      operationId: updateDeviceSettingsUsingPOST
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-DeviceControlSettingsPayload'
        required: true
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-DeviceControlSettingsPayload'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_locking_policy
      x-snr-permissions:
      - SAUTH_SETTINGS_UPDATE
  /sauth/settings/general:
    get:
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_account_confirmation
      x-snr-permissions:
      - SAUTH_SETTINGS_READ
      security:
      - JWT: []
      tags:
      - Settings
      summary: Get general settings
      operationId: getGeneralConfigUsingGET
      description: Retrieve the general settings of the workspace.
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-GeneralSettingsData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      deprecated: false
    post:
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_account_confirmation
      x-snr-permissions:
      - SAUTH_SETTINGS_UPDATE
      tags:
      - Settings
      security:
      - JWT: []
      summary: Update general settings
      operationId: updateGeneralSettingsUsingPOST
      description: Update general settings. **Settings omitted in the request are reset to default!**.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-GeneralSettingsData'
        required: true
      responses:
        '200':
          description: New settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-GeneralSettingsData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      deprecated: false
  /sauth/settings/oauth:
    get:
      tags:
      - Settings
      summary: Get OAuth settings
      description: Retrieve OAuth authentication settings
      operationId: getOauthSettingsUsingGET
      security:
      - JWT: []
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-OauthSettingsResponse'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_oauth
      x-snr-permissions:
      - SAUTH_SETTINGS_READ
    post:
      tags:
      - Settings
      summary: Update OAuth settings
      description: Update OAuth authentication settings
      operationId: updateOatuhSettingsUsingPOST
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-OauthSettingsRequest'
        required: true
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-OauthSettingsResponse'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_oauth
      x-snr-permissions:
      - SAUTH_SETTINGS_UPDATE
  /sauth/settings/synerise-auth:
    get:
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam
      x-snr-permissions:
      - SAUTH_SETTINGS_READ
      tags:
      - Settings
      operationId: getSyneriseAuthConfig
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-SyneriseAuthSettingsData'
    post:
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam
      x-snr-permissions:
      - SAUTH_SETTINGS_UPDATE
      tags:
      - Settings
      operationId: updateSyneriseAuthSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-SyneriseAuthSettingsData'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-SyneriseAuthSettingsData'
  /sauth/settings/oauth/facebook:
    get:
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_oauth
      x-snr-permissions:
      - SAUTH_SETTINGS_READ
      tags:
      - Settings
      operationId: getFacebookOauthSettings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-FacebookOauthSettingsPayload'
    post:
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_oauth
      x-snr-permissions:
      - SAUTH_SETTINGS_UPDATE
      tags:
      - Settings
      operationId: updateFacebookOauthSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-FacebookOauthSettingsPayload'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/sauth-FacebookOauthSettingsPayload'
  /sauth/settings/oauth/google:
    get:
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_oauth
      x-snr-permissions:
      - SAUTH_SETTINGS_READ
      tags:
      - Settings
      operationId: getGoogleOauthSettings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-GoogleOauthSettingsPayload'
    post:
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_oauth
      x-snr-permissions:
      - SAUTH_SETTINGS_UPDATE
      tags:
      - Settings
      operationId: updateGoogleOauthSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-GoogleOauthSettingsPayload'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/sauth-GoogleOauthSettingsPayload'
  /sauth/settings/oauth/apple:
    get:
      tags:
      - Settings
      summary: Get Sign in with Apple settings
      description: Retrieve Sign in with Apple settings.
      operationId: getAppleAuthSettingsUsingGET
      security:
      - JWT: []
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-AppleAuthSettingsPayload'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_oauth
      x-snr-permissions:
      - SAUTH_SETTINGS_READ
    post:
      tags:
      - Settings
      summary: Update Sign in with Apple settings
      description: Update Sign in with Apple settings.
      operationId: updateAppleAuthSettingsUsingPOST
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-AppleAuthSettingsPayload'
        required: true
      responses:
        '200':
          description: Current settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sauth-AppleAuthSettingsPayload'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - user
      x-snr-groups:
      - settings_customers_iam_oauth
      x-snr-permissions:
      - SAUTH_SETTINGS_UPDATE
  /sauth/clients/oauth/deleted:
    post:
      deprecated: true
      tags:
      - Profile account management
      summary: Delete Client Account (OAuth)
      description: |2

        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Client can delete their own account.
      operationId: deleteOauthClientUsingPOST
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-DeleteOauthClientRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content: {}
        '400':
          $ref: '#/components/responses/sauth-400-malformed'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-invalid-credentials-in-body'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_OAUTH_CLIENT_DELETE
  /sauth/clients/apple/deleted:
    post:
      deprecated: true
      tags:
      - Profile account management
      summary: Delete Profile account (Sign in with Apple)
      description: |2

        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Profile can delete its own account.
      operationId: deleteAppleClientUsingPOST
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-DeleteAppleClientRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content: {}
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-forbidden'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_APPLE_CLIENT_DELETE
  /sauth/clients/facebook/deleted:
    post:
      deprecated: true
      tags:
      - Profile account management
      summary: Delete Facebook Profile Account
      description: |2

        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Profile can delete its own account.
      operationId: DeleteAFacebookClientAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-DeleteAFacebookClientAccountRequestBody'
        required: true
      responses:
        '200':
          description: Request accepted
          headers: {}
        '400':
          $ref: '#/components/responses/sauth-400-malformed'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-invalid-credentials-in-body'
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_FACEBOOK_CLIENT_DELETE
      security:
      - JWT: []
  /sauth/my-account/delete:
    post:
      deprecated: true
      tags:
      - Profile account management
      summary: Delete account
      description: |2

        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Profile can delete its own account.
      operationId: deleteAccountUsingPOST-v1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-DeleteAccountV1RequestBody'
      responses:
        '200':
          description: OK
          content: {}
        '400':
          $ref: '#/components/responses/sauth-400-malformed'
        '401':
          $ref: '#/components/responses/sauth-401-unauthorized'
        '403':
          $ref: '#/components/responses/sauth-403-invalid-credentials-in-body'
      x-snr-scopes:
      - client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_CLIENT_DELETE
      security:
      - JWT: []
  /sauth/my-account/email-change/request:
    post:
      deprecated: true
      tags:
      - Profile account management
      summary: Request Profile email change
      description: |2

        This endpoint is deprecated. Use [this one](#operation/changeEmailRequestUsingPOST).

        A Profile can request an email change for its account. A confirmation token is sent by and must be applied using the [Confirm Profile email change](#operation/confirmClientEmailChange) endpoint.
      operationId: requestClientEmailChange
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sauth-RequestClientEmailChangeRequestBody'
            example: '{"email":"newEmail","password":"my_password","uuid":"my_uuid","deviceId":"optional"}'
        required: true
      responses:
        '202':
          description: Request accepted
        '400':
          description: Clients not recognizable by email
      x-snr-scopes:
      - client
      x-snr-groups: []
      x-snr-permissions:
      - SAUTH_CHANGE_EMAIL_CLIENT_UPDATE
      security:
      - JWT: []
  /schema-service/v3/screen-views/{feedSlug}/generate:
    post:
      tags:
      - Screen views
      summary: Generate screen view from feed
      description: |
        When this method is called, the Synerise backend finds all screen view campaigns applicable to the JWT context and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned `data` is empty.

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

        If the feed doesn't contain any screen views whose audience matches the JWT context of the request, the response is error 404.
      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-scopes:
      - PROFILE
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      - INCOGNITO_CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
    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.
      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-scopes:
      - PROFILE
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      - INCOGNITO_CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/screen-views/create:
    post:
      tags:
      - Screen views
      summary: Create screen view
      description: Create a screen view.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/screen-views/{screenViewId}/priority:
    put:
      tags:
      - Screen views
      summary: Update screen view priority
      description: Update priority in a screen view.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/screen-views/feeds:
    post:
      tags:
      - Screen views
      summary: Create screen view feed
      description: Create a new screen view feed.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
    get:
      tags:
      - Screen views
      summary: List screen view feeds
      description: Returns a list of screen view feeds.
      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-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/screen-views:
    get:
      tags:
      - Screen views
      summary: List screen views
      description: Returns a paginated list of screen views.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/screen-views/{screenViewId}:
    get:
      tags:
      - Screen views
      summary: Get screen view
      description: Retrieve the details of a screen view.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
    delete:
      tags:
      - Screen views
      summary: Delete screen view
      description: Delete a screen view.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/screen-views/directory:
    post:
      tags:
      - Screen views
      summary: Add screen view directory
      description: Create a directory for screen views.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
    get:
      tags:
      - Screen views
      summary: List screen view directories
      description: Returns a list of screen view directories.
      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-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
    delete:
      tags:
      - Screen views
      summary: Delete screen view directory
      description: Delete a screen view directory. The contents are moved into the default directory.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
    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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
  /schema-service/v2/documents/{slug}/generate:
    get:
      tags:
      - Documents
      summary: Generate document (slug)
      description: |
        Generate a document. Inserts are processed. If an insert can't be processed, the returned `content` is empty.

        If the document includes inserts with a context (for example, `{% customer param %}`), you must authenticate the request with a JWT that provides the context.

        If you want to authenticate with a JWT that doesn't provide the required context, you can use the [`POST /v2/documents/{slug}/generate` endpoint](operation/generateDocumentBySlug) to provide the parameter values in the request body.

        **IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only documents with the audience set to `ALL` ("Everyone" in the Synerise Web Application) can be generated.
      operationId: generateDocumentBySlugGet
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentSlug'
      responses:
        '200':
          description: Processed JSON content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-DocumentGenerateResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      - INCOGNITO_CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
    post:
      tags:
      - Documents
      summary: Generate document (slug)
      description: |
        Generate a document. Inserts are processed. If an insert can't be processed, the returned `content` is empty.

        **IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only documents with the audience set to `ALL` ("Everyone" in the Synerise Web Application) can be generated.
      operationId: generateDocumentBySlug
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentSlug'
      requestBody:
        $ref: '#/components/requestBodies/schema-service-generateDocumentReq'
      responses:
        '200':
          description: Processed JSON content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-DocumentGenerateResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      - INCOGNITO_CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/{documentId}/generate:
    post:
      tags:
      - Documents
      summary: Generate document (document UUID)
      description: |
        Generate a document. Inserts are processed. If an insert can't be processed, the returned `content` is empty.

        **IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only documents with the audience set to `ALL` ("Everyone" in the Synerise Web Application) can be generated.
      operationId: generateDocumentByIdPost
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      requestBody:
        $ref: '#/components/requestBodies/schema-service-generateDocumentReq'
      responses:
        '200':
          $ref: '#/components/responses/schema-service-processedDocumentJsonResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/create:
    post:
      tags:
      - Documents
      summary: Create document
      description: Create a new document.
      operationId: createDocumentPost
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schema-service-CreateDocumentRequest'
      responses:
        '200':
          description: Document created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-Document'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/createNew:
    post:
      tags:
      - Documents
      summary: Initialize document
      description: Create a new document. It is created as a blank, without any conditions.
      operationId: initializeDocumentPost
      security:
      - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schema-service-CreateRequest'
      responses:
        '200':
          description: Document initialized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-DocumentMetadata'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/{documentId}/audience:
    post:
      tags:
      - Documents
      summary: Add audience to document
      description: Define the audience for a document.
      operationId: createDocumentAudience
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schema-service-Audience'
      responses:
        '200':
          description: Audience defined
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-standardApiResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/{documentId}/content:
    post:
      tags:
      - Documents
      summary: Add content to document
      description: Add content and configuration (priority, schema, and so on) to a document.
      operationId: createDocumentContent
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schema-service-DocumentContent'
      responses:
        '200':
          description: Content added
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-standardApiResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/{documentId}/name:
    put:
      tags:
      - Documents
      summary: Rename document
      description: Rename a document.
      operationId: updateDocumentName
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      requestBody:
        content:
          application/json:
            schema:
              type: string
              description: New name for the document
      responses:
        '200':
          description: Document renamed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-standardApiResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/{documentId}/priority:
    put:
      tags:
      - Documents
      summary: Update priority in document
      description: Update priority in a document.
      operationId: updateDocumentPriority
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      requestBody:
        content:
          application/json:
            schema:
              type: integer
              format: int32
      responses:
        '200':
          description: Priority changed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-standardApiResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/preview/by/{identifierType}:
    post:
      tags:
      - Documents
      summary: Preview document content for a profile
      description: |
        Preview document content in context of a profile. Inserts are processed. If an insert can't be processed, the returned `content` is empty.

        This method should not be used in production implementations, its purpose is to test the content. Use the "generate document" endpoints for implementation.
      operationId: previewDocumentByIdentifierPost
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathIdentifierType'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schema-service-PreviewDocumentByProfile'
      responses:
        '200':
          $ref: '#/components/responses/schema-service-processedDocumentJsonResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/{documentIdentifier}/generate/by/{identifierType}:
    post:
      tags:
      - Documents
      summary: Generate document for a profile
      description: |
        Generate a document in context of a profile. Inserts are processed. If an insert can't be processed, the returned `content` is empty.
      operationId: generateDocumentWithProfileContextPost
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentIdentifier'
      - $ref: '#/components/parameters/schema-service-pathIdentifierType'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schema-service-generateDocumentWithIdReq'
      responses:
        '200':
          $ref: '#/components/responses/schema-service-processedDocumentJsonResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/preview/grouped-by/groups/list:
    post:
      tags:
      - Documents
      summary: List grouped documents
      description: Retrieve a group or groups of documents with information about the documents in those groups and relations between them. The response is an array of arrays (groups) of objects (documents).
      operationId: previewListOfDocumentsGroupedByGroup
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/schema-service-groupUuid'
      responses:
        '200':
          description: List of document groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/schema-service-PreviewGroup'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents:
    get:
      tags:
      - Documents
      summary: List documents
      description: Returns a paginated list of documents.
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-queryPage'
      - $ref: '#/components/parameters/schema-service-queryLimit'
      - $ref: '#/components/parameters/schema-service-querySearch'
      - $ref: '#/components/parameters/schema-service-queryDirectoryId'
      - $ref: '#/components/parameters/schema-service-queryGroupId'
      - $ref: '#/components/parameters/schema-service-queryStatus'
      - $ref: '#/components/parameters/schema-service-querySchema'
      responses:
        '200':
          description: List of documents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-DocumentsListResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      operationId: documents-list
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/preview/list:
    post:
      tags:
      - Documents
      summary: List documents from groups
      description: Retrieve a list of documents from a group or groups. The response includes information about relations between documents. The response is an array of objects (documents) without sorting them by group.
      operationId: previewListOfDocumentsByGroup
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/schema-service-groupUuid'
      responses:
        '200':
          description: List of documents from the requested groups, without sorting into groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/schema-service-DocumentPreviewGroup'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/{slug}:
    get:
      tags:
      - Documents
      summary: Get document by slug
      description: Retrieve a document and its metadata. The content isn't processed.
      operationId: get-document-by-slug
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentSlug'
      responses:
        '200':
          $ref: '#/components/responses/schema-service-rawDocumentJsonResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/by/slug/{slug}/predecessors:
    get:
      tags:
      - Documents
      summary: Get predecessors for document
      description: Retrieve information about documents or screen views that refer **to** the requested document.
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentSlug'
      responses:
        '200':
          description: Documents which refer to the requested document
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/schema-service-GraphObject'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      operationId: document-predecessors-by-slug-get
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/{documentId}/predecessors:
    get:
      tags:
      - Documents
      summary: Get predecessors for document
      description: Retrieve information about documents or screen views that refer **to** the requested document.
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      responses:
        '200':
          description: Documents which refer to the requested document
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/schema-service-GraphObject'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      operationId: document-predecessors-get
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/by/slug/{slug}/successors:
    get:
      tags:
      - Documents
      summary: Get successors for document
      description: Retrieve information about documents referenced **from** the requested document.
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentSlug'
      responses:
        '200':
          description: Documents referenced from the requested document
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/schema-service-GraphObject'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      operationId: document-successors-by-slug-get
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/{documentId}/successors:
    get:
      tags:
      - Documents
      summary: Get successors for document
      description: Retrieve information about documents referenced **from** the requested document.
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      responses:
        '200':
          description: Documents referenced from the requested document
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/schema-service-GraphObject'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      operationId: document-successors-get
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /schema-service/v2/documents/{documentId}:
    post:
      tags:
      - Documents
      summary: Update document
      description: Update a document.
      operationId: updateDocumentPost
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schema-service-UpdateDocumentRequest'
      responses:
        '200':
          description: Updated document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-Document'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
    get:
      tags:
      - Documents
      summary: Get document by UUID
      description: Retrieve a document and its metadata. The content isn't processed.
      operationId: get-document
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      responses:
        '200':
          $ref: '#/components/responses/schema-service-rawDocumentJsonResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
    delete:
      tags:
      - Documents
      summary: Delete document
      description: Delete a document. This operation is irreversible.
      operationId: delete-document
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-standardApiResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
  /schema-service/v2/documents/{documentId}/copy:
    post:
      tags:
      - Documents
      summary: Copy document
      description: Copy a document.The copy receives the DRAFT status, regardless of the status of the original document.
      operationId: copy-document
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      responses:
        '200':
          description: Data of the created copy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-DocumentMetadata'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/scheduler/entry:
    post:
      tags:
      - Screen views
      summary: Schedule object
      description: Add a schedule to a document or screen view.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/scheduler/entry/{objectType}/{objectId}:
    get:
      tags:
      - Screen views
      summary: Get schedule the schedule of an object
      description: Get schedule object.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/screen-views/{screenViewId}/status/resume:
    post:
      tags:
      - Screen views
      summary: Resume screen view
      description: Resume a screen view that was paused.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/{documentId}/directory/{directoryId}/attach:
    post:
      tags:
      - Documents
      summary: Assign document to directory
      description: Assign a document to a directory. A document can only belong to one directory and using this endpoint overwrites the current assignment.
      operationId: attach-document-to-directory
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      - $ref: '#/components/parameters/schema-service-pathDirectoryId'
      responses:
        '200':
          description: Document assigned to directory
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-DocumentMetadata'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
  /schema-service/v2/documents/directory/{directoryId}:
    post:
      tags:
      - Documents
      summary: Rename document directory
      description: Update a document directory name.
      operationId: documents-update-name-directory
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDirectoryId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schema-service-RenameDirectory'
      responses:
        '200':
          description: Directory renamed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-Directory'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
    delete:
      tags:
      - Documents
      summary: Delete document directory
      description: Delete a directory. The contents are moved into the default directory.
      operationId: documents-delete-directory
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDirectoryId'
      responses:
        '200':
          description: Directory deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-Directory'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
  /schema-service/v2/documents/directory:
    get:
      tags:
      - Documents
      summary: List document directories
      description: Returns a list of directories.
      security:
      - JWT: []
      responses:
        '200':
          description: List of directories
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/schema-service-Directory'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      operationId: documents-directory-list
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
    post:
      tags:
      - Documents
      summary: Add document directory
      operationId: documents-add-directory
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schema-service-NewDirectory'
      responses:
        '200':
          description: Directory created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-Directory'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/groups/{groupId}:
    delete:
      tags:
      - Documents
      summary: Delete document group
      description: Delete a document group. The documents that were in this group are no longer assigned to any group.
      operationId: deleteGroup
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathGroupId'
      responses:
        '200':
          description: Success, details of the deleted group are returned in the response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-Group'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
  /schema-service/v2/groups:
    post:
      tags:
      - Documents
      summary: Add group
      description: Create a new document group.
      operationId: addGroup
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              title: add group
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                  description: Name of the group
      responses:
        '200':
          description: Created group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-Group'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
    get:
      tags:
      - Documents
      summary: List groups
      description: Returns a list of groups.
      security:
      - JWT: []
      responses:
        '200':
          description: List of groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/schema-service-Group'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      operationId: groups-list
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/{documentId}/status/finish:
    post:
      tags:
      - Documents
      summary: Finish document
      description: |
        Finish a document.

        Finished documents are no longer displayed to recipients.
      operationId: finishDocument
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-standardApiResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/{documentId}/status/activate:
    post:
      tags:
      - Documents
      summary: Activate document
      description: Activate a document. It can now be displayed to recipients.
      operationId: activateDocument
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-standardApiResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/{documentId}/status/resume:
    post:
      tags:
      - Documents
      summary: Resume document
      description: Resume a document that was paused.
      operationId: resumeDocument
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-standardApiResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/v2/documents/{documentId}/status/pause:
    post:
      tags:
      - Documents
      summary: Pause document
      description: Pause a document to temporarily stop displaying it to recipients
      operationId: pauseDocument
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentUuid'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-standardApiResponse'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /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.
      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-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /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.
      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-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
  /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).
      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-scopes:
      - PROFILE
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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).
      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-scopes:
      - PROFILE
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/screenViews/content/{screenViewId}/{screenViewVersion}:
    post:
      deprecated: true
      tags:
      - Screen views (legacy)
      summary: Add content
      description: Add content to a screen view draft.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
  /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.
      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-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
  /schema-service/schemaTypes:
    get:
      tags:
      - Documents
      summary: Get schema types
      description: "Retrieve a list of all schema types in the workspace.\nSchema types can be used to inform your application about the type of\ncontent included in the document's body.  \nIn the Synerise Web Application, they are called \"Type\".\n"
      operationId: getSchemaTypes
      security:
      - JWT: []
      responses:
        '200':
          description: List of schema types
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  description: Schema type ID
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - User
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_READ
    delete:
      tags:
      - Documents
      summary: Delete schema types
      description: Delete one or more schema types. This operation is irreversible.
      operationId: deleteSchemaTypes
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              title: delete schema types
              type: array
              items:
                type: string
                description: Schema ID. Ensure that the IDs are exactly the same as in the database, including escape characters.
        required: true
      responses:
        '200':
          description: Deletion status
          content:
            application/json:
              schema:
                type: boolean
                description: '`true` if successful'
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_DELETE
    post:
      tags:
      - Documents
      summary: Add schema type
      description: "Create a new schema type.  \nSchema types can be used to inform your application about the type of\ncontent included in the document's body.  \nIn the Synerise Web Application, they are called \"Type\".\n"
      operationId: addSchemaType
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              title: add schema type
              type: string
              description: Schema type name.
        required: true
      responses:
        '200':
          description: Schema created
          content:
            application/json:
              schema:
                type: string
                description: Schema name
        '400':
          $ref: '#/components/responses/schema-service-genericError'
        '401':
          $ref: '#/components/responses/schema-service-401'
        '403':
          $ref: '#/components/responses/schema-service-403'
        '404':
          $ref: '#/components/responses/schema-service-404'
        '500':
          $ref: '#/components/responses/schema-service-genericError'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_SCHEMA_CREATE
  /schema-service/document/preview:
    post:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Preview document
      description: Preview a document.
      operationId: documentPreview
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/schema-service-previewReq'
        required: true
      responses:
        '200':
          description: JSON content of the document
          content:
            application/json:
              schema:
                type: object
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_UPDATE
  /schema-service/document/{uuid}:
    post:
      deprecated: true
      tags:
      - Documents (legacy)
      operationId: documentVersionPost
      summary: Create document version
      description: Create a new version of a document. To modify an existing version of a document, see [Update document](#operation/documentUpdatePost).
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentUuidLegacy'
      requestBody:
        content:
          application/json:
            schema:
              title: create document version
              type: object
              properties:
                content:
                  $ref: '#/components/schemas/schema-service-documentContent'
                description:
                  $ref: '#/components/schemas/schema-service-documentDescription'
                name:
                  $ref: '#/components/schemas/schema-service-documentName'
                version:
                  $ref: '#/components/schemas/schema-service-documentVersion'
      responses:
        '200':
          description: Document
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/schema-service-documentView'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_UPDATE
  /schema-service/document/{id}:
    get:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Get raw document
      description: Retrieve a single document in raw form (inserts are not processed).
      operationId: rawDocumentGet
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentIdLegacy'
      responses:
        '200':
          description: Raw document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-documentView'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
  /schema-service/document/{uuid}/{id}:
    post:
      deprecated: true
      tags:
      - Documents (legacy)
      operationId: documentUpdatePost
      summary: Update document
      description: Update an existing version of a document. This endpoint does not create a new version. To create a new version, see [Create document version](#operation/documentVersionPost).
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentUuidLegacy'
      - $ref: '#/components/parameters/schema-service-pathDocumentIdLegacy'
      requestBody:
        content:
          application/json:
            schema:
              title: update document
              type: object
              properties:
                content:
                  $ref: '#/components/schemas/schema-service-documentContent'
                description:
                  $ref: '#/components/schemas/schema-service-documentDescription'
                name:
                  $ref: '#/components/schemas/schema-service-documentName'
      responses:
        '200':
          description: Updated document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-documentView'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_UPDATE
  /schema-service/v2/document/slug/{slug}/content:
    get:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Generate processed document (only content)
      description: Retrieve a generated document, without any metadata in the response. Inserts are processed.
      operationId: generateContentDocumentGetV2
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-PathDocumentSlug'
      responses:
        '200':
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/schema-service-documentContent'
      x-snr-scopes:
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      - PROFILE
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
  /schema-service/document/slug/{slug}/content:
    post:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Generate processed document (only content)
      description: Retrieve a generated document, without any metadata in the response. Inserts are processed.
      operationId: generateContentDocumentPost
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentSlugLegacy'
      - in: query
        name: version
        description: Document version. If not provided, defaults to the latest version.
        required: false
        schema:
          type: string
      - in: query
        name: page
        description: Page of items in the document
        required: false
        schema:
          type: integer
      - in: query
        name: limit
        description: Limit of items per page
        required: false
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              title: generate processed document
              type: object
              additionalProperties:
                type: string
      responses:
        '200':
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/schema-service-documentContent'
      x-snr-scopes:
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      - PROFILE
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
    get:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Generate processed document (only content)
      description: Retrieve a generated document, without any metadata in the response. Inserts are processed.
      operationId: generateContentDocumentGet
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentSlugLegacy'
      - in: query
        name: version
        description: Document version. If not provided, defaults to the latest version.
        required: false
        schema:
          type: string
      - in: query
        name: page
        description: Page of items in the document
        required: false
        schema:
          type: integer
      - in: query
        name: limit
        description: Limit of items per page
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/schema-service-documentContent'
      x-snr-scopes:
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      - PROFILE
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
  /schema-service/document/certification/{slug}:
    get:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Generate certification document with specific slug.
      description: Retrieve a certification document. Inserts are processed.
      operationId: generateCertificationDocumentBySlugGet
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentSlugLegacy'
      - in: query
        name: version
        description: Document version. If not provided, defaults to the latest version.
        required: false
        schema:
          type: string
      - in: query
        name: page
        description: Page of items in the document
        required: false
        schema:
          type: integer
      - in: query
        name: limit
        description: Limit of items per page
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/schema-service-documentContent'
                  schema:
                    $ref: '#/components/schemas/schema-service-DocumentSchema'
                  slug:
                    $ref: '#/components/schemas/schema-service-DocumentSlug'
                  uuid:
                    type: string
                    format: uuid
                    description: Document UUID. The UUID is the same for all versions of a document.
      x-snr-scopes:
      - USER
      - CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
  /schema-service/document/slug/{slug}:
    post:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Generate processed document
      description: Retrieve a generated document. Inserts are processed.
      operationId: generateDocumentPost
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentSlugLegacy'
      - in: query
        name: version
        description: Document version. If not provided, defaults to the latest version.
        required: false
        schema:
          type: string
      - in: query
        name: page
        description: Page of items in the document
        required: false
        schema:
          type: integer
      - in: query
        name: limit
        description: Limit of items per page
        required: false
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                type: string
      responses:
        '200':
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/schema-service-documentContent'
                  schema:
                    $ref: '#/components/schemas/schema-service-DocumentSchema'
                  slug:
                    $ref: '#/components/schemas/schema-service-DocumentSlug'
                  uuid:
                    type: string
                    format: uuid
                    description: Document UUID. The UUID is the same for all versions of a document.
      x-snr-scopes:
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
    get:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Generate processed document
      description: Retrieve a generated document. Inserts are processed.
      operationId: generateDocumentGet
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentSlugLegacy'
      - in: query
        name: version
        description: Document version. If not provided, defaults to the latest version.
        required: false
        schema:
          type: string
      - in: query
        name: page
        description: Page of items in the document
        required: false
        schema:
          type: integer
      - in: query
        name: limit
        description: Limit of items per page
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: Generated document
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    $ref: '#/components/schemas/schema-service-documentContent'
                  schema:
                    $ref: '#/components/schemas/schema-service-DocumentSchema'
                  slug:
                    $ref: '#/components/schemas/schema-service-DocumentSlug'
                  uuid:
                    type: string
                    format: uuid
                    description: Document UUID. The UUID is the same for all versions of a document.
      x-snr-scopes:
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
  /schema-service/document/by-schema/{schema}:
    get:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Generate documents by schema
      description: Generate all documents assigned to a schema. The content is processed.
      operationId: documentsBySchemaGet
      security:
      - JWT: []
      parameters:
      - in: path
        name: schema
        description: Schema name
        required: true
        schema:
          type: string
      - in: query
        name: version
        description: Document version. If not defined, all document versions are generated.
        required: false
        schema:
          type: string
      - in: query
        name: page
        description: Page of items in the document
        required: false
        schema:
          type: integer
      - in: query
        name: limit
        description: Limit of items per page
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: Generated documents
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    content:
                      $ref: '#/components/schemas/schema-service-documentContent'
                    schema:
                      $ref: '#/components/schemas/schema-service-DocumentSchema'
                    slug:
                      $ref: '#/components/schemas/schema-service-DocumentSlug'
                    uuid:
                      type: string
                      format: uuid
                      description: Document UUID. The UUID is the same for all versions of a document.
      x-snr-scopes:
      - USER
      - CLIENT
      - ANONYMOUS_CLIENT
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
  /schema-service/document:
    post:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Create document
      description: Create a new document.
      operationId: createDocumentPostOld
      security:
      - JWT: []
      requestBody:
        $ref: '#/components/requestBodies/schema-service-createDocumentReq'
      responses:
        '200':
          description: Document data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-documentView'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_CREATE
    get:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: List documents
      description: List all documents in the workspace. You can sort and filter the results. The content is raw.
      operationId: listDocumentsGet
      security:
      - JWT: []
      parameters:
      - in: query
        name: search
        description: 'Search term. The following fields are searched: `name`, `description`, `version`, `slug`.'
        required: false
        schema:
          type: string
      - in: query
        name: sortBy
        description: Parameter to sort by
        required: false
        schema:
          type: string
          enum:
          - slug:asc
          - slug:desc
          - name:asc
          - name:desc
          - version:asc
          - version:desc
          - id:asc
          - id:desc
      - in: query
        name: limit
        description: The maximum number of items to retrieve for pagination
        required: false
        schema:
          type: string
      - in: query
        name: offset
        description: Offset for pagination. The first item of the first page has the offset of `0`.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: List of documents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema-service-documentsResponse'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
    delete:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Delete documents
      description: You can delete one or more documents. This operation is irreversible.
      operationId: documentsDelete
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              title: delete documents
              type: array
              items:
                type: string
                description: Document UUID
        required: true
      responses:
        '200':
          description: Deletion status
          content:
            application/json:
              schema:
                type: boolean
                description: '`true` when successful'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_DELETE
  /schema-service/document/{uuid}/versions:
    get:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Get document versions
      description: Retrieve all versions of a document. The content is raw.
      operationId: documentVersionsGet
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentUuidLegacy'
      responses:
        '200':
          description: List of document versions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/schema-service-documentView'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
  /schema-service/document/{uuid}/publish:
    post:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Publish document
      description: Publish a document. You must provide a version in the request body.
      operationId: documentPublishPost
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentUuidLegacy'
      requestBody:
        content:
          application/json:
            schema:
              title: publish document
              type: string
              description: Version of the document
              example: 1.0.5
        required: true
      responses:
        '200':
          description: Publishing status
          content:
            application/json:
              schema:
                type: boolean
                description: '`true` when the document is published'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_UPDATE
  /schema-service/document/slug/{slug}/check:
    get:
      deprecated: true
      tags:
      - Documents (legacy)
      summary: Check if slug is correct
      description: Check if the provided slug exists.
      operationId: slugCheckGet
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/schema-service-pathDocumentSlugLegacy'
      responses:
        '200':
          description: True or False
          content:
            application/json:
              schema:
                type: boolean
                description: '`true` if the slug is correct'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_docs
      x-snr-permissions:
      - SCHEMA_SERVICE_DOCUMENT_READ
  /search/v2/indices/{indexId}/synonyms:
    get:
      summary: Get synonyms
      description: Retrieve a list of synonyms.
      operationId: GetSynonymsV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - SYNONYMS_SEARCH_READ
      tags:
      - Synonyms
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/synonyms-crud-inPathIndexId'
      - $ref: '#/components/parameters/synonyms-crud-paginationPage'
      - $ref: '#/components/parameters/synonyms-crud-paginationLimit'
      - $ref: '#/components/parameters/synonyms-crud-paginationSortBy'
      - $ref: '#/components/parameters/synonyms-crud-paginationOrdering'
      - $ref: '#/components/parameters/synonyms-crud-paginationIncludeMeta'
      - $ref: '#/components/parameters/synonyms-crud-source'
      - $ref: '#/components/parameters/synonyms-crud-state'
      - $ref: '#/components/parameters/synonyms-crud-synonymType'
      - $ref: '#/components/parameters/synonyms-crud-search'
      - $ref: '#/components/parameters/synonyms-crud-confidence'
      responses:
        '200':
          description: List of synonyms returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-PaginatedSynonyms'
        '500':
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-Error'
    post:
      summary: Create synonym
      description: Creates a new synonym.
      operationId: PostSynonymV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - SYNONYMS_SEARCH_CREATE
      tags:
      - Synonyms
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/synonyms-crud-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/synonyms-crud-PostSynonymBody'
      responses:
        '200':
          description: Id of created synonym returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-SingleSynonym'
        '500':
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-Error'
  /search/v2/indices/{indexId}/synonyms/batch:
    post:
      summary: Batch insert synonyms
      description: Insert multiple synonyms into an index at once.
      operationId: BatchSynonyms
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - SYNONYMS_SEARCH_CREATE
      tags:
      - Synonyms
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/synonyms-crud-sourceForImport'
      - $ref: '#/components/parameters/synonyms-crud-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/synonyms-crud-CsvBody'
      responses:
        '200':
          description: Summary of batch insertion
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-BatchResponse'
        '500':
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-Error'
  /search/v2/indices/{indexId}/synonyms/replace-all:
    post:
      summary: Replace all synonyms
      description: <span style="color:red"><strong>Deletes all existing synonyms</strong></span> from an index and then inserts multiple new synonyms at once.
      operationId: ReplaceAllSynonyms
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - SYNONYMS_SEARCH_UPDATE
      tags:
      - Synonyms
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/synonyms-crud-inPathIndexId'
      - $ref: '#/components/parameters/synonyms-crud-sourceForImport'
      requestBody:
        $ref: '#/components/requestBodies/synonyms-crud-CsvBody'
      responses:
        '204':
          description: All synonyms replaced
        '500':
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-Error'
  /search/v2/indices/{indexId}/synonyms/{synonymId}:
    get:
      summary: Get synonym
      description: Retrieves a synonym.
      operationId: GetSynonymV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - SYNONYMS_SEARCH_READ
      tags:
      - Synonyms
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/synonyms-crud-inPathSynonymId'
      - $ref: '#/components/parameters/synonyms-crud-inPathIndexId'
      responses:
        '200':
          description: Synonym returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-SingleSynonym'
        '500':
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-Error'
    put:
      summary: Update synonym
      description: Updates a synonym identified by `id`.
      operationId: PutSynonym
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - SYNONYMS_SEARCH_UPDATE
      tags:
      - Synonyms
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/synonyms-crud-inPathSynonymId'
      - $ref: '#/components/parameters/synonyms-crud-inPathIndexId'
      requestBody:
        $ref: '#/components/requestBodies/synonyms-crud-PostSynonymBody'
      responses:
        '200':
          description: Updated synonym returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-SingleSynonym'
        '500':
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-Error'
    delete:
      summary: Delete synonym
      description: Deletes a synonym with given id.
      operationId: DeleteSynonymV2
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_search
      x-snr-permissions:
      - SYNONYMS_SEARCH_DELETE
      tags:
      - Synonyms
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/synonyms-crud-inPathSynonymId'
      - $ref: '#/components/parameters/synonyms-crud-inPathIndexId'
      responses:
        '204':
          description: Synonym deleted
        '500':
          description: Some error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonyms-crud-Error'
  /tags-collector/directories:
    get:
      tags:
      - Asset tags
      summary: Get all directories
      description: Gets all tag directories from the Workspace.
      operationId: getTagDirectories
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/tags-collector-DirectoryDto-collector'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_DIRECTORY_READ
    post:
      tags:
      - Asset tags
      summary: Create directory
      description: Creates a directory.
      operationId: createDirectory
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tags-collector-DirectoryCreateRequest-collector'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tags-collector-DirectoryDto-collector'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_DIRECTORY_CREATE
  /tags-collector/directories/types:
    get:
      tags:
      - Asset tags
      summary: Get directory types
      description: Gets all directory types.
      operationId: getDirectoryTypes
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/tags-collector-DirectoryTypeDto-collector'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_DIRECTORY_READ
    post:
      tags:
      - Asset tags
      summary: Create directory type
      description: Creates a directory type.
      operationId: createDirectoryType
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tags-collector-DirectoryTypeCreateRequest-collector'
        description: ''
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tags-collector-DirectoryTypeDto-collector'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_DIRECTORY_UPDATE
  /tags-collector/directories/{directoryHash}:
    delete:
      tags:
      - Asset tags
      summary: Delete directory
      description: Deletes a directory.
      operationId: deleteDirectory
      parameters:
      - $ref: '#/components/parameters/tags-collector-DirectoryHash-collector'
      responses:
        '200':
          description: OK
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_DIRECTORY_DELETE
    patch:
      tags:
      - Asset tags
      summary: Update directory
      description: Updates a directory.
      operationId: updateDirectory
      parameters:
      - $ref: '#/components/parameters/tags-collector-DirectoryHash-collector'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tags-collector-DirectoryUpdateRequest-collector'
        description: ''
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tags-collector-DirectoryDto-collector'
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_DIRECTORY_UPDATE
  /tags-collector/directories/{directoryHash}/tags:
    get:
      tags:
      - Asset tags
      summary: Get tags from directory
      description: Retrieve tags from a directory.
      operationId: getTagsUsingGET
      parameters:
      - $ref: '#/components/parameters/tags-collector-DirectoryHash-collector'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/tags-collector-TagDto-collector'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_DIRECTORY_READ
    post:
      tags:
      - Asset tags
      summary: Assign tags to directory
      description: Assign tags to a directory.
      operationId: assignTagsUsingPOST
      parameters:
      - $ref: '#/components/parameters/tags-collector-DirectoryHash-collector'
      requestBody:
        $ref: '#/components/requestBodies/tags-collector-HashArray-collector'
      responses:
        '200':
          description: OK
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_DIRECTORY_UPDATE
    delete:
      tags:
      - Asset tags
      summary: Unassign tags from directory
      description: Unassign tags from a directory. This does not delete the tags or the directory.
      operationId: unassignTagUsingDELETE
      parameters:
      - $ref: '#/components/parameters/tags-collector-DirectoryHash-collector'
      requestBody:
        $ref: '#/components/requestBodies/tags-collector-HashArray-collector'
      responses:
        '200':
          description: OK
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_DIRECTORY_DELETE
  /tags-collector/directories/{directoryHash}/types:
    put:
      tags:
      - Asset tags
      summary: Update directory type
      description: Update the type of a directory.
      operationId: updateTypeUsingPUT
      parameters:
      - $ref: '#/components/parameters/tags-collector-DirectoryHash-collector'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tags-collector-DirectoryTypeUpdateRequest-collector'
        description: ''
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tags-collector-DirectoryDto-collector'
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_DIRECTORY_UPDATE
  /tags-collector/tags:
    get:
      tags:
      - Asset tags
      summary: Get tag list
      description: Gets a paginated list of tags that can be assigned to assets, for example promotions.
      operationId: getTagList
      parameters:
      - in: query
        name: page
        description: Page to retrieve
        required: false
        schema:
          type: integer
          default: 0
      - in: query
        name: size
        description: Limit of items per page
        required: false
        schema:
          type: integer
          default: 10
      - in: query
        name: directoryType
        description: Directory type
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tags-collector-PaginationResponse_PaginatedTagDto_'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_TAG_READ
    post:
      tags:
      - Asset tags
      summary: Create tag
      description: Creates a tag that can be assigned to assets, for example promotions.
      operationId: createTag
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tags-collector-TagCreateRequest-collector'
        description: ''
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tags-collector-TagDto-collector'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_TAG_CREATE
  /tags-collector/tags/{tagHash}:
    patch:
      tags:
      - Asset tags
      summary: Update tag
      description: Updates a tag definition.
      operationId: updateTag
      parameters:
      - $ref: '#/components/parameters/tags-collector-TagHash-collector'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tags-collector-TagUpdateRequest-collector'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tags-collector-TagDto-collector'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      x-snr-scopes:
      - USER
      - CLIENT
      - PROFILE
      x-snr-groups:
      - assets_tags
      x-snr-permissions:
      - TAGS_COLLECTOR_TAG_UPDATE
  /template-backend/template:
    get:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_BACKEND_TEMPLATE_READ
      x-snr-groups:
      - templates
      summary: List templates
      operationId: list-templates
      tags:
      - Templates
      description: Returns all templates from a Workspace, with an option to filter by type.
      parameters:
      - in: query
        name: type
        schema:
          type: string
          enum:
          - SMS
          - MOBILE_PUSH
          - WEB_PUSH
          - DYNAMIC_CONTENT
          - LANDING_PAGE
          - EMAIL
          - SOCIAL_MEDIA
          - IN_APP
        description: The type of templates to return
        required: false
      - in: query
        name: search
        schema:
          type: string
        description: Searched phrase
        required: false
      - in: query
        name: limit
        schema:
          type: number
        required: false
      - in: query
        name: offset
        schema:
          type: number
        required: false
      - in: query
        name: approved
        required: false
        schema:
          type: boolean
          default: false
        description: When approval-service enabled it filters for approved templates
      responses:
        '200':
          description: An array of templates
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/template-backend-TemplateOverviewResponse'
      security:
      - JWT: []
    post:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_CREATE
      x-snr-groups:
      - templates
      summary: Create template
      operationId: create-template
      tags:
      - Templates
      description: Create a new template.
      requestBody:
        description: Template to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template-backend-TemplateCreateRequest'
      responses:
        '200':
          description: Created template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template-backend-TemplateDetailsResponse'
      security:
      - JWT: []
  /template-backend/template/{templateUuid}:
    get:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_READ
      x-snr-groups:
      - templates
      summary: Get template by UUID
      operationId: get-template
      tags:
      - Templates
      description: Return the details of a template identified by its UUID.
      parameters:
      - $ref: '#/components/parameters/template-backend-templateUuid'
      responses:
        '200':
          description: Template details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template-backend-TemplateDetailsResponse'
      security:
      - JWT: []
    patch:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_UPDATE
      x-snr-groups:
      - templates
      summary: Patch a template
      operationId: patch-template
      tags:
      - Templates
      description: Change template content.
      parameters:
      - $ref: '#/components/parameters/template-backend-templateUuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template-backend-TemplateUpdateRequest'
      responses:
        '200':
          description: Template details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template-backend-TemplateDetailsResponse'
      security:
      - JWT: []
  /template-backend/template/functional:
    post:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_FUNCTIONAL_CREATE
      x-snr-groups:
      - templates
      summary: Create functional template
      operationId: create-functional-template
      tags:
      - Templates
      description: Create a new functional template. Functional templates are used for cases not covered by the [Create template endpoint](#operation/create-template), such as a password change page.
      requestBody:
        description: Functional template to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template-backend-FunctionTemplateCreateRequest'
      responses:
        '200':
          description: Created template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template-backend-DefaultTemplateDetailsResponse'
      security:
      - JWT: []
  /template-backend/template/move:
    post:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_UPDATE
      x-snr-groups:
      - templates
      summary: Move templates to another directory
      operationId: move-templates
      tags:
      - Templates
      description: Move templates to another directory.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template-backend-MoveTemplatesRequest'
      responses:
        '200':
          description: Number of moved templates
          content:
            application/json:
              schema:
                type: integer
                description: Number of moved templates
                example: 12
      security:
      - JWT: []
  /template-backend/template/remove:
    post:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_DELETE
      x-snr-groups:
      - templates
      summary: Remove templates
      operationId: remove-templates
      tags:
      - Templates
      description: Delete templates. This operation is irreversible.
      requestBody:
        description: List of template UUIDs to remove
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/template-backend-TemplateHashId'
      responses:
        '200':
          description: Number of removed templates
          content:
            application/json:
              schema:
                type: integer
                description: Number of removed templates
                example: 12
      security:
      - JWT: []
  /template-backend/template/getById/{id}:
    get:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_READ
      x-snr-groups:
      - templates
      summary: Get template by ID
      operationId: get-id-template
      description: Retrieve a template identified by ID.
      tags:
      - Templates
      parameters:
      - in: path
        name: id
        schema:
          type: integer
          format: int64
          example: 12
        description: Template ID
        required: true
      responses:
        '200':
          description: Template details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template-backend-TemplateDetailsResponse'
      security:
      - JWT: []
  /template-backend/directory:
    get:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - DIRECTORY_READ
      x-snr-groups:
      - templates
      tags:
      - Template directories
      summary: Get directories
      operationId: get-directories
      description: Retrieve a list of all directories in the Workspace.
      responses:
        '200':
          description: Directory list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/template-backend-DirectoryResponse'
      security:
      - JWT: []
    post:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - DIRECTORY_CREATE
      x-snr-groups:
      - templates
      tags:
      - Template directories
      summary: Create directory
      operationId: create-directory
      description: Create a new directory for templates. A directory can store only one type of templates.
      requestBody:
        description: Directory to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template-backend-DirectoryCreateRequest'
      responses:
        '200':
          description: Created directory
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template-backend-DirectoryResponse'
      security:
      - JWT: []
  /template-backend/directory/byType:
    get:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - DIRECTORY_READ
      x-snr-groups:
      - templates
      tags:
      - Template directories
      summary: Get directories by type
      operationId: get-type-directories
      description: Retrieve a list of directories of a single type.
      parameters:
      - in: query
        name: type
        schema:
          type: string
          enum:
          - SMS
          - MOBILE_PUSH
          - WEB_PUSH
          - DYNAMIC_CONTENT
          - LANDING_PAGE
          - EMAIL
          - SOCIAL_MEDIA
          - IN_APP
        description: |2

          The type of directories to return (directory types match the template types stored in them).

          Directories with null type are always returned.
        required: true
      responses:
        '200':
          description: Directory list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/template-backend-DirectoryResponse'
      security:
      - JWT: []
  /template-backend/directory/{directoryUUID}:
    patch:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - DIRECTORY_UPDATE
      x-snr-groups:
      - templates
      summary: Rename directory
      operationId: update_directory
      description: Rename a directory.
      tags:
      - Template directories
      parameters:
      - $ref: '#/components/parameters/template-backend-directoryUuid'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: New name of the directory. If not sent, the name of the directory is set to null.
                  default: null
      responses:
        '200':
          description: Directory details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template-backend-DirectoryResponse'
      security:
      - JWT: []
    delete:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - DIRECTORY_DELETE
      x-snr-groups:
      - templates
      summary: Remove directory
      operationId: remove_directory
      description: Remove a directory. Only empty directories can be removed.
      tags:
      - Template directories
      parameters:
      - $ref: '#/components/parameters/template-backend-directoryUuid'
      responses:
        '200':
          description: Directory removed
        '400':
          description: Directory is not empty
      security:
      - JWT: []
  /template-backend/upload/zip:
    post:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_CREATE
      x-snr-groups:
      - templates
      summary: Create template from ZIP
      operationId: create-zip-template
      tags:
      - Templates
      description: Create new template from ZIP file.
      requestBody:
        description: ZIP file with template
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - filename
              properties:
                filename:
                  type: string
                  format: binary
                  description: ZIP file
      responses:
        '200':
          description: Created template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template-backend-TemplateResponse'
      security:
      - JWT: []
  /template-backend/upload/url:
    post:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_CREATE
      x-snr-groups:
      - templates
      summary: Create template from URL
      operationId: create-url-template
      tags:
      - Templates
      description: Create new template from URL.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: ''
              required:
              - url
              properties:
                url:
                  type: string
                  description: URL of the template
      responses:
        '200':
          description: Created template
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/template-backend-TemplateResponse'
      security:
      - JWT: []
  /template-backend/preview:
    post:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_CREATE
      x-snr-groups:
      - templates
      tags:
      - Preview
      summary: Create preview
      operationId: create-preview
      description: Create a new preview for templates on pages.
      requestBody:
        description: Preview to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template-backend-PreviewCreateRequest'
      responses:
        '201':
          description: Created preview
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template-backend-PreviewResponse'
        '400':
          description: Bad request error
      security:
      - JWT: []
  /template-backend/preview/{previewUuid}:
    get:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_READ
      x-snr-groups:
      - templates
      tags:
      - Preview
      summary: Get preview
      operationId: get-preview
      description: Get template preview in the Workspace.
      parameters:
      - $ref: '#/components/parameters/template-backend-previewUuid'
      responses:
        '200':
          description: Get new preview
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/template-backend-PreviewGetResponse'
        '400':
          description: Bad request error
      security:
      - JWT: []
    patch:
      x-snr-scopes:
      - USER
      x-snr-permissions:
      - TEMPLATE_UPDATE
      x-snr-groups:
      - templates
      tags:
      - Preview
      summary: Update preview
      operationId: update_preview
      description: Update a preview.
      parameters:
      - $ref: '#/components/parameters/template-backend-previewUuid'
      requestBody:
        description: Preview to update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/template-backend-PreviewUpdateRequest'
      responses:
        '200':
          description: Updated preview
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/template-backend-PreviewResponse'
        '400':
          description: Bad request error
      security:
      - JWT: []
  /uauth/auth/login/user:
    post:
      tags:
      - Authorization
      summary: Log in as User
      description: |-
        Authenticate as a User.

        **Note:** To perform operations within a Workspace, you must [select a Workspace](#operation/userProfileLoginUsingPOST).
      operationId: userLogin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-UserAuthenticationRequest'
        required: true
      responses:
        '200':
          description: Login details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-AuthenticationResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /uauth/auth/login/user/mfa/verification:
    post:
      tags:
      - Authorization
      summary: Verify User multi-factor authentication
      description: |-
        Authenticate as a User with multi-factor authentication.

        **Note:** To perform operations within a Workspace, you must [select a Workspace](#operation/userProfileLoginUsingPOST).
      operationId: userMfaLogin
      parameters:
      - $ref: '#/components/parameters/uauth-mfaType'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-MultiFactorAuthVerificationRequest'
        required: true
      responses:
        '200':
          description: Login details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-AuthenticationResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_PREAUTHORIZED_USER
      - ROLE_USER
      security:
      - JWT: []
  /uauth/auth/login/user/profile/{businessProfileUUID}:
    post:
      tags:
      - Authorization
      summary: Select Workspace
      description: After logging in as a User, select a Workspace where you want to perform operations.
      operationId: userProfileLoginUsingPOST
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/uauth-businessProfileId'
      responses:
        '200':
          description: Login details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-AuthenticationResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
        '423':
          $ref: '#/components/responses/uauth-423'
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
  /uauth/business-profile/:
    get:
      tags:
      - Authorization
      summary: Get Workspaces
      description: Retrieve a list of Workspaces available to the user.
      operationId: getBusinessProfilesUsingGET
      parameters:
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
          format: int32
          default: 0
      - name: size
        in: query
        description: Page size
        required: false
        schema:
          type: integer
          format: int32
          default: 5000
      - name: query
        in: query
        description: Search query
        required: false
        schema:
          type: string
          default: ''
      - name: sort
        in: query
        description: Sort field
        required: false
        schema:
          type: string
          default: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uauth-BusinessProfileResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      security:
      - JWT: []
  /uauth/business-profile/ids:
    get:
      tags:
      - Authorization
      summary: Get Workspaces ids with user-specific data
      description: Retrieve a list of workspace ids available to the user, with added user-specific data
      operationId: getBusinessProfilesIdsUsingGET
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uauth-BusinessProfileUserSpecific'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      security:
      - JWT: []
  /uauth/business-profile/mark-favorite:
    post:
      tags:
      - Settings
      summary: Add or remove business profile to favorites
      description: Business profile can be added or removed from favorites using this endpoint
      operationId: postBPFavorite
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      security:
      - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-MarkUserFavoriteBusinessProfile'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
  /uauth/business-profile/current:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      tags:
      - Authorization
      summary: Get current Workspace
      description: Retrieve information about the currently selected workspace.
      operationId: getCurrentBusinessProfileUsingGET
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-CurrentBusinessProfileResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - JWT: []
  /uauth/business-profile/mfa/requirements:
    post:
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      tags:
      - Access control
      summary: Enable MFA requirement for workspace
      description: This request enables multi-factor authentication requirement for the currently selected workspace. After enabling this setting, only users with MFA can access the workspace.
      operationId: setMfaRequirementForBusinessProfileUsingPOST
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - JWT: []
    delete:
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      tags:
      - Access control
      summary: Disable MFA requirement for workspace
      description: This request disables multi-factor authentication requirement for the currently selected workspace. After disabling this setting, users without MFA can access the workspace.
      operationId: removeMfaRequirementFromBusinessProfileUsingDELETE
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - JWT: []
  /uauth/change-password:
    post:
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      - ROLE_PREAUTHORIZED_USER
      tags:
      - User account management
      summary: Change user password
      description: Change a user's password.
      operationId: changePasswordUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-ChangePasswordRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-ChangePasswordResponse'
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - JWT: []
  /uauth/permissions/group/role/{roleId}:
    get:
      tags:
      - Access groups
      summary: List grouped permissions
      description: List all permissions for a role, including information about permission grouping.
      operationId: listPermissionGroupUsingGET
      parameters:
      - $ref: '#/components/parameters/uauth-roleId'
      responses:
        '200':
          description: 'This schema is **recursive**: the `children` array can include more groups, which include more groups, etc.'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uauth-PermissionGroupDetailsDTO'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_PERMISSIONS_ROLE_GROUP_READ
  /uauth/password-reset/request:
    post:
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      tags:
      - User account management
      summary: Request user password reset
      description: The user can request a password reset token sent by email.
      operationId: requestPasswordResetUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-PasswordResetRequest'
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
  /uauth/password-reset/confirmation:
    post:
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      tags:
      - User account management
      summary: Confirm user password reset
      description: Confirm user password reset using the token received by email.
      operationId: confirmPasswordResetUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-PasswordResetConfirmation'
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
  /uauth/roles/listing:
    get:
      tags:
      - Access groups
      summary: Get role groups
      description: Retrieve a list of user role groups.
      operationId: getRoleGroupsUsingGET
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uauth-RoleGroupResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_PERMISSIONS_ROLES_LISTING_READ
      security:
      - JWT: []
  /uauth/roles/role-group:
    post:
      tags:
      - Access groups
      summary: Create role group
      description: Create a new role group. A new group does not include any roles. To add a role to a group, [update the role](#operation/updateRoleUsingPOST).
      operationId: createRoleGroupUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-RoleGroupDataRequest'
        required: true
      responses:
        '200':
          description: New group created; response includes all existing groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uauth-RoleGroupResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_PERMISSIONS_ROLE_GROUP_CREATE
      security:
      - JWT: []
  /uauth/roles/role-group/{groupId}:
    post:
      tags:
      - Access groups
      summary: Update role group
      description: Update a group. To add a role to a group, [update the role](#operation/updateRoleUsingPOST).
      operationId: updateRoleGroupUsingPOST
      parameters:
      - $ref: '#/components/parameters/uauth-roleGroupId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-RoleGroupDataRequest'
        required: true
      responses:
        '200':
          description: Group updated; response includes all existing groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uauth-RoleGroupResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_PERMISSIONS_ROLE_GROUP_UPDATE
      security:
      - JWT: []
    delete:
      tags:
      - Access groups
      summary: Delete role group
      description: Delete a role group permanently.
      operationId: deleteRoleGroupUsingDELETE
      parameters:
      - $ref: '#/components/parameters/uauth-roleGroupId'
      responses:
        '200':
          description: Group deleted; response includes all existing groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uauth-RoleGroupResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_PERMISSIONS_ROLE_GROUP_DELETE
      security:
      - JWT: []
  /uauth/roles/role:
    post:
      tags:
      - Access groups
      summary: Create role
      description: Create a new user role.
      operationId: createRoleUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-RoleDataRequest'
        required: true
      responses:
        '200':
          description: Role created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-RoleFullResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_PERMISSIONS_ROLE_UPDATE
      security:
      - JWT: []
  /uauth/roles/{roleId}:
    get:
      tags:
      - Access groups
      summary: Get role
      description: Retrieve the details of a user role
      operationId: getRoleUsingGET
      parameters:
      - $ref: '#/components/parameters/uauth-roleId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-RoleFullResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_PERMISSIONS_ROLE_READ
      security:
      - JWT: []
  /uauth/roles/role/{roleId}:
    post:
      tags:
      - Access groups
      summary: Update role
      description: Update a user role.
      operationId: updateRoleUsingPOST
      parameters:
      - $ref: '#/components/parameters/uauth-roleId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-RoleDataRequest'
        required: true
      responses:
        '200':
          description: Role updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-RoleFullResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_PERMISSIONS_ROLE_UPDATE
      security:
      - JWT: []
    delete:
      tags:
      - Access groups
      summary: Delete role
      description: Delete a user role permanently.
      operationId: deleteRoleUsingDELETE_1
      parameters:
      - $ref: '#/components/parameters/uauth-roleId'
      responses:
        '200':
          description: Role deleted, response includes all existing groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uauth-RoleGroupResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_PERMISSIONS_ROLE_DELETE
      security:
      - JWT: []
  /uauth/user/confirmation/{confirmationToken}:
    get:
      tags:
      - User account management
      summary: Confirm user registration
      description: Confirm user registration. The token is sent by email.
      operationId: confirmUserUsingGET
      parameters:
      - name: confirmationToken
        in: path
        required: true
        description: Confirmation token
        schema:
          type: string
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /uauth/user/register:
    post:
      tags:
      - User account management
      summary: Register user
      description: Register a new user. Before the new account can be used, it must be [confirmed](#operation/confirmUserUsingGET).
      operationId: registerUserUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-UserRegistrationRequest'
        required: true
      responses:
        '200':
          description: OK
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
        '409':
          description: User already registered
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /uauth/user/register/invitation/{invitationToken}:
    get:
      tags:
      - User management
      summary: Find user by invitation token
      description: You can retrieve the details of an account by providing the invitation token generated for that account.
      operationId: findByInvitationTokenGET
      parameters:
      - name: invitationToken
        in: path
        required: true
        description: Invitation token
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-InvitationResponse'
        '201':
          description: Created
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /uauth/user/register/resend-confirmation:
    post:
      tags:
      - User account management
      summary: Re-send user confirmation token
      description: If the confirmation token does not reach the user's inbox, you can send a new one.
      operationId: resendConfirmationUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-ResendConfirmationPayload'
      responses:
        '200':
          description: OK
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /uauth/users/available-roles:
    get:
      tags:
      - Access groups
      summary: Get available roles
      description: Retrieve a list of user roles available in the business profile.
      operationId: getAvailableRolesUsingGET
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uauth-RoleResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
  /uauth/users/invitations/invite:
    post:
      tags:
      - User management
      summary: Invite user
      description: Invite a user to join a workspace. The user receives an email with an invitation token.
      operationId: inviteUserUsingPOST
      requestBody:
        description: All the data sent in this request applies to the user being invited.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-BusinessProfileInvitationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-BusinessProfileInvitationResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_INVITATIONS_CREATE
      security:
      - JWT: []
  /uauth/users/invitations/invite-bulk:
    post:
      tags:
      - User management
      summary: Invite many users
      description: Invite a number of users to the workspace at once. The users receive emails with invitation tokens.
      operationId: bulkInviteUsersUsingPOST
      requestBody:
        description: All the data sent in this request refers to the users being invited.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-BusinessProfileBulkInvitationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-BusinessProfileInvitationResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_INVITATIONS_CREATE
      security:
      - JWT: []
  /uauth/users/invitations/{invitationIds}:
    delete:
      tags:
      - User management
      summary: Delete invitations
      description: Delete invitations that were not yet accepted.
      operationId: deleteInvitationUsingDELETE
      parameters:
      - $ref: '#/components/parameters/uauth-InvitationIds'
      responses:
        '200':
          description: OK
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_INVITATIONS_DELETE
      security:
      - JWT: []
  /uauth/users/invitations/{invitationId}:
    post:
      tags:
      - User management
      summary: Update invitation
      description: Update the details of an invitation.
      operationId: updateInvitationUsingPOST
      parameters:
      - name: invitationId
        in: path
        description: To obtain the invitation ID, check the [list of users with PENDING status](#/operation/UsersListingUsingGET). The invitation ID for a user is the same as the ID of that user.
        required: true
        schema:
          type: integer
          format: int64
      requestBody:
        description: All the data sent in this request refers to the user being invited.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-InvitationUpdateRequest'
        required: true
      responses:
        '200':
          description: OK
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_INVITATIONS_UPDATE
      security:
      - JWT: []
  /uauth/users/my-account/strongest-password-settings:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_PREAUTHORIZED_USER
      - ROLE_USER
      tags:
      - Access control
      operationId: getStrongestPasswordSettings
      summary: Get own strongest password policy
      description: If a user has access to more than one workspace, you can use this endpoint to find the strictest password policy of all the policies in these workspaces. The user's password must meet the requirements of that strictest policy.
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/uauth-BusinessProfilePasswordSettingsData'
  /uauth/users/listing:
    get:
      tags:
      - User management
      summary: List users
      description: List users from the current workspace
      operationId: listUsersUsingGET
      parameters:
      - $ref: '#/components/parameters/uauth-PaginationPage'
      - $ref: '#/components/parameters/uauth-PaginationSize'
      - name: status
        in: query
        description: Filters the results by status of the users
        required: true
        schema:
          type: string
          enum:
          - ALL
          - ACTIVE
          - PENDING
          - EXPIRED
          - GUEST
          - MANAGED
      - name: search
        in: query
        required: true
        description: String to search for in the first names, surnames, and email addresses
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-ReactUsersListing'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_USERS_LISTING_READ
      security:
      - JWT: []
  /uauth/users/listing/autocomplete:
    get:
      tags:
      - User management
      summary: Autocomplete user search result
      description: You can use this endpoint to obtain data for search autocomplete.
      operationId: getListingAutocomplete
      parameters:
      - name: email
        in: query
        description: User's email address
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uauth-UserAutoCompleteResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      - analytics
      x-snr-permissions:
      - UAUTH_USERS_LISTING_AUTOCOMPLETE_READ
      security:
      - JWT: []
  /uauth/users/profile-association/{ids}:
    delete:
      tags:
      - User management
      summary: Remove users from workspace
      description: Delete user associations from a workspace. This does not delete the user accounts.
      operationId: deleteUsersUsingDELETE
      parameters:
      - $ref: '#/components/parameters/uauth-UserIds'
      responses:
        '200':
          description: OK
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_USERS_DELETE
      security:
      - JWT: []
  /uauth/users/my-account:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      tags:
      - User account management
      summary: Get user's own data
      description: A user can retrieve their account data.
      operationId: getUserOwnDataUsingGET
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-MyAccountUserResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - JWT: []
    post:
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      tags:
      - User account management
      summary: Update user's own data
      description: A user can update their own details.
      operationId: updateUsersOwnDataUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-ReactUserEditRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-MyAccountUserResponse'
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - JWT: []
    delete:
      tags:
      - User account management
      summary: Delete user's own account
      description: A user can delete their own account.
      operationId: deleteUserUsingDELETE
      responses:
        '200':
          description: OK
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      security:
      - JWT: []
  /uauth/v2/auth/login/profile:
    post:
      summary: Log in as Workspace
      description: Obtain a new Workspace JWT Token.
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      tags:
      - Authorization
      operationId: profileLogin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-BusinessProfileAuthenticationRequest'
        required: true
      responses:
        '200':
          description: New JWT token for Workspace authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-TokenResponse'
        '400':
          description: Request malformed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-Error'
        '401':
          description: Unauthorized, API key does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-Error'
  /uauth/users/{userId}:
    get:
      tags:
      - User management
      summary: Get user data
      operationId: getUserDataUsingGET
      parameters:
      - $ref: '#/components/parameters/uauth-UserId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-ReactUserResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      security:
      - JWT: []
    post:
      tags:
      - User management
      summary: Update user data
      operationId: updateUserDataUsingPOST
      parameters:
      - $ref: '#/components/parameters/uauth-UserId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-ReactOtherUserEditRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-ReactUserResponse'
        '201':
          description: Created
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_USER
      security:
      - JWT: []
  /uauth/users/activate:
    post:
      tags:
      - User management
      summary: Activate users
      description: Activate access to the workspace for a number of users
      operationId: activateUsersUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-ActivationRequest'
      responses:
        '200':
          description: OK
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_USERS_DELETE
      security:
      - JWT: []
  /uauth/users/deactivate:
    post:
      tags:
      - User management
      summary: De-activate users
      description: De-activate access to the workspace for a number of users
      operationId: deactivateUsersUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-ActivationRequest'
      responses:
        '200':
          description: OK
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_USERS_UPDATE
      security:
      - JWT: []
  /uauth/users/{userId}/access-time:
    put:
      tags:
      - User management
      summary: Change access expiration time
      description: Change the date when a user's access to the workspace is cancelled.
      operationId: changeUserAccessExpirationDateUsingPut
      parameters:
      - $ref: '#/components/parameters/uauth-UserId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-ReactUserProlongAccessRequest'
        required: true
      responses:
        '200':
          description: OK
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_USERS_UPDATE
      security:
      - JWT: []
  /uauth/users/{userId}/password-reset:
    post:
      tags:
      - User management
      summary: Reset another user's password
      description: Request a password reset for another user. That user receives an email with a password reset token. Their account is locked until the new password is set.
      operationId: resetPasswordUsingPOST
      parameters:
      - $ref: '#/components/parameters/uauth-UserId'
      responses:
        '200':
          description: OK
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_USERS_UPDATE
  /uauth/users/{userId}/mfa-reset:
    put:
      tags:
      - User management
      summary: Reset another user's multi-factor authentication
      description: |
        You can reset the settings of another user's multi-factor authentication. This can be used, for example, if the user has lost both their device with the MFA application and the recovery code.
        The user will need to re-enable MFA in the same way as when setting it up for the first time.
      operationId: resetMFAUsingPUT
      parameters:
      - $ref: '#/components/parameters/uauth-UserId'
      responses:
        '200':
          description: OK
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_USERS_UPDATE
  /uauth/users/{ids}:
    delete:
      tags:
      - User management
      summary: Delete user account
      description: Permanently deletes a user account.
      operationId: deleteManagedUserUsingDELETE
      parameters:
      - $ref: '#/components/parameters/uauth-UserIds'
      responses:
        '200':
          description: OK
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users
      x-snr-permissions:
      - UAUTH_USERS_DELETE
      security:
      - JWT: []
  /uauth/settings/user-bp-ip-policy:
    get:
      tags:
      - Access control
      summary: Get IP allowlist policy
      operationId: getUserBpIpPolicyUsingGET
      description: Retrieve the details of IP allowlisting policy of the workspace.
      responses:
        '200':
          description: IP policy details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-IpPolicySettings'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users_am_ip_access_restriction
      x-snr-permissions:
      - UAUTH_SETTINGS_USER_IP_READ
      security:
      - JWT: []
    post:
      tags:
      - Access control
      summary: Update IP allowlist policy
      operationId: updateUserBpIpPolicyUsingPOST
      description: Update the details of IP allowlisting policy of the workspace.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-IpPolicySettings'
        required: true
      responses:
        '200':
          description: Updated IP policy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-IpPolicySettings'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users_am_ip_access_restriction
      x-snr-permissions:
      - UAUTH_SETTINGS_USER_IP_UPDATE
      security:
      - JWT: []
  /uauth/strongest-password-settings-by-email/{email}:
    get:
      x-snr-scopes: []
      x-snr-groups: []
      x-snr-permissions:
      - NO_TOKEN
      tags:
      - Access control
      summary: Get strongest password policy of a User
      description: If a user has access to more than one workspace, you can use this endpoint to find the strictest password policy of all the policies in these workspaces. The user's password must meet the requirements of that strictest policy.
      operationId: getStrongestPasswordSettingsUsingGET
      parameters:
      - name: email
        in: path
        description: User's email address
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-BusinessProfilePasswordSettingsData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - JWT: []
  /uauth/users/mfa/initialization:
    post:
      tags:
      - Access control
      summary: Initiate multi-factor authentication for user
      description: Begins the process of enabling multi-factor authentication for a user by initiating it.
      operationId: initiateUserMfaUsingPOST
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/uauth-mfaType'
      responses:
        '200':
          description: Secret and QR code URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-MultiFactorAuthInitResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_PREAUTHORIZED_USER
      - ROLE_USER
  /uauth/users/mfa/confirmation:
    post:
      tags:
      - Access control
      summary: Confirm multi-factor authentication for user
      description: Continues the process of enabling multi-factor authentication for a user by confirming it.
      operationId: confirmUserMfaUsingPOST
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/uauth-mfaType'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-MultiFactorAuthConfirmRequest'
        required: true
      responses:
        '200':
          description: User's backup code
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-MultiFactorAuthConfirmResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_PREAUTHORIZED_USER
      - ROLE_USER
  /uauth/users/mfa:
    delete:
      tags:
      - Access control
      summary: Remove multi-factor authentication for user
      description: Removes user multi-factor authentication.
      operationId: removesUserMfaUsingPOST
      security:
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/uauth-mfaType'
      - name: backupCode
        in: query
        description: User's backup code
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups: []
      x-snr-permissions:
      - ROLE_PREAUTHORIZED_USER
      - ROLE_USER
  /uauth/settings/password-policy:
    get:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users_am_password_policy
      x-snr-permissions:
      - UAUTH_SETTINGS_PASSWORD_POLICY_READ
      tags:
      - Access control
      summary: Get user password policy
      description: Retrieve the user password policy of the workspace.
      operationId: getPasswordSettingsUsingGET
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-PasswordSettingsData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - JWT: []
    post:
      x-snr-scopes:
      - USER
      x-snr-groups:
      - settings_users_am_password_policy
      x-snr-permissions:
      - UAUTH_SETTINGS_PASSWORD_POLICY_UPDATE
      tags:
      - Access control
      summary: Update user password policy
      description: Update the user password policy. Entering `0` as the value disables a requirement.
      operationId: updateSettingsUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-PasswordSettingsData'
      responses:
        '200':
          description: New password policy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-PasswordSettingsData'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
      - JWT: []
  /uauth/managed-domains:
    get:
      tags:
      - Directory
      summary: List managed domains
      description: Retrieve a list of all domains managed by the workspace.
      operationId: getManagedDomainListUsingGET
      parameters:
      - name: page
        in: query
        description: Page number (first page is 1)
        required: false
        schema:
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        description: The number of entries on a page
        required: false
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-ManagedDomainListing'
        '201':
          description: Created
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - managed_domains
      x-snr-permissions:
      - UAUTH_MANAGED_DOMAINS_LISTING_READ
    delete:
      tags:
      - Directory
      summary: Delete managed domain
      description: Remove management settings for a domain.
      operationId: deleteManagedDomainUsingDELETE
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-ManagedDomainRequest'
      responses:
        '204':
          description: No Content
          content: {}
        '201':
          description: Created
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - managed_domains
      x-snr-permissions:
      - UAUTH_MANAGED_DOMAINS_DELETE
  /uauth/managed-domains/initialize-code:
    get:
      tags:
      - Directory
      summary: Initialize managed domain
      description: Generate a verification string for a domain. This string is then used in [this endpoint](#operation/verifyManagedDomainUsingPOST). The verification string for a particular workspace is always the same.
      operationId: initializeManagedDomainUsingPOST
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-ManagedDomainCodeResponse'
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - managed_domains
      x-snr-permissions:
      - UAUTH_MANAGED_DOMAINS_CREATE
  /uauth/managed-domains/verification:
    post:
      tags:
      - Directory
      summary: Verify managed domain
      description: Verify a managed domain to assign it to a workspace. All users who belong to the domain are managed by that workspace.
      operationId: verifyManagedDomainUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uauth-ManagedDomainVerificationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uauth-ManagedDomainResponse'
        '201':
          description: Created
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '404':
          description: Not Found
          content: {}
      x-snr-scopes:
      - USER
      x-snr-groups:
      - managed_domains
      x-snr-permissions:
      - UAUTH_MANAGED_DOMAINS_CREATE
  /uploader-service/clients/files/by/{identifierType}:
    post:
      tags:
      - Uploader
      summary: Add files for dynamic attachments
      description: Add base64 encoded files to the storage for use in [dynamic attachments](https://help.synerise.com/docs/automation/actions/send-email/#dynamic-attachments). You can send up to 5 files in one request. An `attachment.upload` event is generated when you use the endpoint.
      operationId: addClientFiles
      parameters:
      - $ref: '#/components/parameters/uploader-service-pathIdentifierType'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uploader-service-AddFile'
      responses:
        '200':
          description: File or files uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uploader-service-FileRequest'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_explorer
      x-snr-permissions:
      - UPLOADER_SERVICE_STORAGE_CREATE
      security:
      - JWT: []
  /uploader-service/storages/{container}/upload:
    post:
      tags:
      - Uploader
      summary: Upload file
      description: |2

        Upload a new file to Synerise.

        <strong><span style="color:red">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.

        Example correct cURL request:
        <pre>
        curl --location 'https://api.synerise.com/uploader-service/storages/default/upload' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --form 'uploads=@"/Users/currentuser/Downloads/image.png"'
        </pre>
      operationId: uploadFile
      parameters:
      - in: path
        name: container
        description: Name of the container in which the file will be stored
        required: true
        schema:
          type: string
          example: default
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - uploads
              properties:
                uploads:
                  description: File to upload, binary
                  type: string
                  format: binary
            example: form
      responses:
        '200':
          description: File description
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/uploader-service-UploadResult'
      x-snr-scopes:
      - USER
      - PROFILE
      x-snr-groups:
      - assets_explorer
      x-snr-permissions:
      - UPLOADER_SERVICE_STORAGE_CREATE
      security:
      - JWT: []
  /uploader-service/storage-files/list:
    get:
      tags:
      - Uploader
      summary: List files from workspace
      description: Retrieve a list of all files in the Workspace.
      operationId: getFiles
      responses:
        '200':
          description: Files
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/uploader-service-FileInfo'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_explorer
      x-snr-permissions:
      - UPLOADER_SERVICE_STORAGE_READ
      security:
      - JWT: []
  /uploader-service/v2/list:
    get:
      tags:
      - Uploader
      summary: List files from workspace
      description: Retrieve a list of all files in the Workspace.
      operationId: getFilesV2
      parameters:
      - name: page
        in: query
        required: false
        description: page number
        schema:
          type: integer
          minimum: 0
          default: 0
      - name: limit
        in: query
        required: false
        description: number of elements in a page
        schema:
          type: integer
          minimum: 0
          default: 50
      - name: sortBy
        in: query
        required: false
        description: field to sort by and order
        schema:
          type: string
          pattern: ^(updatedYear|createdAt):(asc|desc)$
          example: createdAt:asc
          default: updatedYear:desc
      - name: mediatype
        in: query
        required: false
        description: filter by media type
        schema:
          type: string
          example: image/jpeg
      - name: extensions
        in: query
        required: false
        description: filter by extension files
        schema:
          type: string
          example: pdf,jpeg
      - name: search
        in: query
        required: false
        description: file id or substring of file name
        schema:
          type: string
      responses:
        '200':
          description: Files
          content:
            application/json:
              schema:
                type: object
                required:
                - meta
                - data
                properties:
                  meta:
                    type: object
                    description: Pagination metadata
                    properties:
                      links:
                        type: array
                        description: Links to the neighboring pages and the first page
                        items:
                          type: object
                          required:
                          - url
                          - rel
                          properties:
                            url:
                              type: string
                              description: URL of the page, used for navigation
                            rel:
                              type: string
                              description: The type of relation to the current page. `first` is always the first page.
                              enum:
                              - first
                              - prev
                              - next
                      limit:
                        type: integer
                        format: int32
                        description: Limit of items per page
                      count:
                        type: integer
                        nullable: true
                        description: Currently unused
                  data:
                    type: array
                    description: Array of external sources
                    items:
                      $ref: '#/components/schemas/uploader-service-FileDataV2'
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_explorer
      x-snr-permissions:
      - UPLOADER_SERVICE_STORAGE_READ
      security:
      - JWT: []
  /uploader-service/storage-files/delete-by-uuid:
    post:
      tags:
      - Uploader
      summary: Remove files
      description: |
        Delete one or more files.

        <strong><span style="color:red">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.

        Example correct cURL request:
        <pre>
        curl --location 'https://api.synerise.com/uploader-service/storage-files/delete-by-uuid' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --form 'uuids="[\"0ac106beb55c401bac8bc8244e367512\",\"03dc506041e24c3cae284fd3f6611082\"]"'
        </pre>
      operationId: removeFiles
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                uuids:
                  $ref: '#/components/schemas/uploader-service-FileUuids'
              required:
              - uuids
      responses:
        '200':
          description: Results of the operation
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: boolean
                  description: Each key in this object is the UUID of a file. If the file was deleted successfully, the value is `true`.
                example:
                  0ac106beb55c401bac8bc8244e367512: true
                  03dc506041e24c3cae284fd3f6611082: true
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_explorer
      x-snr-permissions:
      - UPLOADER_SERVICE_STORAGE_DELETE
      security:
      - JWT: []
  /uploader-service/storage-files/add-star-by-uuid:
    post:
      tags:
      - Uploader
      summary: Add stars
      description: |
        Add a star to one or more files. Stars are used to mark files as favorite and make them easier to find.

        <strong><span style="color:red">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.

        Example correct cURL request:
        <pre>
        curl --location 'https://api.synerise.com/uploader-service/storage-files/add-star-by-uuid' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --form 'uuids="[\"0ac106beb55c401bac8bc8244e367512\",\"03dc506041e24c3cae284fd3f6611082\"]"'
        </pre>
      operationId: addStarByUUID
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                uuids:
                  $ref: '#/components/schemas/uploader-service-FileUuids'
              required:
              - uuids
      responses:
        '200':
          description: Results of the operation
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: boolean
                  description: Each key in this object is the UUID of a file. If the file was starred successfully or was already starred before, the value is `true`. If a file doesn't exist, the result is `false`.
                example:
                  0ac106beb55c401bac8bc8244e367512: false
                  03dc506041e24c3cae284fd3f6611082: true
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_explorer
      x-snr-permissions:
      - UPLOADER_SERVICE_STORAGE_UPDATE
      security:
      - JWT: []
  /uploader-service/storage-files/remove-star-by-uuid:
    post:
      tags:
      - Uploader
      summary: Remove stars
      description: |
        Remove stars from one or more files.

        <strong><span style="color:red">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.

        Example correct cURL request:
        <pre>
        curl --location 'https://api.synerise.com/uploader-service/storage-files/remove-star-by-uuid' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --form 'uuids="[\"0ac106beb55c401bac8bc8244e367512\",\"03dc506041e24c3cae284fd3f6611082\"]"'
        </pre>
      operationId: removeStarByUUID
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                uuids:
                  $ref: '#/components/schemas/uploader-service-FileUuids'
              required:
              - uuids
      responses:
        '200':
          description: Results of the operation
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: boolean
                  description: Each key in this object is the UUID of a file. If the file was unstarred successfully or was already unstarred before, the value is `true`. If a file doesn't exist, the result is `false`.
                example:
                  0ac106beb55c401bac8bc8244e367512: false
                  03dc506041e24c3cae284fd3f6611082: true
      x-snr-scopes:
      - USER
      x-snr-groups:
      - assets_explorer
      x-snr-permissions:
      - UPLOADER_SERVICE_STORAGE_UPDATE
      security:
      - JWT: []
  /v4/vouchers/item/assign:
    post:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      - INCOGNITO_CLIENT
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_ASSIGN_CREATE
      tags:
      - Vouchers
      summary: Assign a voucher from a pool to Profile
      description: Assign a voucher code from an existing pool to a Profile.
      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: []
  /v4/vouchers/item/get-assigned:
    get:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      - INCOGNITO_CLIENT
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_ASSIGN_READ
      tags:
      - Vouchers
      summary: Get assigned vouchers
      description: Retrieve all vouchers assigned to a Profile.
      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: []
  /v4/vouchers/item/get-or-assign:
    post:
      x-snr-scopes:
      - CLIENT
      - ANONYMOUS_CLIENT
      - INCOGNITO_CLIENT
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_ASSIGN_READ
      - VOUCHERS_ITEM_ASSIGN_CREATE
      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.
      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: []
  /v4/vouchers/item:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_CREATE
      tags:
      - Vouchers
      summary: Create a voucher
      description: Create a single code and store it in a pool.
      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: []
  /v4/vouchers/item/bulk-create:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_BULK_CREATE
      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.
      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: []
  /v4/vouchers/item/list:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_LIST_READ
      tags:
      - Vouchers
      summary: List all vouchers
      description: Retrieve all vouchers for a Workspace. You can customize the search.
      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: []
  /v4/vouchers/item/{voucherUuid}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_READ
      tags:
      - Vouchers
      summary: View voucher details
      description: Retrieve all details of a single code.
      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: []
    put:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_UPDATE
      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.
      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: []
    delete:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_DELETE
      tags:
      - Vouchers
      summary: Delete a voucher
      description: Delete an existing code.
      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: []
  /v4/vouchers/item/{searchKey}/{searchValue}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_BY_SEARCH_KEY_READ
      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.
      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: []
  /v4/vouchers/item/assign-for-client:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE
      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.
      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: []
  /v4/vouchers/item/get-assigned-for-client/{clientUuid}:
    get:
      deprecated: true
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_READ
      tags:
      - Vouchers
      summary: Get vouchers assigned to a Profile
      description: Get all codes assigned to a Profile.
      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: []
  /v4/vouchers/item/get-or-assign-for-client:
    post:
      deprecated: true
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE
      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.
      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: []
  /v4/vouchers/item/get-assigned-for-client/by-identifier:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_READ
      tags:
      - Vouchers
      summary: Get vouchers assigned to a Profile by identifier
      description: Get all codes assigned to a Profile.
      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: []
  /v4/vouchers/item/get-or-assign-for-client/by-identifier:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE
      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.
      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: []
  /v4/vouchers/item/assign-for-client/by-identifier:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE
      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.
      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: []
  /v4/vouchers/item/redeem:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_REDEEM_CREATE
      tags:
      - Vouchers
      summary: Redeem a voucher
      description: Redeem a code.
      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: []
  /v4/vouchers/pool/list:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_POOL_LIST_READ
      tags:
      - Vouchers
      summary: List pools
      description: Retrieve a list of voucher pools.
      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: []
  /v4/vouchers/pool:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_POOL_CREATE
      tags:
      - Vouchers
      summary: Create a voucher pool
      description: Create a pool for voucher storage.
      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: []
  /v4/vouchers/pool/{poolUuid}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_POOL_READ
      tags:
      - Vouchers
      summary: Get pool details
      description: Retrieve the details of a single voucher pool.
      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: []
    put:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_POOL_UPDATE
      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.
      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: []
    delete:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_POOL_DELETE
      tags:
      - Vouchers
      summary: Delete a voucher pool
      description: Delete an existing pool of vouchers.
      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: []
  /v4/vouchers/item/list/{poolUuid}:
    get:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_LIST_BY_POOL_READ
      tags:
      - Vouchers
      summary: List vouchers from a pool
      description: Retrieve vouchers from a single pool.
      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: []
    delete:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_BY_POOL_DELETE
      tags:
      - Vouchers
      summary: Delete vouchers by poolUuid
      description: Delete vouchers assigned to pool.
      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: []
  /v4/vouchers/item/count/{poolUuid}:
    post:
      x-snr-scopes:
      - PROFILE
      - USER
      x-snr-groups:
      - assets_code_pool
      x-snr-permissions:
      - VOUCHERS_ITEM_LIST_BY_POOL_READ
      tags:
      - Vouchers
      summary: Count vouchers
      description: Count (re-calculate) vouchers in a pool, group the results by status.
      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: []
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.
    TrackerKey:
      type: apiKey
      in: query
      name: token
  parameters:
    activities-api-pathIdentifierType:
      in: path
      name: identifierType
      description: Profile identifier type
      required: true
      schema:
        type: string
        enum:
        - id
        - uuid
        - email
        - custom_identify
    activities-api-queryToken:
      in: query
      name: pageToken
      description: The token of the page to retrieve. You can check the tokens of the next/previous page in the response to this endpoint. If not provided, the first page is retrieved.
      required: false
      schema:
        type: string
    activities-api-queryActions:
      in: query
      name: actions
      required: false
      description: A comma-separated list of actions (or a single action) that will be included in the response
      schema:
        type: string
      example: page.visit
    activities-api-queryDateFrom:
      in: query
      name: dateFrom
      description: Lower value of the time range, as a Unix timestamp in milliseconds. Defaults to current time minus 2 hours.
      required: false
      schema:
        type: number
    activities-api-queryDateTo:
      in: query
      name: dateTo
      description: Upper limit of the time range to fetch, as a Unix timestamp in milliseconds. Defaults to current time.
      required: false
      schema:
        type: number
    activities-api-queryDateFromV2:
      in: query
      name: dateFrom
      description: Lower value of the time range, as a Unix timestamp in milliseconds.
      required: false
      schema:
        type: number
    activities-api-queryDateToV2:
      in: query
      name: dateTo
      description: Upper limit of the time range to fetch, as a Unix timestamp in milliseconds.
      required: false
      schema:
        type: number
    activities-api-queryFormat:
      in: query
      name: format
      description: The format of the retrieved data
      required: false
      schema:
        enum:
        - json
        - csv
        type: string
        default: json
    activities-api-queryLimit:
      in: query
      name: limit
      description: The maximum number of events to retrieve
      required: false
      schema:
        type: number
        minimum: 1
        maximum: 1000
    activities-api-queryRaw:
      in: query
      name: raw
      description: 'When `true`, the response returns raw data. If raw data is not available, processed data from event storage (like from `"raw": false`) is returned instead.'
      required: false
      schema:
        type: boolean
        default: false
    activities-api-querySortBy:
      in: query
      name: sortBy
      required: false
      description: Sorting order. `time:desc` (default) returns newest events first.
      schema:
        type: string
        default: time:desc
        enum:
        - time:desc
        - time:asc
    ai-stats-indexId:
      name: indexId
      in: path
      required: true
      description: ID of the index for which the stats are requested
      schema:
        type: string
        example: 4add1a1fa877c1651906bb22c9dfd37a1618852272
    ai-stats-query:
      name: query
      in: query
      required: false
      description: Query for which stats will be returned. If not provided, the results are returned for the most popular queries.
      schema:
        type: string
    ai-stats-dateFrom:
      name: dateFrom
      in: query
      required: false
      description: "Upper bound of the interval for which the statistics will be retrieved.  \nMust be provided with `to`, otherwise the filter is treated as unspecified.  \nIf not specified, the interval is last 7 days.\n"
      schema:
        type: string
        format: date
    ai-stats-from:
      name: from
      in: query
      required: false
      description: "Upper bound of the interval for which the statistics will be retrieved.  \nMust be provided with `from`, otherwise the filter is treated as unspecified.  \nIf not specified, the interval is last 7 days.\n"
      schema:
        type: string
        format: date
    ai-stats-dateTo:
      name: dateTo
      in: query
      required: false
      description: |
        Lower bound of the interval for which the statistics will be retrieved.
        If not specified, the interval is last 7 days.
      schema:
        type: string
        format: date
    ai-stats-to:
      name: to
      in: query
      required: false
      description: |
        Lower bound of the interval for which the statistics will be retrieved.
        If not specified, the interval is last 7 days.
      schema:
        type: string
        format: date
    ai-stats-productMetricName:
      name: metric
      in: query
      required: false
      description: |
        The response will include statistics for up to 10 top-performing items according to the selected metric, sorted from best to worst.
        If not specified, the default metric is `views`.
        - views - the number of displayed recommendation frames.
        - generations - the number of generated recommendation frames.
        - clicks - the number of times an item in a recommendation frame was clicked.
        - charges - the number of transactions caused by the recommendation.
        - revenue - the revenue generated by the recommendation.
      schema:
        type: string
        default: views
        enum:
        - views
        - clicks
        - revenue
        - generations
        - charges
    ai-stats-searchType:
      name: searchType
      in: query
      required: false
      description: Search type for which stats will be retrieved.
      schema:
        type: string
        default: all
        enum:
        - fullTextSearch
        - autocomplete
        - listing
        - visual
        - all
    ai-stats-queryFilter:
      name: queryFilter
      in: query
      required: false
      description: Queries for which stats will be retrieved.
      schema:
        type: string
        default: queries
        enum:
        - queries
        - queriesWithNoResults
        - queriesWithUsedSuggestions
    ai-stats-searchGroupBy:
      name: groupBy
      in: query
      required: false
      description: Attribute for which retrieved stats will be grouped.
      schema:
        type: string
        enum:
        - date
    ai-stats-searchSortBy:
      name: SortBy
      in: query
      required: false
      description: Field by which results should be sorted.
      schema:
        type: string
        default: count
        enum:
        - count
        - clicks
        - conversions
        - clickThroughRate
        - revenue
        - conversionRate
    ai-stats-searchOrdering:
      name: ordering
      in: query
      required: false
      description: Sort order direction.
      schema:
        type: string
        default: desc
        enum:
        - asc
        - desc
    ai-stats-filterName:
      name: filterName
      in: query
      required: false
      description: Name of the filterable attribute. If present top values of this filter are returned.
      schema:
        type: string
        example: brand
    ai-stats-withFilters:
      name: withFilters
      in: query
      required: false
      description: Switch to display search statistics with enabled filters or without filters.
      schema:
        type: string
        enum:
        - true
        - false
    ai-stats-indexIdArray:
      name: indexId
      in: query
      required: true
      description: List of indices ids for which the stats are requested.
      schema:
        type: array
        items:
          type: string
    ai-stats-campaignIdPath:
      name: campaignId
      in: path
      required: true
      description: ID of the recommendation campaign
      schema:
        type: string
        example: 50NCGoRK0VRb
    ai-stats-timeZone:
      name: timeZone
      in: query
      required: false
      description: Time zone identifier.
      schema:
        type: string
        default: UTC
      example: Europe/Warsaw
    analytics-isMultiMetric:
      name: isMultiMetric
      in: query
      description: Filter reports by whether they have more than one metric.
      required: false
      style: form
      explode: true
      schema:
        type: boolean
    analytics-isHistogramMetric:
      name: isHistogramMetric
      in: query
      description: Filter metrics by whether they are histogram metrics.
      required: false
      style: form
      explode: true
      schema:
        type: boolean
    analytics-isReportMetric:
      name: isReportMetric
      in: query
      description: Filter metrics by whether they are report metrics.
      required: false
      style: form
      explode: true
      schema:
        type: boolean
    analytics-AnalyticIdPathParam:
      name: AnalysisId
      in: path
      description: UUID of the analysis
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-DirectoryIdPathParam:
      name: DirectoryId
      in: path
      description: ID of a directory
      required: true
      style: simple
      explode: false
      schema:
        type: string
        format: uuid
    analytics-ids:
      name: ids
      in: query
      description: Comma-separated list of IDs (in UUID format) to filter results through
      required: false
      style: form
      explode: false
      schema:
        type: string
    analytics-page:
      name: page
      description: The number of the page to retrieve
      in: query
      required: false
      style: form
      explode: true
      schema:
        type: integer
        format: int32
        default: 1
        minimum: 1
    analytics-limit:
      name: limit
      in: query
      description: Limit of items per page
      required: false
      style: form
      explode: true
      schema:
        type: integer
        format: int32
        default: 50
    analytics-sortBy:
      name: sortBy
      description: |
        You can sort the results. The sorting direction is selected by adding `asc` or `desc`, for example `sortBy=name:desc`.
      in: query
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: name:asc
        default: updatedAt:desc
        enum:
        - name:asc
        - name:desc
        - author:asc
        - author:desc
        - updatedAt:asc
        - updatedAt:desc
        - createdAt:asc
        - createdAt:desc
        - id:asc
        - id:desc
        - directoryId:asc
        - directoryId:desc
    analytics-search:
      name: search
      description: A string to search for in analyses' titles
      in: query
      required: false
      schema:
        type: string
    analytics-shareType:
      name: shareType
      description: Type of sharing process
      in: query
      required: false
      schema:
        type: string
        enum:
        - CROSSWORKSPACE
        - INTERNAL
    analytics-expressionType:
      name: type
      description: Filter by expression type. When omitted, expressions of all types are returned.
      in: query
      required: false
      schema:
        type: string
        enum:
        - CLIENT
        - EVENT
    analytics-actionName:
      name: actionName
      description: Filter event expressions by their action's event name. When omitted, expressions for all actions are returned.
      in: query
      required: false
      schema:
        type: string
    analytics-clientIdAsPathParameter:
      name: ProfileId
      in: path
      description: Unique identifier of a profile
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        format: int64
    analytics-AggregateType:
      name: aggregateType
      in: query
      description: Filter by aggregate type
      required: false
      schema:
        $ref: '#/components/schemas/analytics-AggregateType'
    analytics-directoryId:
      name: directoryId
      description: Unique ID of the directory to retrieve analyses from
      in: query
      required: false
      schema:
        type: string
        format: uuid
    analytics-pathNamespace:
      name: Namespace
      in: path
      description: Namespace. Currently, only `profiles` is available.
      required: true
      style: simple
      explode: false
      schema:
        $ref: '#/components/schemas/analytics-PathNamespace'
    analytics-pathIdentifierType:
      name: IdentifierType
      in: path
      description: Profile identifier type
      required: true
      style: simple
      explode: false
      schema:
        $ref: '#/components/schemas/analytics-PathIdentifierType'
    analytics-aggregateIdentifierAsPathParam:
      name: AggregateIdentifier
      in: path
      description: Aggregate identifier (UUID or numeric ID)
      required: true
      style: simple
      explode: false
      schema:
        type: string
    api-service-pathIdentifierValue-apiv4:
      name: identifierValue
      in: path
      description: |
        The value of the selected identifier. It must be URL-encoded.

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

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

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      required: true
      schema:
        type: string
        example: customIdExample
    api-service-pathTargetCustomId-apiv4:
      name: targetCustomID
      in: path
      description: The custom ID of the profile to merge the `sourceCustomIDs` into
      required: true
      schema:
        type: string
        example: customIdExample
    api-service-pathClientCustomIds-apiv4:
      name: sourceCustomIDs
      in: path
      description: Comma-delimited string with custom IDs of the profiles to merge
      required: true
      schema:
        type: string
        example: customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5
    api-service-pathToClientId-apiv4:
      name: toClientId
      in: path
      description: The ID of the profile to merge the `fromClientIds` into
      required: true
      schema:
        type: integer
        format: int64
        example: 434428563
    api-service-pathFromClientIds-apiv4:
      name: fromClientIds
      in: path
      description: Comma-delimited string with client IDs of the profiles to merge
      required: true
      schema:
        type: string
        example: 434428563,33322211,232212342
    api-service-pathClientEmail-apiv4:
      name: clientEmail
      in: path
      description: |
        The profile's email address

        - Must match the pattern (ECMA flavor): `/^(([^<>()[\]\\.,;:\s@\\"]+(\.[^<>()[\]\\.,;:\s@\\"]+)*)|(\\".+\\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/`
        - The value can't include any characters that match the patternn (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      required: true
      schema:
        type: string
        example: clientemail@synerise.com
    api-service-acceptHeader-apiv4:
      name: Accept
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
        - application/json
    api-service-contentTypeHeader-apiv4:
      name: Content-Type
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
        - application/json
    api-service-apiVersionHeader-apiv4:
      name: Api-Version
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
        - '4.4'
    api-service-queryEventsLimit-apiv4:
      in: query
      name: limit
      description: The number of events to retrieve
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 500
    api-service-queryAction-apiv4:
      in: query
      name: action
      description: Filter events by action type. For example, to retrieve completed transactions, enter `transaction.charge`
      required: false
      schema:
        type: string
        example: transaction.charge
    api-service-queryDateTo-apiv4:
      in: query
      name: time[to]
      description: End of the time range to query. UTC time in ISO 8601 (for example, `2020-10-19T13:47:53Z`). If no value is provided, the current time applies.
      required: false
      schema:
        type: string
        format: date-time
    api-service-queryDateFrom-apiv4:
      in: query
      name: time[from]
      description: Start of the time range to query. UTC time in ISO 8601 (for example, `2020-10-19T13:47:53Z`). If no value is provided, the results are returned starting with the oldest entry in the database.
      required: false
      schema:
        type: string
        format: date-time
    automation-brain-diagramId:
      name: diagramId
      in: path
      description: UUID of the workflow/diagram
      required: true
      schema:
        type: string
    automation-brain-limit:
      name: limit
      in: query
      description: Number of items per page
      schema:
        type: number
        default: 10
    automation-brain-limit50:
      name: limit
      in: query
      description: Number of items per page
      schema:
        type: number
        default: 50
    automation-brain-page:
      name: page
      in: query
      description: The selected page
      schema:
        type: number
        default: 1
        minimum: 1
    automation-brain-timePeriod:
      name: timePeriod
      in: query
      description: Time period for statistics
      schema:
        type: string
        enum:
        - 24h
        - 7d
    automation-brain-ScheduleEventFilterStart:
      name: start
      in: query
      description: Start date
      schema:
        type: string
        format: date-time
    automation-brain-ScheduleEventFilterEnd:
      name: end
      in: query
      description: End date
      schema:
        type: string
        format: date-time
    automation-brain-filterByStatus:
      name: status
      in: query
      description: Filter workflows by status
      schema:
        type: string
        enum:
        - All
        - Recent
        - Draft
        - Pending
        - Active
        - Paused
        - Stopped
        - Inactive
        - Scheduled
        - NoSchedule
        - ScheduleOn
        - ScheduleOff
        default: All
    automation-brain-sortDiagrams:
      name: sort
      in: query
      description: Sort workflows by a property value
      schema:
        type: string
        enum:
        - Author
        - Name
        - CreatedTime
        - UpdatedTime
        - Status
        default: UpdatedTime
    automation-brain-sortByDiagrams:
      name: sortBy
      in: query
      description: Sort workflows clause
      example: createdTime:desc
      schema:
        type: string
    automation-brain-sortingOrder:
      name: order
      in: query
      description: Sorting order
      schema:
        type: string
        enum:
        - Asc
        - Desc
        default: Desc
    automation-brain-search:
      name: search
      in: query
      description: A string to search for in workflow names and email addresses of authors. Workflows that don't match the search aren't returned at all.
      schema:
        type: string
    automation-brain-directoryId:
      name: directoryId
      in: query
      description: UUID of the directory/catalogue/folder.
      schema:
        type: string
        format: uuid
    automation-brain-tagIds:
      name: tags
      in: query
      required: false
      schema:
        type: string
        description: List of comma separated tags
    automation-brain-blockTypes:
      name: blockTypes
      in: query
      required: false
      description: |
        Comma-separated list of block type names (e.g. "Email,EventTrigger").
        If provided, only workflows that contain a block of EVERY listed type
        are returned. The parameter may also be repeated.
      schema:
        type: string
    automation-brain-triggersOnEvent:
      name: triggersOnEvent
      in: query
      required: false
      description: |
        Event name that triggers or filters the workflow. If provided, only
        workflows containing an EventTrigger or EventFilter block configured
        for this event are returned. Matched case-insensitively.
      schema:
        type: string
        maxLength: 64
        pattern: ^[a-zA-Z0-9.\-_]+$
    automation-brain-generatesEvent:
      name: generatesEvent
      in: query
      required: false
      description: |
        Event name generated by the workflow. If provided, only workflows
        containing a SendEvent block, or a Webhook block whose responseAction
        is set to this event, are returned. Matched case-insensitively.
      schema:
        type: string
        maxLength: 64
        pattern: ^[a-zA-Z0-9.\-_]+$
    boxes-v2-NameFilter:
      name: name
      in: query
      description: Searches for a given string in schema names. The search is **not** case-sensitive.
      required: false
      schema:
        type: string
    boxes-v2-PaginationLimit:
      name: limit
      in: query
      description: Number of entries per page
      required: true
      schema:
        type: number
    boxes-v2-PaginationPage:
      name: page
      in: query
      description: Selected page. The first page has the index `1`.
      required: true
      schema:
        type: number
    boxes-v2-SchemaId:
      name: schemaId
      in: path
      description: UUID of the schema
      required: true
      schema:
        type: string
    boxes-v2-RecordId:
      name: recordId
      in: path
      description: UUID of the record
      required: true
      schema:
        type: string
        format: uuid
    brickworks-service-queryLimit:
      name: limit
      in: query
      required: false
      description: Limit of items per page
      schema:
        type: integer
        format: int32
        default: 50
    brickworks-service-queryPage:
      name: page
      in: query
      required: false
      description: The number of the page to retrieve
      schema:
        type: integer
        format: int32
        minimum: 1
        default: 1
    brickworks-service-queryFields:
      name: fields
      in: query
      required: false
      description: A comma-separated list of fields to retrieve. If not defined, all fields are included in the response.
      schema:
        type: array
        items:
          type: string
    brickworks-service-pathIdentifierType:
      name: IdentifierType
      in: path
      required: true
      description: Profile identifier type
      schema:
        type: string
        enum:
        - id
        - uuid
        - email
        - custom_identify
    brickworks-service-pathExternalDataSourceId:
      name: ExternalDataSourceId
      in: path
      required: true
      description: External source ID
      schema:
        type: string
        format: uuid
    brickworks-service-queryRecordFilters:
      name: filters
      in: query
      required: false
      schema:
        type: string
        description: "An RSQL query to filter the results.  \nYou can use these fields:\n- fields configured as searchable\n- `__id`\n- `__schemaId`\n- `__name`\n- `__slug`\n- `__status`\n- `__updatedAt`\n- `__createdAt`\n- `__publishedAt`\n- `__recordVersion`\n"
    brickworks-service-querySearch:
      name: search
      in: query
      required: false
      description: |
        A string to search for in:
        - `id`
        - `appId`
        - `displayName`
        - `description`
      schema:
        type: string
    brickworks-service-querySearchRecords:
      name: search
      in: query
      required: false
      description: "A string to search for in the values of searchable fields.  \nIf `filter` is used, this parameter is ignored.\n"
      schema:
        type: string
    brickworks-service-querySortBy:
      name: sortBy
      description: "You can change the default sorting. The sorting direction is selected by adding `asc` or `desc`, for example `sortBy=createdAt:desc`.\n\nYou can sort by:\n  - `appId` \n  - `displayName`\n  - `createdAt`\n  - `updatedAt`\n"
      in: query
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: updatedAt:asc
        default: updatedAt:desc
    brickworks-service-querySortByRecords:
      name: sortBy
      description: "You can change the default sorting. The sorting direction is selected by adding `asc` or `desc`, for example `sortBy=__createdAt:desc`.\n\nSystem parameters are prefixed with `__` to avoid name collisions with fields you add to the schema.  \n\nYou can sort by:\n  - `__id`\n  - `__createdAt`\n  - `__updatedAt`\n"
      in: query
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: __updatedAt:asc
        default: __updatedAt:desc
    brickworks-service-methodQueryParam:
      name: method
      description: |
        You can filter the results by source http method.
      in: query
      required: false
      style: form
      explode: true
      schema:
        type: string
        enum:
        - get
        - post
    brickworks-service-queryIds:
      name: ids
      in: query
      description: Comma-separated list of IDs (in UUID format) to filter results through
      required: false
      style: form
      explode: false
      schema:
        type: string
    brickworks-service-pathRecordVersionIdentifier:
      name: RecordVersionIdentifier
      in: path
      required: true
      description: Record version identifier - can be a UUID (RecordVersionId) or a version number (integer)
      schema:
        oneOf:
        - type: string
          format: uuid
          title: Record version UUID
        - type: integer
          format: int32
          minimum: 1
          title: Record version Number
      examples:
        uuid:
          value: 6da06fc3-046b-4546-8247-2ad7be652e78
          summary: Record Version UUID
        versionNumber:
          value: 1
          summary: Record version number
    brickworks-service-queryStatuses:
      name: statuses
      in: query
      description: Comma-separated list of record statuses to filter the results.
      required: false
      style: form
      explode: false
      schema:
        type: string
        enum:
        - PUBLISHED
        - DRAFT
        - UNPUBLISHED
        - SCHEDULED
    brickworks-service-querySchemaTypes:
      name: schemaTypes
      in: query
      description: Comma-separated list of schema types to filter the results. By default, all types are retrieved.
      required: false
      style: form
      explode: false
      schema:
        type: string
        enum:
        - SIMPLE
        - VERSIONED
    brickworks-service-pathRecordIdentifier:
      name: RecordIdentifier
      in: path
      required: true
      description: Record identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)
      schema:
        oneOf:
        - type: string
          format: uuid
          title: Record UUID
        - type: string
          minLength: 6
          maxLength: 40
          pattern: ^(?!__)(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)[\w\-]+$
          title: Record slug
      examples:
        uuid:
          value: f6ce33ee-bdf2-4a23-87be-07de936ceeab
          summary: Record UUID
        slug:
          value: my-record-slug
          summary: Record slug
    brickworks-service-pathSchemaIdentifier:
      name: SchemaIdentifier
      in: path
      required: true
      description: Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
      schema:
        oneOf:
        - type: string
          format: uuid
          title: Schema UUID
        - type: string
          minLength: 3
          maxLength: 25
          pattern: ^(?!__)(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)[\w\-]+$
          title: Schema AppId
      examples:
        uuid:
          value: 550e8400-e29b-41d4-a716-446655440000
          summary: Schema UUID
        appId:
          value: my-schema-app-id
          summary: Schema AppId (API name)
    brickworks-service-querySlugs:
      name: slugs
      in: query
      description: Comma-separated list of slugs to filter results through
      required: false
      style: form
      explode: false
      schema:
        type: string
    business-profile-service-listPage:
      name: page
      description: Page to retrieve
      in: query
      required: false
      schema:
        type: integer
        format: int32
        default: 1
    business-profile-service-listLimit:
      name: limit
      description: Limit of items per page
      in: query
      required: false
      schema:
        type: integer
        format: int32
        default: 20
    business-profile-service-listSearch:
      name: search
      description: String to search for
      in: query
      required: false
      schema:
        type: string
        default: ''
    catalogs-itemDatabaseId:
      in: path
      name: itemId
      description: |
        ID of the item. This is the ID of the entry in the Synerise
        database, not the unique identifier that you're using in your
        catalog. The itemId is available in the `id` field of the catalog item when you [retrieve items from a catalog](#operation/getItemsByBag):

        ```
        {
            "creationDate": "2020-09-30T11:31:16.314Z",
            "id": 73753, // this is the itemId
            "itemKey": "uniqueValue",
            "lastModified": null,
            "value": "{\"exampleKey\":\"uniqueValue\",\"exampleKey2\":\"exampleValue\"}",
            "bag": {
                "author": "authorName",
                "creationDate": "2020-09-30T10:52:31.264Z",
                "id": 1053, // this is the ID of the catalog
                "lastModified": "2020-09-30T11:41:11.808Z",
                "name": "sampleCatalog"
            }
        },
        ```
      required: true
      schema:
        type: integer
    catalogs-queryLimit:
      in: query
      name: limit
      description: 'The maximum number of items to include in the response. `offset` must be defined. Default: 100'
      required: false
      schema:
        type: integer
    catalogs-queryOffset:
      in: query
      name: offset
      description: The offset for the search. For example, if your `limit` is 10 and you want to retrieve the third page of items, set the offset to 20. Items with indexes 20 to 29 are returned (the first item on the first page has the index 0).
      required: false
      schema:
        type: integer
    catalogs-queryCatalogSearchBy:
      in: query
      name: searchBy
      description: A search string. You can search the catalogs by their name or the first or last name of the author.
      required: false
      schema:
        type: string
    catalogs-queryCatalogOrderBy:
      in: query
      name: orderBy
      description: The parameter to order the results by. Order is always ascending.
      required: false
      schema:
        type: string
        enum:
        - id
        - author
        - lastModified
        - creationDate
    catalogs-pathCatalogId:
      in: path
      name: catalogId
      description: ID of the catalog
      required: true
      schema:
        type: integer
    catalogs-queryItemKey:
      in: query
      name: itemKey
      description: Filter by the value of the unique identifier of the item (exact match)
      required: false
      schema:
        type: string
    catalogs-queryDelimiter:
      in: query
      name: delimiter
      description: 'The delimiter to use in csv. You can use `;` or `,`. Default: `,`'
      required: false
      schema:
        type: string
    crm-pathClientId:
      name: clientId
      in: path
      description: |
        Profile ID

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      required: true
      schema:
        type: integer
    items-filter-all-itemsCatalogId:
      name: itemsCatalogId
      in: query
      required: false
      description: |
        ID of the item catalog that contains the items tested in the request. If not provided, "default" is assumed - however, the "default" catalog may not exist in your workspace.

        **NOTE:** This ID is available in the details the search index or recommendation campaign you want to make test requests for.
      schema:
        type: string
        default: default
    items-filter-all-exampleItems:
      name: exampleItems
      in: query
      required: false
      description: Controls how many example items will be returned
      schema:
        type: integer
        default: 10
    items-search-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: "<span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.\n\nName of the attribute by which the data will be sorted.      \n"
      schema:
        type: string
    items-search-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: asc
        enum:
        - desc
        - asc
    items-search-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    items-search-filterableAttributes:
      name: attribute
      in: query
      description: List of attributes for which values will be fetched
      required: true
      explode: true
      schema:
        type: array
        items:
          type: string
    items-search-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 10
        default: 20
        minimum: 0
        maximum: 500
    items-search-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |2

        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    items-search-searchQuery:
      name: query
      in: query
      required: true
      description: Query text to use in the search
      schema:
        type: string
    items-search-imageUrl:
      name: url
      in: query
      required: true
      description: URL of the image to be used in the visual search
      schema:
        type: string
    items-search-inPathIndexId:
      name: indexId
      in: path
      required: true
      description: ID of the index to be used in the search operation
      schema:
        type: string
    items-search-clientUUID:
      name: clientUUID
      in: query
      required: false
      description: UUID of the profile for which the search is performed
      schema:
        type: string
    items-search-itemId:
      name: itemId
      in: query
      required: true
      description: Item ID
      schema:
        type: string
    items-search-correlationId:
      name: correlationId
      in: query
      required: false
      description: |
        Correlation ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
      schema:
        type: string
    items-search-searchId:
      name: searchId
      in: query
      required: false
      deprecated: true
      description: |
        **DEPRECATED - use correlationId instead**

        Search ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
      schema:
        type: string
    items-search-sortByMetric:
      name: sortByMetric
      in: query
      required: false
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the metric by which the data will be sorted.
      schema:
        type: string
        enum:
        - TransactionsPopularity
        - PageVisitsPopularity
    items-search-sortByGeoPoint:
      name: sortByGeoPoint
      in: query
      required: false
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Geo-point (`{latitude},{longitude}`) for data sorting. Results are sorted by distance from this point. `ordering: asc` means "closest first".'
      schema:
        type: string
        example: 34.052235,-118.243685
    items-search-filterGeoPoints:
      name: filterGeoPoints
      in: query
      required: false
      description: |
        The definition of a geographical area to filter by.

        Given one geo-point, the results will be limited to a radius around a point. To override the default radius (1000 meters), provide the `filterAroundRadius` parameter.
        **Example input:** `["34.052235,-118.243685"]`

        Given two geo-points, the results will be limited to a rectangular area.
        **Example input:** `["50,-100", "25,150"]`

        Given three or more geo-points, the results will be limited to a polygonal area.
        **Example input:** `["50,0", "40,20", "-20,10"]`
      schema:
        type: array
        example:
        - 34.052235,-118.243685
        - 15.0,65.0
        items:
          type: string
    items-search-filterAroundRadius:
      name: filterAroundRadius
      in: query
      required: false
      description: Radius in meters to be used when filtering using geo-location. Can only be used when filtering by a single geo-point.
      schema:
        type: integer
        format: int32
        example: 5000
        default: 1000
    items-search-filterAnchor:
      name: filterAnchor
      in: query
      required: false
      description: |
        Anchor (`{width},{height}`) by which the visual results data will be filtered.
        `{width},{height}` correspond to normalized image coordinates, i.e. they are in range [0,1].
        Anchor (0,0) corresponds to the top-left pixel of an image.
      schema:
        type: string
        example: 0.2,0.8
    items-search-filters:
      name: filters
      in: query
      required: false
      description: IQL query string. For details, see the [Help Center](https://help.synerise.com/developers/iql/).
      schema:
        type: string
    items-search-facets:
      name: facets
      in: query
      required: false
      description: |
        A list of attributes for which facets will be returned. A single `*` value matches all facetable attributes.
        A single `auto` value enables automatic facet selection based on the result set — the system picks the most relevant facets using the index's `dynamicFacets` configuration.

        To determine which groups of facets should be returned, use the `includeFacets` parameter.
      schema:
        type: array
        items:
          type: string
    items-search-context:
      name: context
      in: query
      required: false
      description: List of context strings for a search query
      example:
      - mobile
      - listing
      schema:
        type: array
        items:
          type: string
    items-search-displayAttributes:
      name: displayAttributes
      in: query
      required: false
      description: List of ad hoc attributes that will be returned for each found item
      example:
      - title
      - price
      schema:
        type: array
        items:
          type: string
    items-search-includeFacets:
      name: includeFacets
      in: query
      required: false
      description: |
        Determines which groups of facets will be returned: both filtered and unfiltered; just filtered; just unfiltered; or no group at at all.

        To determine which attributes should be returned as facets in each group, use the `facets` parameter.
      schema:
        type: string
        default: filtered
        enum:
        - all
        - filtered
        - unfiltered
        - none
    items-search-facetsSize:
      name: facetsSize
      in: query
      required: false
      description: |
        Determines how many items will be used for facets aggregation.
      schema:
        type: integer
        default: 2000
        minimum: 1
        maximum: 10000
    items-search-maxValuesPerFacet:
      name: maxValuesPerFacet
      in: query
      required: false
      description: |
        Determines how many values will be retrieved per facet.
      schema:
        type: integer
        default: 50
        minimum: 1
        maximum: 1000
    items-search-facetsOrderBy:
      name: facetsOrderBy
      in: query
      required: false
      description: "Controls the ordering of facets in the response.  \nWhen `facets=auto`, the default ordering is by coverage (most relevant facets first).  \nWhen facets are specified explicitly, the default ordering is by name.  \nWhen two facets have equal coverage, ties are resolved by name.\n"
      schema:
        type: string
        enum:
        - coverage
        - name
    items-search-caseSensitiveFacetValues:
      name: caseSensitiveFacetValues
      in: query
      required: false
      description: |
        Specifies whether facets aggregation should be case sensitive.
      schema:
        type: boolean
        default: false
    items-search-distinctFilter:
      name: distinctFilter
      in: query
      required: false
      schema:
        type: string
        example: '{"attribute": "color", "maxNumItems": 3}'
      description: |
        DistinctFilter JSON as an URL-encoded string
    items-search-personalize:
      name: personalize
      in: query
      required: false
      description: |
        If set to `false`, the search result is not personalized.
      schema:
        type: boolean
        default: true
    items-search-ignoreQueryRules:
      name: ignoreQueryRules
      in: query
      required: false
      description: |
        If set to `true`, query rules are not applied.
      schema:
        type: boolean
        default: false
    items-search-excludeQueryRules:
      name: excludeQueryRules
      in: query
      required: false
      description: |
        List of query rules that will not be applied.
      example:
      - 2
      - 5
      schema:
        type: array
        items:
          type: integer
    items-search-disableQueryClassification:
      name: disableQueryClassification
      in: query
      required: false
      description: |
        If set to `true`, query classification is not applied.
      schema:
        type: boolean
        default: false
    items-search-disableDynamicReranker:
      name: disableDynamicReranker
      in: query
      required: false
      description: |
        If set to `true`, dynamic reranker is not applied.
      schema:
        type: boolean
        default: false
    items-search-crossWorkspaceModeEnabled:
      name: crossWorkspaceModeEnabled
      in: query
      required: false
      description: |
        If set, overrides the cross-workspace mode from the index configuration. When `true`, cross-workspace personalization is enabled. When `false`, it is disabled.
      schema:
        type: boolean
    items-search-params:
      name: params
      in: query
      required: false
      description: |
        List of extra params that will be added to the `item.search` event. They must be in the `name:value` format. The total size must not exceed 500 bytes when written as a JSON object.
      example:
      - source:mobile
      schema:
        type: array
        items:
          type: string
    items-search-config-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: Name of the attribute by which the data will be sorted
      schema:
        type: string
    items-search-config-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: desc
        enum:
        - desc
        - asc
    items-search-config-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    items-search-config-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 1000
        maximum: 1000
    items-search-config-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |2

        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    items-search-config-inQueryDirectoryId:
      in: query
      name: directoryId
      required: false
      description: Requested directoryId of the rule.
      schema:
        type: string
        format: uuid
    items-search-config-inQueryType:
      in: query
      name: type
      required: false
      description: Requested type of the rule.
      schema:
        type: string
        enum:
        - Keyword
        - Hybrid
        - Semantic
    items-search-config-InPathIndexId:
      in: path
      name: indexId
      required: true
      description: ID of the index
      schema:
        type: string
    items-search-config-nameFilter:
      name: name
      in: query
      required: false
      deprecated: true
      description: |
        Deprecated parameter. If `query` is provided, this parameter is ignored.
        If an index has an `id` equal to the value of this parameter, only that index will be retrieved. Otherwise, all indices containing this value in their `name` will be retrieved.
      schema:
        type: string
    items-search-config-queryFilter:
      name: query
      in: query
      required: false
      description: If an index has an `id` equal to the value of this parameter, only that index will be retrieved. Otherwise, all indices containing this value in their `name` will be retrieved. This parameter replaces the deprecated `name` parameter.
      schema:
        type: string
    items-search-config-excludeAbTests:
      name: excludeAbTests
      in: query
      required: false
      description: Only indices not involved in currently running AB tests will be retrieved.
      schema:
        type: boolean
    items-search-recent-indexId:
      name: indexId
      in: path
      required: true
      description: ID of the index that the query relates to
      schema:
        type: string
        example: 4add1a1fa877c1651906bb22c9dfd37a1618852272
    items-search-recent-clientUUID:
      name: clientUUID
      in: query
      required: true
      description: UUID of the profile for which the query is performed
      schema:
        type: string
        example: e0097757-d1e2-44ac-ba3c-d97979a354c1
    items-search-recent-windowSize:
      name: windowSize
      in: query
      required: false
      description: Maximum number of recent searches to be returned. <br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.
      schema:
        type: integer
        minimum: 1
        default: 15
    items-search-recent-timeUnit:
      name: timeUnit
      in: query
      required: false
      description: The time unit. Used in conjunction with `timeValue`.<br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.
      schema:
        type: string
        default: DAYS
        enum:
        - YEARS
        - MONTHS
        - WEEKS
        - DAYS
        - HOURS
        - MINUTES
        - SECONDS
    items-search-recent-timeValue:
      name: timeValue
      in: query
      required: false
      description: The amount of time units. Used in conjunction with `timeUnit`.<br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.
      schema:
        type: integer
        minimum: 1
        default: 30
    morph-LogsLimitInQuery:
      name: limit
      in: query
      required: false
      schema:
        type: number
        default: 500
        maximum: 5000
      description: The maximum number of log lines in each stage
    notes-service-profileId:
      in: path
      name: clientId
      required: true
      description: Profile ID
      schema:
        type: integer
        format: int64
    optimizer-manager-InQuerySearch:
      in: query
      name: search
      required: false
      description: ID of the experiment or a part of its name.
      schema:
        type: string
    optimizer-manager-InQueryStatus:
      in: query
      name: status
      required: false
      description: 'Requested status of the experiment. One of: NotStarted, Running, Paused, Finished, Draft. May pass more than one status.'
      schema:
        type: array
        items:
          type: string
          enum:
          - NotStarted
          - Running
          - Paused
          - Finished
          - Draft
    optimizer-manager-InQueryCampaignType:
      in: query
      name: campaignType
      required: false
      description: CampaignType of the experiment
      schema:
        type: string
        enum:
        - ITEMS_SEARCH
        - RECOMMENDATION_CAMPAIGN
    optimizer-manager-InPathExperimentId:
      in: path
      required: true
      name: id
      description: ID of the experiment
      schema:
        type: integer
    promotions-pathHandbillUuid:
      name: handbillUuid
      in: path
      required: true
      description: UUID of the handbill configuration
      schema:
        type: string
        format: uuid
    promotions-pathIdentifierValue:
      name: identifierValue
      in: path
      description: The value of the selected identifier
      required: true
      schema:
        type: string
    promotions-pathPromoIdentifierType:
      name: identifierType
      in: path
      required: true
      description: The promotion identifier to use for the request
      schema:
        type: string
        enum:
        - uuid
        - code
    promotions-pathClientIdentifierType:
      name: identifierType
      in: path
      description: |
        The Profile identifier to use for the request.

        `externalId` is known as `customId` or `custom_identify` in other Synerise services.
      required: true
      schema:
        type: string
        example: email
        enum:
        - email
        - phone
        - externalId
        - uuid
        - clientId
    promotions-pathLockIdentifier:
      name: lockIdentifier
      in: path
      description: Lock identifier
      required: true
      schema:
        type: string
        example: 2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119
    promotions-queryLockTtlSec:
      in: query
      name: lockTtlSec
      description: Lock duration in seconds
      schema:
        type: number
        default: 900
    promotions-queryOrderFieldName:
      in: query
      name: orderFieldName
      description: Name of the parameter used for sorting
      schema:
        type: string
        enum:
        - createdAt
        - headerName
        - code
        - startAt
        - expireAt
        - name
        - type
        default: createdAt
    promotions-queryOrder:
      in: query
      name: order
      description: Sorting order
      schema:
        type: string
        enum:
        - asc
        - desc
        default: asc
    promotions-queryQuery:
      in: query
      name: query
      description: A string to search for in the `headerName` parameter or fragment of UUID.
      schema:
        type: string
    promotions-queryPromotionUuids:
      in: query
      name: promotionUuids
      description: Filters the response data by a list of promotion UUIDs.
      required: false
      schema:
        type: string
        example: fc1ee5bf-ad97-47a8-a474-e1b6e755ff38,aabaed4e-4ee7-44d5-b079-445a017ec6fe
      style: form
      explode: true
    promotions-queryHandbillSort:
      name: sort
      in: query
      required: false
      description: |
        The sorting order of the response.


        You can sort by any combination of the following attributes:

        * `createdAt`: time when the configuration was created

        * `updatedAt`: time when the configuration was last updated


        You can sort ascending (default) or descending by adding `asc` or `desc` after the parameter, separated by a comma."
      style: form
      explode: true
      allowReserved: true
      schema:
        type: string
        example: createdAt,desc
    promotions-queryPromotionSort:
      name: sort
      in: query
      required: false
      description: |
        The sorting order of the response.


          You can sort by any combination of the following attributes:
          * `headerName`: promotion header name
          * `name`: promotion name
          * `code`: promotion code
          * `startAt`: time when the promotion starts
          * `createdAt`: time when the promotion was created
          * `updatedAt`: time when the promotion was last updated
          * `expireAt`: time when the promotion expires
          * `requireRedeemedPoints`: how many loyalty points are needed to redeem the promotion
          * `type`: type of the promotion
          * `priority`: priority of the promotion
          * `status` : status of the promotion for the Profile

          You can sort ascending (default) or descending by adding `asc` or `desc` after the parameter, separated by a comma.

          **Example**: `sort=requireRedeemedPoints&sort=expireAt,asc&sort=status,desc`
      style: form
      explode: true
      allowReserved: true
      schema:
        type: string
        example: requireRedeemedPoints,desc
    promotions-queryTarget:
      name: target
      in: query
      required: false
      description: The target of the promotion
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
          - ALL
          - SEGMENT
          default: ALL
    promotions-queryLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        example: 100
        default: 100
        maximum: 1000
    promotions-queryLockIdentifier:
      name: lockIdentifier
      in: query
      schema:
        type: string
        example: 6561d87b-2697-46ad-8f9a-0550736b86e3
      description: |-
        Identifier of the lock which will be created with this request. The lock disables the profile's possibility to fetch promotion lists.

        This lock will be active until one of those conditions is met:

        - the TTL (configured with the [settings](#operation/endpointSettingsUpdateSettingsPUT) endpoint) expires.
        - it is removed using the [Release "promotion requested" lock](#operation/endpointLockReleasePromotionRequestedLockForClientPOST) endpoint.
        - a promotion is redeemed and this lock's identifier is provided with the redemption request.
    promotions-queryPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    promotions-queryStoreCatalog:
      name: storeCatalog
      in: query
      description: Limits the response to data from stores included in a catalog.
      required: false
      schema:
        type: string
    promotions-queryStoreIds:
      name: storeIds
      in: query
      description: Limits the response to data from particular stores, identified by IDs.
      required: false
      schema:
        type: string
      style: form
      explode: false
    promotions-queryIncludeMeta:
      name: includeMeta
      in: query
      description: |2

        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page
      required: false
      schema:
        type: boolean
        example: false
        default: false
    promotions-queryIncludeVouchers:
      name: includeVouchers
      in: query
      schema:
        type: boolean
        example: false
        default: false
      description: |2

        When `true`, promotion with defined vouchers will also have list of assigned vouchers.

        When `false`, vouchers will not be fetched.
    promotions-queryStatusByType:
      name: statusByType
      in: query
      description: A combination of status and type, for example `[CUSTOM]=ACTIVE`
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: '[CUSTOM]=ACTIVE'
    promotions-queryTargetByType:
      name: targetByType
      in: query
      description: A combination of target and type, for example `[SEGMENT]=ACTIVE`
      required: false
      style: form
      explode: true
      schema:
        type: string
        example: '[SEGMENT]=ACTIVE'
    promotions-queryVisibilityStatus:
      name: visibilityStatus
      in: query
      description: Visibility status
      required: false
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
          - DRAFT
          - PUBLISH
          - HIDDEN
    promotions-queryPromotionType:
      name: type
      in: query
      description: Promotion type
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
          - GENERAL
          - CUSTOM
          - MEMBERS_ONLY
          - HANDBILL
    promotions-queryReturnCodes:
      name: returnCodes
      in: query
      description: Return deactivated codes
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: false
    promotions-queryLockPoints:
      name: lockPoints
      in: query
      description: Lock profile points during the deactivation process
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryPromotionStatus:
      name: status
      in: query
      description: Filter by promotion status
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
          - ACTIVE
          - ASSIGNED
          - REDEEMED
    promotions-queryLastingOnly:
      name: lastingOnly
      in: query
      description: When set to `true`, shows promotions/vouchers that are currently active and those that are still inactivated. (lastingAt set to null or lastingAt in future)
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryHandbillUuid:
      name: handbillUuid
      in: query
      required: true
      style: form
      schema:
        type: array
        description: An array of handbill configuration UUIDs
        items:
          type: string
    promotions-queryPromotionPresentOnly:
      name: presentOnly
      in: query
      description: |
        When set to:
        - `true`, the response includes only promotions that are currently active (startAt later than now or null, expireAt later than now or null)
        - `false`, the response includes the above and also promotions that are expired or will become active in the future.
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryPromotionDisplayableOnly:
      name: displayableOnly
      in: query
      description: When set to `true`, promotions which are not currently active are included in response, according to date range defined in promotion fields `displayFrom` and `displayTo`.
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: false
    promotions-queryTagNames:
      name: tagNames
      in: query
      description: Filter the response to promotions with a certain tag or tags
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
    promotions-queryExcludeTag:
      name: excludeTags
      in: query
      description: Promotions with the tags included in this list will not be deactivated
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
    promotions-queryCheckGlobalActivationLimits:
      name: checkGlobalActivationLimits
      in: query
      description: Flag to indicate if global limits should be checked
      required: false
      style: form
      explode: false
      schema:
        type: boolean
        example: true
        default: true
    promotions-queryPromotionFields:
      name: fields
      in: query
      description: Return only specified promotion fields. If `fields` is not specified, all fields are returned.
      required: false
      style: form
      explode: false
      schema:
        example: uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt
        type: array
        items:
          type: string
          enum:
          - uuid
          - code
          - status
          - type
          - redeemLimitPerClient
          - redeemQuantityPerActivation
          - currentRedeemedQuantity
          - currentRedeemLimit
          - activationCounter
          - possibleRedeems
          - details
          - discountType
          - discountValue
          - discountMode
          - discountModeDetails
          - requireRedeemedPoints
          - name
          - headline
          - description
          - images
          - startAt
          - expireAt
          - displayFrom
          - displayTo
          - assignedAt
          - lastingTime
          - lastingAt
          - catalogIndexItems
          - params
          - price
          - priority
          - maxBasketValue
          - minBasketValue
          - itemScope
          - tags
          - handbillUuid
    push-devices-service-pathIdentifierValue:
      name: identifierValue
      in: path
      description: The value of the selected identifier
      required: true
      schema:
        type: string
    push-devices-service-acceptHeader:
      name: Accept
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
        - application/json
    push-devices-service-pathClientId:
      name: clientId
      description: Unique identifier of a profile
      in: path
      required: true
      schema:
        type: integer
        format: int64
    query-rules-v2-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: Name of the attribute by which the data will be sorted
      schema:
        type: string
    query-rules-v2-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: desc
        enum:
        - desc
        - asc
    query-rules-v2-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    query-rules-v2-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 1000
        maximum: 1000
    query-rules-v2-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |2

        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    query-rules-v2-inQueryDirectoryId:
      in: query
      name: directoryId
      required: false
      description: Requested directoryId of the rule.
      schema:
        type: string
        format: uuid
    query-rules-v2-InQuerySearch:
      in: query
      name: search
      required: false
      description: Requested part of the name or the id of the rule.
      schema:
        type: string
    query-rules-v2-inPathIndexId:
      in: path
      name: indexId
      required: true
      description: ID of the index
      schema:
        type: string
    query-rules-v2-inPathRuleId:
      in: path
      name: ruleId
      required: true
      description: Rule identifier
      schema:
        type: integer
    query-rules-v2-statusFilter:
      name: status
      in: query
      required: false
      description: Only rules with this status will be retrieved.
      schema:
        type: string
        enum:
        - finished
        - draft
        - paused
        - scheduled
        - active
    query-rules-v2-nameFilter:
      name: name
      in: query
      required: false
      description: Only rules containing this name will be retrieved.
      schema:
        type: string
    query-rules-v2-consequenceTypeFilter:
      name: consequenceType
      in: query
      required: false
      description: Only rules producing at least one of the given consequence types will be retrieved. May be repeated.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          enum:
          - hide
          - promote
          - standardFilter
          - elasticFilter
          - boost
          - topHits
          - sortBy
          - customData
          - returnNoData
          - distinctFilter
          - pinFacet
          - hideFacet
          - replaceWord
          - removeWord
          - replaceQuery
          - scoringOverride
    recommendation-campaigns-campaignId:
      name: campaignId
      in: path
      description: ID of the campaign
      required: true
      schema:
        type: string
    recommendations-api-materializer-campaignIdentifier:
      name: campaignIdentifier
      in: path
      description: Recommendation campaign identifier - a campaignID or a slug
      required: true
      schema:
        type: string
    recommendations-api-materializer-identifierName:
      name: identifierName
      in: path
      description: The name of the profile identifier to use for the request. By default, the allowed identifier types are `id`, `uuid`, `email`, and `custom_identify`. This may be changed in the workspace configuration.
      required: true
      schema:
        type: string
        enum:
        - id
        - uuid
        - email
        - custom_identify
    recommendations-api-materializer-itemsSourceType:
      in: query
      name: itemsSourceType
      description: "Item ID or item IDs source type for the recommendation context.\n\nMust be used with `itemSourceId`. This overrides the `itemsSource` settings of the campaign definition.\n\nIn recommendations whose models doesn't use the item context, the attributes of those items can only be used in filters.  \n\nIf the items' source type is 'aggregate', the aggregate result will be used as context items. If the items' source type is 'expression', the expression result will be used as context items.\n\nThe item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.\n\nAlternatively, you can pass the `itemId` parameter to define context items directly. Only one of these options is allowed at the same time.\n"
      required: false
      schema:
        type: string
        enum:
        - aggregate
        - expression
    recommendations-api-materializer-itemsSourceId:
      in: query
      name: itemsSourceId
      description: |
        Source of item IDs for the recommendation context. In recommendations whose models doesn't use the item context, the attributes of those items can only be used in filters.

        Must be used with `itemsSourceType`.

        If the items' source type is 'aggregate', this is the aggregate's ID. If the items' source type is 'expression', this is the expression's ID.

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

        Alternatively, you can pass the `itemId` parameter to define context items directly. Only one of these options is allowed at the same time.
      required: false
      schema:
        type: string
    recommendations-api-materializer-paramsMaterializer:
      name: params
      in: query
      required: false
      description: |
        List of extra params that will be added to the `recommendation.generated` event. They must be in the `name:value` format. The total size must not exceed 500 bytes when written as a JSON object.
      example:
      - source:mobile
      schema:
        type: array
        items:
          type: string
    recommendations-config-InPathItemFeedId:
      in: path
      name: itemFeedId
      required: true
      description: ID of an item feed
      schema:
        type: string
    recommendations-config-InQueryCatalogType:
      in: query
      name: catalogType
      required: true
      description: Catalog type
      schema:
        type: string
        enum:
        - items
        - metadata
        - inventory
    recommendations-rust-all-recommendationsMinNumItems:
      name: minNumItems
      in: query
      required: false
      description: The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error.
      schema:
        $ref: '#/components/schemas/recommendations-rust-all-MinNumItems'
    recommendations-rust-all-recommendationsMaxNumItems:
      name: maxNumItems
      in: query
      required: false
      description: The maximal number of returned item recommendations.
      schema:
        $ref: '#/components/schemas/recommendations-rust-all-MaxNumItems'
    recommendations-rust-all-recommendationsCampaignId:
      name: campaignId
      in: query
      required: false
      description: The campaignId which will be passed as *utm_campaign* in a link to the recommended item.
      schema:
        type: string
        default: defaultCampaign
    recommendations-rust-all-recommendationsCampaignName:
      name: campaignName
      in: query
      required: false
      description: The campaign name which will be included in the recommendation.generated event.
      schema:
        type: string
    recommendations-rust-all-pathAggregateUuid:
      name: aggregateUUID
      in: path
      description: Information will be shown for the provided aggregate UUID.
      required: true
      schema:
        type: string
    recommendations-rust-all-pathClientUuid:
      name: clientUuid
      in: path
      description: Information will be shown for the provided profile UUID.
      required: true
      schema:
        type: string
    recommendations-rust-all-recommendationsClientUUID:
      name: clientUUID
      in: query
      description: |
        Profile UUID. This parameter is required for these recommendation types:
          - Personalized
          - Last seen
          - Recent interactions
          - Section
          - Attribute

        This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.
      required: false
      schema:
        type: string
    recommendations-rust-all-recommendationsBoostMetric:
      name: boostMetric
      in: query
      required: false
      description: ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).
      schema:
        type: string
    recommendations-rust-all-recommendationsSortMetric:
      name: sortMetric
      in: query
      required: false
      description: ID of the metric to sort the results by. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).
      schema:
        type: string
    recommendations-rust-all-recommendationsExcludePurchasedItems:
      name: excludePurchasedItems
      in: query
      required: false
      description: "When true, the recommendation results will include only items that the profile hasn't purchased before.  \n**IMPORTANT**: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation.\n"
      schema:
        $ref: '#/components/schemas/recommendations-rust-all-ExcludePurchasedItems'
    recommendations-rust-all-recommendationsExcludePurchasedItemsSince:
      name: excludePurchasedItemsSinceDays
      in: query
      required: false
      description: Limits the application of the `excludePurchasedItems` filter to a specified number of days.
      schema:
        $ref: '#/components/schemas/recommendations-rust-all-ExcludePurchasedItemsSince'
    recommendations-rust-all-recommendationsIncludeContextItems:
      name: includeContextItems
      in: query
      required: false
      description: The recommendation results will include context items from the request.
      schema:
        type: boolean
    recommendations-rust-all-filterExpr:
      name: filters
      in: query
      required: false
      description: "This string defines the criteria that an item must meet in order to be considered for recommendation.  \nFor information on building filters, see [\"Items Query Language (IQL)\" in the Developer Guide](https://hub.synerise.com/developers/iql/).\n"
      schema:
        type: string
    recommendations-rust-all-elasticFilterExpr:
      name: elastic:filters
      in: query
      required: false
      description: "This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.  \nFor information on building filters, see [\"Items Query Language (IQL)\" in the Developer Guide](https://hub.synerise.com/developers/iql/).\n"
      schema:
        type: string
    recommendations-rust-all-itemCatalogId:
      name: itemCatalogId
      in: query
      required: false
      description: ID (_not_ name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed.
      schema:
        type: string
        default: default
    recommendations-rust-all-inParamsItemId:
      name: itemId
      in: query
      required: false
      description: Item identifier, equal to `itemId` from the *item feed*. It can be used to define the item context of the query.
      schema:
        type: string
    recommendations-rust-all-inParamsItemIdList:
      name: itemId
      in: query
      required: false
      description: Item identifiers, equal to `itemId` from the *item feed*. They can be used to define the item context of the query.
      schema:
        type: array
        items:
          type: string
          description: Item identifier, equal to `itemId` from the *item feed*. It can be used to define the item context of the query.
    recommendations-rust-all-inPathItemId:
      in: path
      name: itemId
      required: true
      description: Item identifier, equal to `itemId` from the *item feed*.
      schema:
        type: string
    recommendations-rust-all-inPathClientUUID:
      name: clientUuid
      in: path
      description: Recommendations will be generated for the provided profile UUID.
      required: true
      schema:
        type: string
    recommendations-rust-all-distinctFilter:
      in: query
      name: distinctFilter
      required: false
      schema:
        $ref: '#/components/schemas/recommendations-rust-all-DistinctFilterReco'
    recommendations-rust-all-params:
      name: params
      in: query
      required: false
      description: |
        List of extra params that will be added to the `recommendation.generated` event. They must be in the `name:value` format. The total size must not exceed 500 bytes when written as a JSON object.
      example:
      - source:mobile
      schema:
        type: array
        items:
          type: string
    recommendations-rust-all-inventoryChannelId:
      name: inventoryChannelId
      in: query
      required: false
      description: |
        Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied.
      schema:
        type: string
    recommendations-rust-all-crossWorkspaceMode:
      name: crossWorkspaceMode
      in: query
      required: false
      description: |
        Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available.
      schema:
        type: boolean
    sauth-pathClientId:
      name: clientID
      in: path
      description: The ID of the Profile
      required: true
      schema:
        type: string
        example: '434428563'
    schema-service-pathFeedId:
      name: feedId
      in: path
      required: true
      description: UUID of a screen view feed
      schema:
        type: string
        format: uuid
    schema-service-pathDirectoryId:
      name: directoryId
      in: path
      required: true
      description: UUID of the directory
      schema:
        type: string
        format: uuid
    schema-service-pathGroupId:
      name: groupId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    schema-service-queryDirectoryId:
      name: directoryId
      in: query
      required: false
      description: UUID of the directory for filtering the results
      schema:
        type: string
        format: uuid
    schema-service-queryFeedId:
      name: feedId
      in: query
      required: false
      schema:
        type: string
        format: uuid
        description: UUID of the screen view feed for filtering the results
    schema-service-querySchema:
      name: schema
      in: query
      description: Name of the document schema (type) for filtering the results
      required: false
      schema:
        type: string
    schema-service-queryGroupId:
      name: groupId
      in: query
      required: false
      description: UUID of the document group for filtering the results
      schema:
        type: string
        format: uuid
        description: UUID of the document schema for filtering the results
    schema-service-queryStatus:
      name: status
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/schema-service-DocumentStatus'
    schema-service-queryPage:
      name: page
      in: query
      required: false
      schema:
        type: number
        format: int32
        minimum: 1
        default: 1
    schema-service-queryLimit:
      name: limit
      in: query
      required: false
      description: Limit of items per page
      schema:
        type: number
        format: int32
        default: 25
    schema-service-querySearch:
      name: search
      in: query
      required: false
      description: A string to search for in resource names
      schema:
        type: string
    schema-service-pathFeedSlug:
      in: path
      name: feedSlug
      description: Slug of the screen view feed
      required: true
      schema:
        type: string
    schema-service-pathIdentifierType:
      in: path
      name: identifierType
      description: Type of the profile identifier. The value is sent in `identifierValue` in the request body.
      required: true
      schema:
        type: string
        enum:
        - id
        - uuid
        - email
        - custom_identify
    schema-service-pathDocumentSlugLegacy:
      in: path
      name: slug
      description: Document slug
      required: true
      schema:
        type: string
    schema-service-pathDocumentUuidLegacy:
      in: path
      name: uuid
      description: Document UUID. The UUID is the same for all versions of a document.
      required: true
      schema:
        type: string
        format: uuid
    schema-service-pathDocumentIdLegacy:
      in: path
      name: id
      description: Document ID. Each version of a document has a unique ID.
      required: true
      schema:
        type: integer
    schema-service-PathDocumentSlug:
      name: slug
      in: path
      required: true
      description: Slug of the document
      schema:
        type: string
        pattern: '[a-z0-9]+(?:-[a-z0-9]+)*'
    schema-service-PathDocumentUuid:
      name: documentId
      in: path
      required: true
      description: UUID of the document
      schema:
        type: string
        format: uuid
    schema-service-PathDocumentIdentifier:
      name: documentIdentifier
      in: path
      required: true
      description: UUID or slug of the document
      schema:
        type: string
    schema-service-pathScreenViewId:
      name: screenViewId
      in: path
      required: true
      description: UUID of the screen view
      schema:
        type: string
        format: uuid
    schema-service-pathScreenViewVersion:
      name: screenViewVersion
      in: path
      required: true
      description: Version of the screen view
      schema:
        type: string
    schema-service-QueryLimitRequired:
      in: query
      name: limit
      description: The maximum number of items to retrieve for pagination
      required: true
      schema:
        type: string
    schema-service-QueryPageRequired:
      in: query
      name: page
      description: The number of the page to retrieve
      required: true
      schema:
        type: integer
    synonyms-crud-paginationSortBy:
      name: sortBy
      in: query
      required: false
      description: 'Name of the attribute by which the data will be sorted and ordered by. Supported values: `indexId`, `updatedAt`, `createdAt`, `confidence`. Defaults to `updatedAt`.'
      schema:
        type: string
        example:
        - confidence:asc
    synonyms-crud-paginationOrdering:
      name: ordering
      in: query
      required: false
      description: Sorting order
      schema:
        type: string
        default: desc
        enum:
        - desc
        - asc
    synonyms-crud-paginationPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    synonyms-crud-paginationLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 1000
        maximum: 1000
    synonyms-crud-paginationIncludeMeta:
      name: includeMeta
      in: query
      required: false
      description: |2

        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
      schema:
        type: boolean
        default: false
    synonyms-crud-source:
      name: source
      in: query
      required: false
      description: Filter synonyms by source
      schema:
        $ref: '#/components/schemas/synonyms-crud-SynonymSource'
    synonyms-crud-sourceForImport:
      name: source
      in: query
      required: false
      description: Source to assign to imported synonyms
      schema:
        allOf:
        - $ref: '#/components/schemas/synonyms-crud-SynonymSource'
        - default: Import
    synonyms-crud-state:
      name: state
      in: query
      required: false
      description: Filter synonyms by state
      schema:
        $ref: '#/components/schemas/synonyms-crud-SynonymState'
    synonyms-crud-search:
      name: search
      in: query
      required: false
      description: Search synonyms by word or synonym phrase (case-insensitive partial match)
      schema:
        type: string
    synonyms-crud-synonymType:
      name: type
      in: query
      required: false
      description: Filter synonyms by type
      schema:
        $ref: '#/components/schemas/synonyms-crud-Type'
    synonyms-crud-confidence:
      name: confidence
      in: query
      required: false
      description: Filter synonyms with confidence greater than or equal to this value
      schema:
        type: number
        format: float
        minimum: 0.0
        maximum: 1.0
    synonyms-crud-inPathSynonymId:
      in: path
      name: synonymId
      required: true
      description: Synonym identifier
      schema:
        type: integer
    synonyms-crud-inPathIndexId:
      in: path
      name: indexId
      required: true
      description: Index identifier
      schema:
        type: string
        format: uuid
    tags-collector-DirectoryHash-collector:
      in: path
      name: directoryHash
      description: Hash ID of the directory
      required: true
      schema:
        type: string
    tags-collector-TagHash-collector:
      in: path
      name: tagHash
      description: HashID of a tag
      required: true
      schema:
        type: string
    template-backend-templateUuid:
      in: path
      name: templateUuid
      schema:
        type: string
        format: uuid
        example: e0326a2d-7697-4ae9-b490-31f97041adcb
      description: Template UUID
      required: true
    template-backend-directoryUuid:
      in: path
      name: directoryUUID
      schema:
        type: string
        format: uuid
        example: e0326a2d-7697-4ae9-b490-31f97041adcb
      description: Directory UUID
      required: true
    template-backend-previewUuid:
      in: path
      name: previewUuid
      schema:
        type: string
        format: uuid
        example: e0326a2d-7697-4ae9-b490-31f97041adcb
      description: Preview UUID
      required: true
    uauth-PaginationPage:
      name: page
      in: query
      description: The page of results to retrieve. The first page has the index `0`.
      required: true
      schema:
        type: integer
        format: int32
    uauth-PaginationSize:
      name: size
      in: query
      description: The number of entries on a page
      required: true
      schema:
        type: integer
        format: int32
    uauth-InvitationIds:
      name: invitationIds
      in: path
      description: Comma-separated list of invitation IDs. To obtain the invitation ID, check the [list of users with PENDING status](#/operation/UsersListingUsingGET). The invitation ID for a user is the same as the ID of that user.
      required: true
      schema:
        type: string
    uauth-roleId:
      name: roleId
      in: path
      description: Role ID
      required: true
      schema:
        type: integer
        format: int64
    uauth-roleGroupId:
      name: groupId
      in: path
      description: Role group ID
      required: true
      schema:
        type: integer
        format: int64
    uauth-businessProfileId:
      name: businessProfileUUID
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: UUID of the workspace
    uauth-mfaType:
      name: mfaType
      in: query
      description: Type of multi-factor authentication
      required: true
      schema:
        $ref: '#/components/schemas/uauth-MultiFactorMethod'
    uauth-UserId:
      name: userId
      in: path
      required: true
      description: User ID
      schema:
        type: integer
    uauth-UserIds:
      name: ids
      in: path
      description: Comma-separated user IDs
      required: true
      schema:
        type: string
        example: 11405,11406,11407
    uploader-service-pathIdentifierType:
      in: path
      name: identifierType
      description: Type of the profile identifier. The value is sent in `identifierValue` in the request body.
      required: true
      schema:
        type: string
        enum:
        - id
        - uuid
        - email
        - custom_identify
    vouchers-acceptHeader:
      name: Accept
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
        - application/json
    vouchers-contentTypeHeader:
      name: Content-Type
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
        - application/json
    vouchers-apiVersionHeader:
      name: Api-Version
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
        - '4.4'
        - '4.2'
    vouchers-queryLimit:
      name: limit
      in: query
      description: The number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        example: 100
        default: 100
        maximum: 1000
    vouchers-queryPage:
      name: page
      in: query
      description: Page number to return for pagination. The first page has the index `1`.
      required: false
      schema:
        type: integer
        format: int32
        example: 4
        default: 1
    vouchers-queryIncludeMeta:
      name: includeMeta
      in: query
      description: |2

        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page
      required: false
      schema:
        type: boolean
        example: false
        default: false
    vouchers-querySortFieldName:
      name: orderFieldName
      in: query
      description: Name of the parameter used for sorting. If you include this parameter, you **must** also send the `order` parameter.
      required: false
      schema:
        type: string
        enum:
        - name
        - poolLimit
        - startAt
        - expireIn
        - createdAt
        default: createdAt
    vouchers-querySortingOrder:
      name: order
      in: query
      description: Sorting order. If you include this parameter, you **must** also send the `orderFieldName` parameter.
      required: false
      schema:
        type: string
        enum:
        - asc
        - desc
        default: asc
    vouchers-queryFilter:
      name: query
      in: query
      description: Filter by phrase in pool name.
      required: false
      schema:
        type: string
    vouchers-queryClientIdentifierName:
      name: clientIdentifierName
      in: query
      description: The Profile identifier to use for the request.
      required: true
      schema:
        type: string
        enum:
        - id
        - uuid
        - email
        - custom_identify
      example: custom_identify
    vouchers-queryClientIdentifierValue:
      name: clientIdentifierValue
      in: query
      description: The value of the selected profile identifier
      required: true
      schema:
        type: string
      example: custom_identify_123456
    vouchers-pathVoucherUuid:
      name: voucherUuid
      in: path
      description: UUID of the voucher
      required: true
      schema:
        type: string
        example: 29392878-d43f-402e-8297-f63d465cf173
    vouchers-pathVoucherSearchValue:
      name: searchValue
      in: path
      description: The value to search for
      required: true
      schema:
        type: string
        example: 29392878-d43f-402e-8297-f63d465cf173
    vouchers-pathVoucherSearchKey:
      name: searchKey
      in: path
      description: The key type to search by
      required: true
      schema:
        type: string
        example: code
        enum:
        - code
        - uuid
    vouchers-pathClientUuid:
      name: clientUuid
      in: path
      description: UUID of the Profile
      required: true
      schema:
        type: string
        example: e9e6840b-b9d4-4c7b-8191-9c4f9e751c76
    vouchers-pathPoolUuid:
      name: poolUuid
      in: path
      description: UUID of the voucher pool
      required: true
      style: simple
      explode: false
      schema:
        type: string
        example: 8465c240-d38e-42f8-af29-b9fa1ed05115
  schemas:
    activities-api-action:
      type: object
      title: Action
      description: Details of the action.
      properties:
        name:
          $ref: '#/components/schemas/activities-api-actionName'
        label:
          type: string
          description: Human-readable label of the event. Used in Data Management, Analytics, and Automation modules. You can add this parameter to an event the Data Management module, but up to 48 hours may pass until it's returned here.
        description:
          type: string
          description: Description of the event. Used in Data Management, Analytics, and Automation modules. You can add this parameter to an event the Data Management module, but up to 48 hours may pass until it's returned here.
          nullable: true
    activities-api-actionName:
      type: string
      example: page.visit
      description: 'Action name. Can be up to 32 characters long and must match the following regular expression: `^[a-zA-Z0-9\.\-_]+$`'
    activities-api-ActivityRaw1:
      type: object
      title: Raw data
      properties:
        action:
          $ref: '#/components/schemas/activities-api-actionName'
        eventUUID:
          $ref: '#/components/schemas/activities-api-EventUUID'
        unique:
          type: integer
          nullable: true
          description: Not available (null) with raw data
        label:
          type: string
          deprecated: true
          description: The label that was sent with the event.
        createDate:
          $ref: '#/components/schemas/activities-api-Timestamp'
        params:
          $ref: '#/components/schemas/activities-api-RawParams'
    activities-api-ActivityRaw2:
      type: object
      title: Raw data
      properties:
        action:
          $ref: '#/components/schemas/activities-api-actionName'
        eventUUID:
          $ref: '#/components/schemas/activities-api-EventUUID'
        unique:
          $ref: '#/components/schemas/activities-api-UniqueInt'
        label:
          type: string
          deprecated: true
        client:
          $ref: '#/components/schemas/activities-api-client'
        params:
          type: object
          description: Parameters of the event
          properties:
            ip:
              $ref: '#/components/schemas/activities-api-SourceIp'
            eventCreateTime:
              $ref: '#/components/schemas/activities-api-EventCreateTime'
          additionalProperties:
            description: Custom parameters that were sent with the event
        createDate:
          $ref: '#/components/schemas/activities-api-Timestamp'
    activities-api-ActivityTerrarium1:
      type: object
      title: Data from event storage
      properties:
        action:
          $ref: '#/components/schemas/activities-api-actionName'
        eventUUID:
          $ref: '#/components/schemas/activities-api-EventUUID'
        unique:
          $ref: '#/components/schemas/activities-api-UniqueInt'
        createDate:
          $ref: '#/components/schemas/activities-api-Timestamp'
        label:
          type: string
          deprecated: true
        params:
          type: object
          description: Parameters of the event
          properties:
            eventCreateTime:
              $ref: '#/components/schemas/activities-api-EventCreateTime'
            ip:
              $ref: '#/components/schemas/activities-api-SourceIp'
          additionalProperties:
            description: Additional parameters required by this event type and custom parameters.
    activities-api-ActivityTerrarium2:
      type: object
      title: Data from event storage
      properties:
        action:
          $ref: '#/components/schemas/activities-api-action'
        description:
          $ref: '#/components/schemas/activities-api-EventDescription'
        eventUUID:
          $ref: '#/components/schemas/activities-api-EventUUID'
        unique:
          $ref: '#/components/schemas/activities-api-UniqueInt'
        icon:
          type: string
          description: URL of the event's icon
        icons:
          nullable: true
          $ref: '#/components/schemas/activities-api-iconDetails'
        time:
          $ref: '#/components/schemas/activities-api-Timestamp'
        label:
          description: |-
            Event name shown in a Profile card (not in Analytics). Can include jinja inserts, which are returned unprocessed.

            This name is not used when searching for events in Analytics or for Automation trigger purposes.

            If no label is defined in the Data Management settings, this field returns the value of `label` that was sent with the original event, but that is not used by the Synerise Web Application.
          type: string
        client:
          $ref: '#/components/schemas/activities-api-client'
        userAgent:
          $ref: '#/components/schemas/activities-api-userAgent'
        modifiedBy:
          nullable: true
          type: string
          deprecated: true
    activities-api-client:
      type: object
      description: Profile's data
      properties:
        uuid:
          $ref: '#/components/schemas/activities-api-ClientUuid'
        id:
          $ref: '#/components/schemas/activities-api-ClientId'
        firstname:
          description: Profile's first name
          type: string
        lastname:
          description: Profile's last name
          type: string
        email:
          description: Profile's email address
          type: string
        avatarUrl:
          description: URL of the profile's avatar
          type: string
    activities-api-ClientEventsRequest:
      type: object
      required:
      - identifierValue
      - additionalData
      properties:
        identifierValue:
          $ref: '#/components/schemas/activities-api-IdentifierValue'
        additionalData:
          $ref: '#/components/schemas/activities-api-ClientEventsRequestAdditionalData'
    activities-api-ClientEventsRequestAdditionalData:
      type: object
      description: Pagination, date filters, and other optional parameters
      properties:
        actions:
          type: string
          example: page.visit,client.login
          description: A comma-separated list of actions (or a single action) that will be included in the response.
        dateFrom:
          type: string
          example: '1720688755000'
          description: Lower value of the time range, as a Unix timestamp in milliseconds.
        dateTo:
          type: string
          example: '1720695955000'
          description: Upper limit of the time range, as a Unix timestamp in milliseconds.
        limit:
          type: string
          default: 50
          description: The maximum number of items per page
        raw:
          type: string
          enum:
          - 'true'
          - 'false'
          default: 'false'
          description: 'When `true`, the response returns raw data. If raw data is not available, processed data from event storage (like from `"raw": false`) is returned instead.'
        pageToken:
          type: string
          description: The token of the page to retrieve. You can check the tokens of the next/previous page in the response to this endpoint. If not provided, the first page is retrieved.
        sortBy:
          type: string
          enum:
          - time:desc
          - time:asc
          default: time:desc
          description: Sorting order. `time:desc` (default) returns newest events first.
    activities-api-ClientId:
      type: number
      description: Profile's ID
    activities-api-ClientUuid:
      type: string
      description: Profile's UUID
    activities-api-descriptionRequest:
      type: object
      description: This object holds the details of the custom description
      properties:
        action:
          $ref: '#/components/schemas/activities-api-actionName'
        description:
          $ref: '#/components/schemas/activities-api-EventDescription'
    activities-api-descriptionResponse:
      type: object
      description: This object holds the details of the custom description
      properties:
        id:
          $ref: '#/components/schemas/activities-api-MappingId'
        businessProfileId:
          type: number
          description: Workspace where this mapping applies
        action:
          $ref: '#/components/schemas/activities-api-actionName'
        description:
          $ref: '#/components/schemas/activities-api-EventDescription'
    activities-api-EventCreateTime:
      type: string
      format: date-time
      description: |-
        Time when the event was received, as an ISO string.
        When you overwrite an event with eventSalt, this value changes to the time of overwriting.
      example: '2022-11-04T12:09:30.404Z'
    activities-api-EventDescription:
      type: string
      description: |-
        Event description shown in a Profile card. Can include jinja inserts, which are returned unprocessed.
        This description is not used when searching for events in Analytics or for Automation trigger purposes.
    activities-api-EventLabel:
      type: string
      description: |-
        Event name shown in a Profile card. Can include jinja inserts, which are returned unprocessed.
        This description is not used when searching for events in Analytics or for Automation trigger purposes.
    activities-api-EventUUID:
      type: string
      description: UUID of the event
      example: 482af443-7f6f-4b80-b4ac-a7db5a2f543a
    activities-api-iconDetails:
      type: object
      description: Icon configuration with primary, secondary icon and color
      required:
      - primary
      properties:
        primary:
          type: string
          description: Primary icon ID/name from the system SVG library
        secondary:
          type: string
          nullable: true
          description: Secondary icon ID/name from the system SVG library
        color:
          type: string
          nullable: true
          description: Semantic color name (e.g. positive, negative, warning, neutral) or hex color code
    activities-api-iconRequest:
      type: object
      description: Details of the icon mapping
      required:
      - action
      - icons
      properties:
        action:
          $ref: '#/components/schemas/activities-api-actionName'
        icons:
          $ref: '#/components/schemas/activities-api-iconDetails'
    activities-api-iconResponse:
      type: object
      description: Details of the icon mapping
      properties:
        id:
          $ref: '#/components/schemas/activities-api-MappingId'
        businessProfileId:
          type: number
          description: Workspace where this mapping applies
        action:
          $ref: '#/components/schemas/activities-api-actionName'
        icons:
          $ref: '#/components/schemas/activities-api-iconDetails'
    activities-api-IdentifierValue:
      type: string
      description: Value of the identifier selected in `identifierType`
    activities-api-labelRequest:
      type: object
      description: This object holds the details of the custom label
      properties:
        action:
          $ref: '#/components/schemas/activities-api-actionName'
        label:
          $ref: '#/components/schemas/activities-api-EventLabel'
    activities-api-labelResponse:
      type: object
      description: This object holds the details of the custom label
      properties:
        id:
          $ref: '#/components/schemas/activities-api-MappingId'
        businessProfileId:
          type: number
          description: Workspace where this mapping applies
        action:
          $ref: '#/components/schemas/activities-api-actionName'
        label:
          $ref: '#/components/schemas/activities-api-EventLabel'
    activities-api-MappingId:
      type: number
      description: ID of the mapping
    activities-api-RawParams:
      type: object
      description: Parameters of the event. Some of the parameters listed here don't exist in system events.
      additionalProperties:
        description: Other parameters depending on event type and custom parameters
      properties:
        ip:
          $ref: '#/components/schemas/activities-api-SourceIp'
        clientId:
          $ref: '#/components/schemas/activities-api-ClientId'
        uuid:
          $ref: '#/components/schemas/activities-api-ClientUuid'
        snr-original-time:
          type: string
          description: Original ISO string that was sent with the event. This is saved without modification even if the time was rejected (for example, because it was a future date).
        eventUUID:
          $ref: '#/components/schemas/activities-api-EventUUID'
        eventCreateTime:
          $ref: '#/components/schemas/activities-api-EventCreateTime'
        time:
          $ref: '#/components/schemas/activities-api-Timestamp'
        businessProfileId:
          type: integer
          description: Workspace ID
    activities-api-SingleActivityRequest:
      type: object
      required:
      - identifierValue
      - additionalData
      properties:
        identifierValue:
          type: string
          description: Value of the selected profile identifier
        additionalData:
          description: Identification of the event to retrieve
          oneOf:
          - type: object
            title: Event storage data request
            required:
            - time
            - unique
            properties:
              time:
                type: string
                description: |-
                  Unix timestamp of when the event occurred, in milliseconds. To find the value you need:
                  - from raw data responses, use the `time` property from the `params` object
                  - from event storage responses, use the `time` or `createDate` property
                example: '1667563770404'
              unique:
                $ref: '#/components/schemas/activities-api-UniqueStr'
          - type: object
            title: Raw data request (if not available, data from event storage is returned)
            required:
            - time
            - eventUUID
            properties:
              time:
                $ref: '#/components/schemas/activities-api-Timestamp'
              eventUUID:
                $ref: '#/components/schemas/activities-api-EventUUID'
    activities-api-SourceIp:
      type: string
      description: IP of the device which sent the event
    activities-api-Timestamp:
      type: integer
      description: |-
        Unix timestamp of when the event occurred, in milliseconds.

        This is the time that:
        - is sent as `recordedAt` to **v4/transactions/** endpoints
        - is sent as `time` to **v4/events/** endpoints
        - is the occurrence time of system events
        - is used (after converting to ISO string) as the event time when overwriting with eventSalt (see v4/events endpoints)

        If the event had no time provided when sending, the time of receiving the event is used.

        If the event had a future time when sending, it was rejected and the time of receiving the event is used.
      example: 1667563770404
    activities-api-UniqueInt:
      type: integer
      description: Unique identifier of the event
      example: 1245924049
    activities-api-UniqueStr:
      type: string
      description: Unique identifier of the event
      example: '1245924049'
    activities-api-userAgent:
      type: object
      description: User Agent details
      properties:
        system:
          type: string
          description: Operating System
        browser:
          description: Browser
          type: string
    activities-api-Cursors:
      type: object
      description: Tokens of the next and previous pages
      required:
      - after
      - before
      properties:
        after:
          type: string
          description: Token of the next page
        before:
          type: string
          description: Token of the previous page
    activities-api-Link:
      type: object
      required:
      - url
      - rel
      properties:
        url:
          type: string
          description: URL of the page, used for navigation
        rel:
          type: string
          description: The type of relation to the current page. `first` is always the first page.
          enum:
          - first
          - prev
          - next
    activities-api-Meta:
      type: object
      description: Pagination metadata
      properties:
        links:
          type: array
          description: Links to the neighboring pages and the first page
          items:
            $ref: '#/components/schemas/activities-api-Link'
        cursors:
          $ref: '#/components/schemas/activities-api-Cursors'
        limit:
          type: integer
          format: int32
          description: Limit of items per page
        count:
          type: integer
          nullable: true
          description: The number of items on the current page
    activities-api-PaginatedEvents:
      type: object
      required:
      - meta
      - data
      properties:
        meta:
          $ref: '#/components/schemas/activities-api-Meta'
        data:
          type: array
          description: A list of events
          items:
            oneOf:
            - $ref: '#/components/schemas/activities-api-ActivityTerrarium2'
            - type: object
              title: Raw data
              properties:
                eventUUID:
                  $ref: '#/components/schemas/activities-api-EventUUID'
                unique:
                  type: integer
                  nullable: true
                  description: Not available (null) with raw data
                action:
                  $ref: '#/components/schemas/activities-api-actionName'
                label:
                  type: string
                  deprecated: true
                  description: The label that was sent with the event.
                client:
                  $ref: '#/components/schemas/activities-api-client'
                params:
                  $ref: '#/components/schemas/activities-api-RawParams'
                createDate:
                  $ref: '#/components/schemas/activities-api-Timestamp'
    activity-time-estimator-Hours:
      type: array
      description: "An array of best hour prediction arrays.  \n\nThe array at index `0` is for the profile at index `0` in the profile list, the array at `1` is for profile `1`, and so on.\n"
      example:
      - 16
      - 32
      - 64
      items:
        type: array
        items:
          type: integer
          example: 17
    activity-time-estimator-Predictions:
      type: array
      description: "An array of predicted probabilities for each hour in the `hours` array.  \n\nResults at index `0` are for the hours at index `0` in the `hours` array. Result at index `0` is for the hour at index `0`.  \n\nHigher values mean higher probability.\n"
      example:
      - 0.013318098150193691
      - 0.012947574257850647
      - 0.0123398806899786
      items:
        type: array
        items:
          type: number
          format: float
          example: 0.013318098150193691
    activity-time-estimator-ClientIDs:
      type: array
      maxItems: 1000
      description: An array of profile IDs. To generate predictions for fake profiles, send empty strings as the identifiers.
      items:
        type: string
        description: Profile ID
        example: '67346'
    activity-time-estimator-ClientUUIDs:
      type: array
      maxItems: 1000
      description: An array of profile UUIDs. To generate predictions for fake profiles, send empty strings as the identifiers.
      items:
        type: string
        description: Profile UUID
        example: 6768085e-5925-43c6-b64f-4b90d02de8f2
    activity-time-estimator-TimeIndexValue:
      type: integer
      title: Hour
      description: "Hour of the week.  \nThe count starts from `0` at 00:00 on Monday. The counter changes on a full hour.  \n**Examples**:\n  - Monday, 00:00 is `0`\n  - Monday, 00:47 is `0`\n  - Monday, 01:00 is `1`\n  - Monday, 23:59 is `23`\n  - Tuesday, 00:00 is `24`\n  - Tuesday, 01:15 is `25`\n"
      minimum: 0
      maximum: 167
    activity-time-estimator-TimeRange:
      type: array
      title: Hour range
      description: A range of hours
      minItems: 2
      maxItems: 2
      example:
      - 4
      - 7
      items:
        $ref: '#/components/schemas/activity-time-estimator-TimeIndexValue'
    activity-time-estimator-TimeIndex:
      type: array
      maxItems: 168
      description: |
        An array of times and time ranges to include in the predictions. If empty or omitted, the entire week is included (with the exceptions listed in `timeIndexExclude`, if they exist).

        A time range is a two-item array. For example, `[4,7]` is the range from Monday, 03:00 to Monday, 06:59. You can mix hours and time ranges in the request.
      example:
      - - 0
        - 23
      - 24
      - 25
      - 26
      - - 27
        - 48
      items:
        anyOf:
        - $ref: '#/components/schemas/activity-time-estimator-TimeRange'
        - $ref: '#/components/schemas/activity-time-estimator-TimeIndexValue'
    activity-time-estimator-Mode:
      type: string
      description: The mode name
      default: standard
    activity-time-estimator-TimeIndexExclude:
      type: array
      maxItems: 168
      description: |
        An array of times and time ranges to exclude from the predictions. If empty or omitted, the entire week is included (according to the time selections made in `timeIndex`, if they exist).

        A time range is a two-item array. For example, `[4,7]` is the range from Monday, 03:00 to Monday, 06:59. You can mix hours and time ranges in the request.
      example:
      - - 0
        - 23
      - 24
      - 25
      - 26
      items:
        anyOf:
        - $ref: '#/components/schemas/activity-time-estimator-TimeRange'
        - $ref: '#/components/schemas/activity-time-estimator-TimeIndexValue'
    activity-time-estimator-TopN:
      type: integer
      minimum: 1
      maximum: 168
      description: The number of best predictions to return for each profile. If omitted, predictions for every hour of the week are returned.
    ai-stats-averageClickPosition:
      type: number
      format: float
      description: The average position of the clicked item on the list of results.
    ai-stats-averageOrderValue:
      type: number
      format: float
      description: The average value of orders resulting from the search.
    ai-stats-clickThroughRate:
      type: number
      format: float
      description: CTR of the search.
    ai-stats-conversionRate:
      type: number
      format: float
      description: Conversion rate of the search.
    ai-stats-conversions:
      type: integer
      description: The number of successful conversions.
    ai-stats-noResultsCount:
      type: integer
      description: The number of searches which returned no results.
    ai-stats-revenue:
      type: number
      format: float
      description: Revenue generated from the search.
    ai-stats-totalClicks:
      type: integer
      description: The number of times a result was clicked.
    ai-stats-query:
      type: string
      description: Query used for search.
    ai-stats-totalCount:
      type: integer
      description: The number of times the search was performed.
    ai-stats-totalSuggestionsUsed:
      type: integer
      description: The number of times a user accepted a suggestion.
    ai-stats-views:
      type: integer
      description: The number of recommendation frame views.
    ai-stats-generations:
      type: integer
      description: The number of generated recommendations.
    ai-stats-itemPurchases:
      type: integer
      description: The number of individual item purchases.
    ai-stats-transactions:
      type: integer
      description: The number of transactions resulting from the recommendation.
    ai-stats-recommendationsRevenue:
      type: number
      format: float
      description: Total revenue generated by recommendations.
    ai-stats-itemPurchasesPerItemClick:
      type: number
      format: float
      description: Item purchases per item click ratio.
    ai-stats-frameClicksPerGeneration:
      type: number
      format: float
      description: Frame clicks per generation ratio.
    ai-stats-frameClicksPerView:
      type: number
      format: float
      description: Frame clicks per view ratio.
    ai-stats-uniqueClients:
      type: number
      format: integer
      description: Number of unique profiles which generated a recommendation.
    ai-stats-frameClicks:
      type: number
      format: integer
      description: Number of clicks on a recommendation frame.
    ai-stats-itemClicks:
      type: number
      format: integer
      description: Number of clicks on a recommendation item.
    ai-stats-QueriesSummaryData:
      type: object
      description: Queries statistics
      properties:
        averageClickPosition:
          $ref: '#/components/schemas/ai-stats-averageClickPosition'
        averageOrderValue:
          $ref: '#/components/schemas/ai-stats-averageOrderValue'
        clickThroughRate:
          $ref: '#/components/schemas/ai-stats-clickThroughRate'
        conversionRate:
          $ref: '#/components/schemas/ai-stats-conversionRate'
        conversions:
          $ref: '#/components/schemas/ai-stats-conversions'
        noResultsCount:
          $ref: '#/components/schemas/ai-stats-noResultsCount'
        revenue:
          $ref: '#/components/schemas/ai-stats-revenue'
        totalClicks:
          $ref: '#/components/schemas/ai-stats-totalClicks'
        totalCount:
          $ref: '#/components/schemas/ai-stats-totalCount'
        totalSuggestionsUsed:
          $ref: '#/components/schemas/ai-stats-totalSuggestionsUsed'
    ai-stats-QueriesTopData:
      type: array
      description: Top queries
      items:
        type: object
        properties:
          query:
            $ref: '#/components/schemas/ai-stats-query'
          count:
            $ref: '#/components/schemas/ai-stats-totalCount'
          clicks:
            $ref: '#/components/schemas/ai-stats-totalClicks'
          clickThroughRate:
            $ref: '#/components/schemas/ai-stats-clickThroughRate'
          revenue:
            $ref: '#/components/schemas/ai-stats-revenue'
          conversions:
            $ref: '#/components/schemas/ai-stats-conversions'
          conversionRate:
            $ref: '#/components/schemas/ai-stats-conversionRate'
    ai-stats-FiltersSummaryData:
      type: array
      description: Filters stats
      items:
        type: object
        properties:
          filterName:
            type: string
            description: Name of the filterable attribute
          count:
            type: integer
            description: The number of times the filter was used
    ai-stats-RulesSummaryData:
      type: array
      description: Rules stats
      items:
        type: object
        properties:
          ruleId:
            type: integer
            description: Applied rule id
          count:
            type: integer
            description: The number of times the rule was applied
    ai-stats-QueriesSummaryMultipleIndicesData:
      type: array
      description: Queries statistics for multiple indices
      items:
        type: object
        properties:
          indexId:
            type: string
            description: ID of the index for which the stats are requested
            example: 4add1a1fa877c1651906bb22c9dfd37a1618852272
          stats:
            $ref: '#/components/schemas/ai-stats-QueriesSummaryData'
    ai-stats-Error:
      type: object
      properties:
        httpStatus:
          type: integer
          example: 500
          description: HTTP status of the error.
        errorCode:
          type: integer
          description: Status code. See [error reference](https://developers.synerise.com/errors.html).
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred.
        message:
          type: string
          description: Description of the problem.
        traceId:
          type: string
          description: Trace ID for debugging.
        help:
          type: string
          description: Currently unused.
    ai-stats-RecoStatsSchema:
      type: object
      description: Recommendation statistics.
      properties:
        views:
          $ref: '#/components/schemas/ai-stats-views'
        revenue:
          $ref: '#/components/schemas/ai-stats-recommendationsRevenue'
        itemPurchases:
          $ref: '#/components/schemas/ai-stats-itemPurchases'
        itemPurchasesPerItemClick:
          $ref: '#/components/schemas/ai-stats-itemPurchasesPerItemClick'
        itemClicks:
          $ref: '#/components/schemas/ai-stats-itemClicks'
        transactions:
          $ref: '#/components/schemas/ai-stats-transactions'
        frameClicks:
          $ref: '#/components/schemas/ai-stats-frameClicks'
        frameClicksPerGeneration:
          $ref: '#/components/schemas/ai-stats-frameClicksPerGeneration'
        frameClicksPerView:
          $ref: '#/components/schemas/ai-stats-frameClicksPerView'
        generations:
          $ref: '#/components/schemas/ai-stats-generations'
        uniqueClients:
          $ref: '#/components/schemas/ai-stats-uniqueClients'
    ai-stats-RecoDateStatsSchema:
      type: object
      description: Recommendation campaigns stats for a single date.
      properties:
        date:
          type: string
          description: The date.
          format: date
        stats:
          $ref: '#/components/schemas/ai-stats-RecoStatsSchema'
    ai-stats-RecoStatsByDateData:
      type: object
      description: Recommendation campaigns statistics payload.
      properties:
        summary:
          $ref: '#/components/schemas/ai-stats-RecoStatsSchema'
        byDate:
          type: array
          description: Results for individual days.
          items:
            $ref: '#/components/schemas/ai-stats-RecoDateStatsSchema'
    ai-stats-WrappedRecoStatsByDate:
      type: object
      description: |
        Response envelope for `GetCampaignsGlobalStats` and `GetCampaignStats`.
        The `data` field carries aggregated campaign statistics: an overall
        summary plus a per-day breakdown.
      required:
      - data
      properties:
        data:
          $ref: '#/components/schemas/ai-stats-RecoStatsByDateData'
    ai-stats-RecoCampaignStatsSchema:
      type: object
      description: Stats for a single recommendation campaign.
      properties:
        campaignId:
          type: string
          description: Id of the campaign.
        stats:
          $ref: '#/components/schemas/ai-stats-RecoStatsSchema'
    ai-stats-RecoStatsByCampaignData:
      type: object
      description: Recommendation campaigns stats payload.
      properties:
        summary:
          $ref: '#/components/schemas/ai-stats-RecoStatsSchema'
        byCampaign:
          type: array
          items:
            $ref: '#/components/schemas/ai-stats-RecoCampaignStatsSchema'
    ai-stats-WrappedRecoStatsByCampaign:
      type: object
      description: |
        Response envelope for `PostCampaignsStats`. The `data` field carries
        aggregated statistics: an overall summary plus a per-campaign
        breakdown for the requested campaign IDs.
      required:
      - data
      properties:
        data:
          $ref: '#/components/schemas/ai-stats-RecoStatsByCampaignData'
    ai-stats-RecoTopProductsEntryStatsSchema:
      type: object
      description: Statistics for a single item.
      properties:
        productId:
          type: string
          description: Id of the item.
        stats:
          $ref: '#/components/schemas/ai-stats-RecoStatsSchema'
    ai-stats-RecoTopProductsStatsData:
      type: array
      description: Statistics of best-performing products in the campaign, ordered by the selected metric. Each item is one product's stats.
      items:
        $ref: '#/components/schemas/ai-stats-RecoTopProductsEntryStatsSchema'
    ai-stats-WrappedRecoTopProductsStats:
      type: object
      description: |
        Response envelope for `GetRecoTopProductsStats`. The `data` field
        carries an array of per-product statistics, one entry per product,
        ordered by the metric selected in the request.
      required:
      - data
      properties:
        data:
          $ref: '#/components/schemas/ai-stats-RecoTopProductsStatsData'
    ai-stats-WrappedQueriesSummary:
      type: object
      description: |
        Response envelope for `GetQueriesSummary`. The `data` field carries
        aggregate query statistics for one search index over the requested
        time window.
      required:
      - data
      properties:
        data:
          $ref: '#/components/schemas/ai-stats-QueriesSummaryData'
    ai-stats-WrappedQueriesTop:
      type: object
      description: |
        Response envelope for `GetQueriesTop`. The `data` field carries
        the ranked list of top queries (up to 1000) for one search index.
      required:
      - data
      properties:
        data:
          $ref: '#/components/schemas/ai-stats-QueriesTopData'
    ai-stats-WrappedFiltersSummary:
      type: object
      description: |
        Response envelope for `GetFiltersSummary`. The `data` field carries
        an array of filter usage statistics — one entry per filterable
        attribute on the index.
      required:
      - data
      properties:
        data:
          $ref: '#/components/schemas/ai-stats-FiltersSummaryData'
    ai-stats-WrappedRulesSummary:
      type: object
      description: |
        Response envelope for `GetRulesSummary`. The `data` field carries
        an array of query rule application statistics — one entry per rule.
      required:
      - data
      properties:
        data:
          $ref: '#/components/schemas/ai-stats-RulesSummaryData'
    ai-stats-WrappedQueriesSummaryMultipleIndices:
      type: object
      description: |
        Response envelope for `GetQueriesSummaryMultipleIndices`. The `data`
        field carries an array of per-index query stats summaries, one entry
        per requested search index.
      required:
      - data
      properties:
        data:
          $ref: '#/components/schemas/ai-stats-QueriesSummaryMultipleIndicesData'
    analytics-AnalyticsBatchDeleteRequest:
      type: object
      properties:
        funnelIds:
          type: array
          minItems: 0
          description: A list of funnels to delete
          items:
            type: string
            format: uuid
        segmentationIds:
          type: array
          minItems: 0
          description: A list of segmentations to delete
          items:
            type: string
            format: uuid
        trendIds:
          type: array
          minItems: 0
          description: A list of trends to delete
          items:
            type: string
            format: uuid
        metricIds:
          type: array
          minItems: 0
          description: A list of metrics to delete
          items:
            type: string
            format: uuid
        histogramIds:
          type: array
          minItems: 0
          description: A list of histograms to delete
          items:
            type: string
            format: uuid
        reportIds:
          type: array
          minItems: 0
          description: A list of reports to delete
          items:
            type: string
            format: uuid
        aggregateIds:
          type: array
          minItems: 0
          description: A list of aggregates to delete
          items:
            type: string
            format: uuid
        expressionIds:
          type: array
          minItems: 0
          description: A list of expressions to delete
          items:
            type: string
            format: uuid
        sankeyIds:
          type: array
          minItems: 0
          description: A list of sankey analyses to delete
          items:
            type: string
            format: uuid
      required:
      - aggregateIds
      - expressionIds
      - funnelIds
      - histogramIds
      - metricIds
      - reportIds
      - sankeyIds
      - segmentationIds
      - trendIds
    analytics-Variable:
      type: object
      properties:
        name:
          type: string
          description: The name of the variable (dynamic key) which will receive this value for the current calculation.
        value:
          description: |
            The value of the variable. Can be one of: string, integer, boolean, string[], integer[], or a DateFilter object (with type ABSOLUTE/RELATIVE).
          example: example-string-value
      required:
      - name
      - value
    analytics-DateFilter:
      description: |
        Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty.

        An absolute date filter lets you define static dates and times that always apply to the analysis.

        A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis.
      discriminator:
        propertyName: type
        mapping:
          ABSOLUTE: '#/components/schemas/analytics-AbsoluteDateFilter'
          RELATIVE: '#/components/schemas/analytics-RelativeDateFilter'
      oneOf:
      - $ref: '#/components/schemas/analytics-AbsoluteDateFilter'
      - $ref: '#/components/schemas/analytics-RelativeDateFilter'
    analytics-AbsoluteDateFilter:
      type: object
      title: AbsoluteDateFilter
      properties:
        type:
          title: AbsoluteDateFilterType
          x-class-name: AbsoluteDateFilterType
          x-interface-name-ts: AbsoluteDateFilterType
          type: string
          enum:
          - ABSOLUTE
          description: Absolute filters have the same start and end regardless of when the analysis is calculated.
        from:
          type: string
          format: date-time
          description: The lower boundary of the date filter.
        to:
          type: string
          format: date-time
          description: The upper boundary of the date filter. Must be later than `from`.
        filter:
          $ref: '#/components/schemas/analytics-CustomDateFilter'
      required:
      - type
    analytics-RelativeDateFilter:
      type: object
      title: RelativeDateFilter
      properties:
        type:
          title: RelativeDateFilterType
          x-class-name: RelativeDateFilterType
          x-interface-name-ts: RelativeDateFilterType
          type: string
          enum:
          - RELATIVE
          description: "Relative filters allow you to create a filter that depends on when the analysis is calculated. \n\n- `duration` is the length of time that the filter covers.\n- `offset` is the time that the filter goes back to set the beginning of the duration.\n"
        duration:
          $ref: '#/components/schemas/analytics-Period'
        offset:
          $ref: '#/components/schemas/analytics-Period'
        filter:
          $ref: '#/components/schemas/analytics-CustomDateFilter'
      required:
      - duration
      - offset
      - type
    analytics-CustomDateFilter:
      description: This object allows you to define a pattern for a more detailed time filter. These patterns are applied within the constraints of the `dateFilter` object that contains them, regardless of its type relative or absolute).
      oneOf:
      - $ref: '#/components/schemas/analytics-CustomDailyDateFilter'
      - $ref: '#/components/schemas/analytics-CustomWeeklyDateFilter'
      - $ref: '#/components/schemas/analytics-CustomMonthlyDateFilter'
      discriminator:
        propertyName: type
        mapping:
          DAILY: '#/components/schemas/analytics-CustomDailyDateFilter'
          WEEKLY: '#/components/schemas/analytics-CustomWeeklyDateFilter'
          MONTHLY: '#/components/schemas/analytics-CustomMonthlyDateFilter'
    analytics-CustomDailyDateFilter:
      type: object
      title: Daily
      x-class-name: CustomDailyFilter
      x-interface-name-ts: CustomDailyFilter
      properties:
        type:
          type: string
          x-class-name: CustomDailyFilterType
          x-interface-name-ts: CustomDailyFilterType
          enum:
          - DAILY
          description: Daily filters limit the data scope to a range of hours every day.
        nestingType:
          x-class-name: CustomDailyFilterNestingType
          type: string
          enum:
          - IN_PLACE
        from:
          $ref: '#/components/schemas/analytics-DatePickerDayFrom'
        to:
          $ref: '#/components/schemas/analytics-DatePickerDayTo'
        inverted:
          $ref: '#/components/schemas/analytics-DatePickerInverted'
      required:
      - nestingType
      - type
      - from
      - to
    analytics-DatePickerDayFrom:
      type: string
      description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
    analytics-DatePickerDayTo:
      type: string
      description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
    analytics-DatePickerInverted:
      type: boolean
      default: false
      description: 'Inverts the pattern''s timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59.'
    analytics-CustomWeeklyDateFilter:
      type: object
      title: Weekly
      x-class-name: CustomWeeklyFilter
      x-interface-name-ts: CustomWeeklyFilter
      properties:
        type:
          type: string
          x-class-name: CustomWeeklyFilterType
          x-interface-name-ts: CustomWeeklyFilterType
          enum:
          - WEEKLY
          description: Weekly filters let you define separate rules for each day of the week.
        nestingType:
          x-class-name: CustomWeeklyFilterNestingType
          type: string
          enum:
          - IN_PLACE
        days:
          $ref: '#/components/schemas/analytics-WeeklyDays'
      required:
      - days
      - nestingType
      - type
    analytics-CustomMonthlyDateFilter:
      type: object
      title: Monthly
      x-class-name: CustomMonthlyFilterType
      x-interface-name-ts: CustomMonthlyFilterType
      properties:
        type:
          type: string
          x-class-name: CustomMonthlyFilterType
          x-interface-name-ts: CustomMonthlyFilterType
          enum:
          - MONTHLY
          description: Monthly filters allow you to build rules for days of the month and/or weeks, including rules for different days of the week.
        nestingType:
          x-class-name: CustomMonthlyFilterNestingType
          type: string
          enum:
          - IN_PLACE
        rules:
          $ref: '#/components/schemas/analytics-DateRule'
      required:
      - nestingType
      - rules
      - type
    analytics-DateRule:
      description: A set of rules. Within a monthly filter, you can include a mixture of rules for days of the month and days of the week.
      oneOf:
      - $ref: '#/components/schemas/analytics-WeekDateRule'
      - $ref: '#/components/schemas/analytics-MonthDateRule'
      discriminator:
        propertyName: type
        mapping:
          WEEK: '#/components/schemas/analytics-WeekDateRule'
          MONTH: '#/components/schemas/analytics-MonthDateRule'
    analytics-WeekDateRule:
      type: object
      title: Days of the week
      x-class-name: WeekDateRule
      x-interface-name-ts: WeekDateRule
      properties:
        type:
          type: string
          x-class-name: WeekDateRuleType
          x-interface-name-ts: WeekDateRuleType
          enum:
          - WEEK
          description: Weekly filters limit the scope to days in a week
        weeks:
          type: array
          description: Weeks of the month included in the pattern
          items:
            $ref: '#/components/schemas/analytics-WeekOfMonth'
        inverted:
          type: boolean
          default: false
          description: |
            When set to `true`, weeks are counted from the end of the month.

            For example, if `inverted` is true and `week` is set to 1, the rule applies to the last week of each month. This lets you take into account the varying length of months.

            **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array of each week..
      required:
      - type
      - weeks
    analytics-MonthDateRule:
      type: object
      title: Days of the month
      x-class-name: MonthDateRule
      x-interface-name-ts: MonthDateRule
      properties:
        type:
          description: Rules for days of the month
          type: string
          x-class-name: MonthDateRuleType
          x-interface-name-ts: MonthDateRuleType
          enum:
          - MONTH
        days:
          type: array
          description: Days of the month included in the pattern.
          items:
            $ref: '#/components/schemas/analytics-DayOf'
        inverted:
          type: boolean
          default: false
          description: "When set to `true`, days are counted from the end of the month.\n\nFor example, if `inverted` is true and `day` is set to 1, the rule applies to the last day of each month. This lets you take into account the varying length of months.  \n\n**NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array.\n"
      required:
      - days
      - type
    analytics-WeekOfMonth:
      type: object
      properties:
        week:
          type: integer
          description: Number of the week. The direction of counting depends on the `inverted` boolean property of the ancestor object.
        days:
          type: array
          description: Days included in the pattern
          items:
            $ref: '#/components/schemas/analytics-DayOf'
      required:
      - days
      - type
    analytics-WeeklyDays:
      type: array
      description: An array of rules for different days of the week.
      items:
        $ref: '#/components/schemas/analytics-DayOf'
    analytics-DayOf:
      type: object
      properties:
        day:
          type: integer
          description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
        from:
          $ref: '#/components/schemas/analytics-DatePickerDayFrom'
        to:
          $ref: '#/components/schemas/analytics-DatePickerDayTo'
        mode:
          $ref: '#/components/schemas/analytics-DayOfMode'
        inverted:
          $ref: '#/components/schemas/analytics-DatePickerInverted'
      required:
      - day
      - from
      - inverted
      - to
    analytics-DayOfMode:
      type: string
      enum:
      - Range
      - Hour
    analytics-Period:
      type: object
      description: The definition of a length of time.
      properties:
        type:
          $ref: '#/components/schemas/analytics-TimePeriod'
        value:
          $ref: '#/components/schemas/analytics-TimeValue'
      required:
      - type
      - value
    analytics-TimePeriod:
      type: string
      x-class-name: TimePeriod
      x-interface-name-ts: TimePeriod
      description: The unit of time
      enum:
      - YEARS
      - MONTHS
      - WEEKS
      - DAYS
      - HOURS
      - MINUTES
      - SECONDS
      - UNKNOWN
    analytics-TimeValue:
      type: integer
      description: The number of time units
      format: int64
    analytics-DirectoryId:
      type: string
      format: uuid
      description: Unique ID of the directory which contains this analysis. A 'default' directory is automatically created in every workspace.
    analytics-Predecessor:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        type:
          type: string
          x-class-name: AnalyticPredecessorType
          enum:
          - SEGMENTATION
          - METRIC
          - FUNNEL
          - TREND
          - EXPRESSION
          - AGGREGATE
          - SANKEY
        name:
          type: string
        children:
          type: array
          items:
            $ref: '#/components/schemas/analytics-Predecessor'
      required:
      - children
      - id
      - type
    analytics-Successor:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        type:
          type: string
          x-class-name: SuccessorAnalyticType
          enum:
          - SEGMENTATION
          - METRIC
          - FUNNEL
          - TREND
          - EXPRESSION
          - AGGREGATE
          - SANKEY
        name:
          type: string
        children:
          type: array
          items:
            $ref: '#/components/schemas/analytics-Successor'
      required:
      - children
      - id
      - type
    analytics-AnalyticId:
      type: string
      format: uuid
      description: |
        UUID of the analysis
      example: 5370bf3c-2dfa-4e89-98ff-07100cffee6c
    analytics-ClientId:
      type: number
      format: int64
      description: ID of the profile
    analytics-AnalysisOldId:
      type: integer
      format: int64
      minimum: 0
      description: Unique numeric ID of the analysis
    analytics-AnalyticName:
      type: string
      description: Name of the analysis
      example: Nice people who read the documentation
    analytics-MetricListItem:
      allOf:
      - type: object
        properties:
          action:
            $ref: '#/components/schemas/analytics-Action'
          actions:
            description: Event definitions
            type: array
            items:
              $ref: '#/components/schemas/analytics-Action'
          eventName:
            $ref: '#/components/schemas/analytics-ActionName'
          eventNames:
            description: Event definition names
            type: array
            items:
              $ref: '#/components/schemas/analytics-ActionName'
          actionId:
            $ref: '#/components/schemas/analytics-ActionId'
          actionIds:
            description: Event definition IDs
            type: array
            items:
              $ref: '#/components/schemas/analytics-ActionId'
          isNumber:
            $ref: '#/components/schemas/analytics-IsNumber'
          isMetricHistogram:
            $ref: '#/components/schemas/analytics-IsMetricHistogram'
          isReportMetric:
            $ref: '#/components/schemas/analytics-IsReportMetric'
      - $ref: '#/components/schemas/analytics-ListAnalyticsItemCommon'
    analytics-Action:
      type: object
      description: The analyzed event
      nullable: true
      required:
      - name
      properties:
        id:
          $ref: '#/components/schemas/analytics-ActionId'
        name:
          $ref: '#/components/schemas/analytics-ActionName'
    analytics-ActionId:
      type: integer
      format: int64
      deprecated: true
      nullable: true
      description: Deprecated parameter. DO NOT use. Has no effect in create/update requests.
    analytics-ActionName:
      type: string
      description: Action name of the event.
      example: page.visit
    analytics-IsNumber:
      type: boolean
      description: '`true` when the metric is purely numerical (does not calculate any events, parameters, etc.)'
    analytics-IsMetricHistogram:
      type: boolean
      description: '`true` when the metric can be used in a histogram'
    analytics-IsReportMetric:
      type: boolean
      description: '`true` when the metric can be used as a report metric (the expression references either client params or event params, but not both)'
    analytics-InlineAnalytic:
      description: An inline analytic definition carried alongside a request so it can be referenced by id without being persisted.
      oneOf:
      - $ref: '#/components/schemas/analytics-InlineExpression'
      - $ref: '#/components/schemas/analytics-InlineSegmentation'
      - $ref: '#/components/schemas/analytics-InlineAggregate'
      - $ref: '#/components/schemas/analytics-InlineRunningAggregate'
      - $ref: '#/components/schemas/analytics-InlineMetric'
      discriminator:
        propertyName: analyticType
        mapping:
          EXPRESSION: '#/components/schemas/analytics-InlineExpression'
          SEGMENTATION: '#/components/schemas/analytics-InlineSegmentation'
          AGGREGATE: '#/components/schemas/analytics-InlineAggregate'
          RUNNING_AGGREGATE: '#/components/schemas/analytics-InlineRunningAggregate'
          METRIC: '#/components/schemas/analytics-InlineMetric'
    analytics-InlineAnalytics:
      type: array
      description: Analyses added to the request. They can be referenced by their ID in filters and expressions same as other analyses, but are not saved in persistent storage.
      items:
        $ref: '#/components/schemas/analytics-InlineAnalytic'
    analytics-InlineExpression:
      type: object
      x-class-name: InlineExpression
      x-interface-name-ts: InlineExpression
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        analyticType:
          type: string
          enum:
          - EXPRESSION
        analysis:
          discriminator:
            propertyName: type
            mapping:
              EVENT: '#/components/schemas/analytics-EventExpressionEntity'
              CLIENT: '#/components/schemas/analytics-ClientExpressionEntity'
          oneOf:
          - $ref: '#/components/schemas/analytics-EventExpressionEntity'
          - $ref: '#/components/schemas/analytics-ClientExpressionEntity'
      required:
      - id
      - analyticType
      - analysis
    analytics-InlineSegmentation:
      type: object
      x-class-name: InlineSegmentation
      x-interface-name-ts: InlineSegmentation
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        analyticType:
          type: string
          enum:
          - SEGMENTATION
        analysis:
          $ref: '#/components/schemas/analytics-SegmentationAnalysis'
      required:
      - id
      - analyticType
      - analysis
    analytics-InlineAggregate:
      type: object
      x-class-name: InlineAggregate
      x-interface-name-ts: InlineAggregate
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        analyticType:
          type: string
          enum:
          - AGGREGATE
        analysis:
          $ref: '#/components/schemas/analytics-AggregateAnalysis'
      required:
      - id
      - analyticType
      - analysis
    analytics-InlineRunningAggregate:
      type: object
      x-class-name: InlineRunningAggregate
      x-interface-name-ts: InlineRunningAggregate
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        analyticType:
          type: string
          enum:
          - RUNNING_AGGREGATE
        analysis:
          $ref: '#/components/schemas/analytics-AggregateAnalysis'
      required:
      - id
      - analyticType
      - analysis
    analytics-InlineMetric:
      type: object
      x-class-name: InlineMetric
      x-interface-name-ts: InlineMetric
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        analyticType:
          type: string
          enum:
          - METRIC
        analysis:
          $ref: '#/components/schemas/analytics-MetricAnalysis'
      required:
      - id
      - analyticType
      - analysis
    analytics-ReportListItem:
      allOf:
      - type: object
        properties:
          isMultiMetric:
            type: boolean
            description: True when the report has more than one metric.
        required:
        - isMultiMetric
      - $ref: '#/components/schemas/analytics-ListAnalyticsItemCommon'
    analytics-ListAnalyticsItemCommon:
      type: object
      description: Common elements retrieved in lists of analyses
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        name:
          $ref: '#/components/schemas/analytics-Name'
        author:
          $ref: '#/components/schemas/analytics-Author'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        variables:
          $ref: '#/components/schemas/analytics-Variables'
      required:
      - author
      - createdAt
      - directoryId
      - id
      - isDynamicAnalytic
      - name
      - updatedAt
      - usedAt
      - variables
    analytics-Id:
      type: string
      format: uuid
      description: Unique ID of the resource
    analytics-Name:
      type: string
      description: Name of the resource
    analytics-Author:
      type: object
      description: Data of the author of the analysis
      properties:
        id:
          $ref: '#/components/schemas/analytics-AuthorId'
        name:
          type: string
          description: Name of the author
        icon:
          type: string
          description: URL of the author's avatar icon
      required:
      - id
      - name
    analytics-AuthorId:
      type: integer
      format: int64
      description: Unique ID of the original creator. `1` means the resource was created by a request with workspace authorization.
    analytics-UpdatedAt:
      type: string
      format: date-time
      description: Last update time
    analytics-CreatedAt:
      type: string
      format: date-time
      description: Creation time
    analytics-Variables:
      type: array
      description: Dynamic keys used in this analysis
      items:
        $ref: '#/components/schemas/analytics-Variable'
    analytics-IsDynamicAnalytic:
      type: boolean
      description: '`true` if the analysis contains any [dynamic values](https://hub.synerise.com/docs/analytics/i_events-parameter-value/#dynamic-key).'
    analytics-UsedAt:
      type: string
      format: date-time
      description: The date and time when the item was last used
      nullable: true
    analytics-BusinessProfileId:
      type: integer
      format: int32
      description: ID of the workspace (formerly business profile)
      example: 48
    analytics-PathNamespace:
      type: string
      enum:
      - profiles
    analytics-Meta:
      type: object
      description: Pagination metadata
      properties:
        links:
          type: array
          description: Links to the neighboring pages and the first page
          items:
            $ref: '#/components/schemas/analytics-Link'
        limit:
          type: integer
          format: int32
          description: Limit of items per page
        count:
          type: integer
          description: Currently unused
          nullable: true
      required:
      - links
      - limit
    analytics-Link:
      type: object
      properties:
        url:
          type: string
          description: URL of the page, used for navigation
        rel:
          type: string
          x-class-name: LinkRel
          description: The type of relation to the current page. `first` is always the first page.
          enum:
          - first
          - prev
          - next
      required:
      - rel
      - url
    analytics-MetricRequest:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-MetricAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
    analytics-MetricAnalysis:
      type: object
      description: Structure of the analytical query
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        title:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        format:
          $ref: '#/components/schemas/analytics-MetricFormat'
        comparison:
          $ref: '#/components/schemas/analytics-MetricComparison'
        metricType:
          $ref: '#/components/schemas/analytics-MetricType'
        expression:
          $ref: '#/components/schemas/analytics-MetricExpressionContent'
        isVisibleForClientProfile:
          $ref: '#/components/schemas/analytics-IsVisibleForClientProfile'
        allowNull:
          $ref: '#/components/schemas/analytics-AllowNull'
        grouping:
          description: Defines how the results are returned
          type: array
          items:
            $ref: '#/components/schemas/analytics-ReportMetricGrouping'
      required:
      - id
      - title
      - description
      - format
      - comparison
      - metricType
      - expression
      - isVisibleForClientProfile
    analytics-Description:
      type: string
      description: Description of the resource
    analytics-MetricFormat:
      type: object
      description: |2

        This object defines the display format of the data in the Synerise Web UI. The JSON format of the results is not affected.

        Values other than in the enums or min-max ranges are accepted by the backend, but may not be displayed properly by the Synerise Web UI.
      properties:
        compactNumbers:
          type: boolean
          default: false
          description: When `true`, numbers are shortened. For example, "20500" becomes "20.5k".
        currency:
          type: string
          x-class-name: Currency
          nullable: true
          title: CurrencyName
          enum:
          - EUR
          - USD
          - PLN
          - JPY
          description: The currency to use when `dataFormat` is `cash`
        dataFormat:
          type: string
          title: DateFormatName
          x-class-name: DateFormatName
          nullable: true
          enum:
          - cash
          - numeric
          - percent
          description: Format of the data
        fixedLength:
          description: The number of digits after the decimal point
          type: integer
          format: int32
          default: 0
          minimum: 0
          maximum: 4
        useSeparator:
          type: boolean
          default: false
          description: Enables the use of a comma as the thousands separator. When `false`, no separator is used.
    analytics-MetricComparison:
      type: object
      description: Use this filter to compare the data from `expression` with another period. If this is used, then the result of the analysis is the difference between the two periods.
      properties:
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
    analytics-MetricType:
      type: string
      x-class-name: MetricType
      enum:
      - SIMPLE
      - FORMULA
      description: |
        Defines the type of the metric. This affects the contents of the
        `expression` object.

        When the type is `SIMPLE`, the `expression` can only include a single argument.
    analytics-MetricExpression:
      discriminator:
        propertyName: type
        mapping:
          OPERATOR: '#/components/schemas/analytics-OperatorMetricExpression'
          NUMBER: '#/components/schemas/analytics-NumberMetricExpression'
          EVENT: '#/components/schemas/analytics-EventMetricExpression'
          CLIENT: '#/components/schemas/analytics-ClientMetricExpression'
          METRIC: '#/components/schemas/analytics-NestedMetricExpression'
      oneOf:
      - $ref: '#/components/schemas/analytics-ClientMetricExpression'
      - $ref: '#/components/schemas/analytics-EventMetricExpression'
      - $ref: '#/components/schemas/analytics-NestedMetricExpression'
      - $ref: '#/components/schemas/analytics-NumberMetricExpression'
      - $ref: '#/components/schemas/analytics-OperatorMetricExpression'
    analytics-IsVisibleForClientProfile:
      type: boolean
      description: When set to `true`, information about this analysis is shown on a profile's card.
    analytics-ReportMetricGrouping:
      description: |
        The type and number of results to show. "TOP" shows the highest results. "LAST" shows the most recent results.
      discriminator:
        propertyName: type
        mapping:
          TOP: '#/components/schemas/analytics-TopReportMetricGrouping'
          LAST: '#/components/schemas/analytics-LastReportMetricGrouping'
      oneOf:
      - $ref: '#/components/schemas/analytics-TopReportMetricGrouping'
      - $ref: '#/components/schemas/analytics-LastReportMetricGrouping'
    analytics-TopReportMetricGrouping:
      type: object
      title: Top
      required:
      - type
      - top
      properties:
        type:
          title: TopReportMetricGroupingType
          x-class-name: TopReportMetricGroupingType
          description: Returns the top results
          type: string
          enum:
          - TOP
        top:
          type: integer
          description: The number of results to show in the report
    analytics-LastReportMetricGrouping:
      type: object
      title: Last
      description: This type shows the most recent occurrences
      required:
      - type
      - last
      properties:
        type:
          title: LastReportMetricGroupingType
          x-class-name: LastReportMetricGroupingType
          type: string
          description: This type shows the most recent occurrences
          enum:
          - LAST
        last:
          type: integer
          description: The number of results to show in the report
    analytics-MetricExpressionContent:
      example:
        type: VALUE
        value:
          type: NUMBER
          value: 100
      discriminator:
        propertyName: type
        mapping:
          FUNCTION: '#/components/schemas/analytics-MetricExpressionContentFunction'
          VALUE: '#/components/schemas/analytics-MetricExpressionContentValue'
      oneOf:
      - $ref: '#/components/schemas/analytics-MetricExpressionContentFunction'
      - $ref: '#/components/schemas/analytics-MetricExpressionContentValue'
    analytics-MetricExpressionContentValue:
      type: object
      description: An expression to calculate
      properties:
        type:
          $ref: '#/components/schemas/analytics-MetricExpressionContentValueType'
        title:
          $ref: '#/components/schemas/analytics-Name'
        value:
          $ref: '#/components/schemas/analytics-MetricExpression'
    analytics-MetricExpressionContentValueType:
      type: string
      enum:
      - VALUE
    analytics-MetricExpressionContentFunction:
      type: object
      description: A function to apply
      x-interface-name-ts: MetricExpressionContentFunction
      properties:
        type:
          $ref: '#/components/schemas/analytics-MetricExpressionContentFunctionType'
        function:
          x-class-name: MetricExpressionContentFunctionFunction
          description: |
            The function to apply. The number of required arguments depends on the function arity:
            - Nullary (0 args): NOW
            - Unary (1 arg via `arg`): LN, ABS, CEIL, EXP, FLOOR, ROUND, TO_NUMBER, TO_STRING, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, HOUR, MONTH, WEEK, YEAR, TO_MONEY, TO_TIMESTAMP, TO_DATE, BRACKET
            - Binary (2 args via `arg1`, `arg2`): DIVIDE, IF_NULL, MAX, MIN, MOD, MULTIPLY, SUB, SUM, GREATER, GREATER_OR_EQUALS, LESS, LESS_OR_EQUAL, NOT_EQUAL, EQUALS, ADD_YEARS, CONCAT, REGEXP
            - Ternary (3 args via `arg1`, `arg2`, `arg3`): IF (arg1 - condition; arg2 - return if true; arg3 - return if false)
          type: string
          enum:
          - NOW
          - LN
          - ABS
          - CEIL
          - EXP
          - FLOOR
          - ROUND
          - BRACKET
          - TO_NUMBER
          - TO_STRING
          - DAY_OF_MONTH
          - DAY_OF_WEEK
          - DAY_OF_YEAR
          - HOUR
          - MONTH
          - WEEK
          - YEAR
          - TO_MONEY
          - TO_TIMESTAMP
          - TO_DATE
          - DIVIDE
          - IFNULL
          - MAX
          - MIN
          - MOD
          - MULTIPLY
          - SUB
          - SUM
          - GREATER
          - GREATER_OR_EQUALS
          - LESS
          - LESS_OR_EQUALS
          - NOT_EQUALS
          - EQUALS
          - ADD_YEARS
          - CONCAT
          - REGEXP
          - IF
        arg:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: MetricExpressionContent
        arg1:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: MetricExpressionContent
        arg2:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: MetricExpressionContent
        arg3:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: MetricExpressionContent
      required:
      - type
      - function
    analytics-MetricExpressionContentFunctionType:
      type: string
      enum:
      - FUNCTION
    analytics-MetricExpressionClientType:
      type: string
      enum:
      - CLIENT
    analytics-MetricExpressionEventType:
      type: string
      enum:
      - EVENT
    analytics-MetricExpressionOperatorType:
      type: string
      enum:
      - OPERATOR
    analytics-MetricExpressionMetricType:
      type: string
      enum:
      - METRIC
    analytics-MetricExpressionNumberType:
      type: string
      enum:
      - NUMBER
    analytics-ClientMetricExpression:
      type: object
      description: Definition of a metric expression
      x-class-name: ClientMetricExpression
      x-interface-name-ts: ClientMetricExpression
      properties:
        type:
          $ref: '#/components/schemas/analytics-MetricExpressionClientType'
        title:
          $ref: '#/components/schemas/analytics-Name'
        aggregation:
          $ref: '#/components/schemas/analytics-ClientMetricAggregation'
        filter:
          $ref: '#/components/schemas/analytics-ExpressionFilter'
        groupBy:
          $ref: '#/components/schemas/analytics-ClientValue'
      required:
      - type
      - title
      - aggregation
      - filter
    analytics-ClientMetricAggregation:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/analytics-AggregateExpressionType'
        attribute:
          $ref: '#/components/schemas/analytics-ClientAttribute'
        level:
          $ref: '#/components/schemas/analytics-QuantileLevel'
      required:
      - type
      - attribute
    analytics-AggregateExpressionType:
      type: string
      description: |
        The type of calculation.

        - COUNT allows you to count the total number of the entities that meet the filters.

        - COUNT_DISTINCT allows you to count the total number of distinct (unique) attribute values in entities which match the filters.

        - SUM, MIN, MAX, MEDIAN, QUANTILE (requires `level`) and AVG allow you to perform calculations on numerical-value parameters within the entities that meet the filters.

        - EXISTS checks the existence of at least a single entity that meets the filters and returns 1 when "true" or 0 when "false".

        - LAST and LAST_MULTI (requires `size`) retrieve the newest matching data.

        - FIRST and FIRST_MULTI (requires `size`) retrieve the oldest matching data.

        - LAST_TIME and FIRST_TIME (running aggregates only; require `timeWindow`) retrieve the single newest / oldest matching value from events within the time window preceding the currently evaluated event.

        - LAST_MULTI_TIME and FIRST_MULTI_TIME (running aggregates only; require `size` and `timeWindow`) retrieve the newest / oldest matching data from events within the time window preceding the currently evaluated event.
      enum:
      - AVG
      - SUM
      - MIN
      - MAX
      - COUNT
      - MEDIAN
      - QUANTILE
      - COUNT_DISTINCT
      - LAST
      - FIRST
      - EXISTS
      - FIRST_MULTI
      - LAST_MULTI
      - FIRST_TIME
      - LAST_TIME
      - FIRST_MULTI_TIME
      - LAST_MULTI_TIME
      - TOP
      - BOTTOM
      - TOP_MULTI
      - BOTTOM_MULTI
    analytics-QuantileLevel:
      type: number
      format: double
      nullable: true
      description: Only applies when `type` is `QUANTILE`. This is the percentile whose value will be the result of the analysis. For example, `0.35` is the 35th percentile.
    analytics-AggregateSize:
      type: integer
      format: int32
      minimum: 0
      description: Only applies and is required when `type` is *_MULTI. Defines how many results to return.
    analytics-AggregateUnique:
      type: boolean
      description: Only applies when `type`` is *_MULTI. When set to `true``, only unique occurrences of an event parameter are included in the results.
    analytics-ExcludeCurrent:
      type: boolean
      description: When `false`, data from the event that is the subject of the analysis is analyzed in addition to data of the events that occurred before it.
    analytics-ClientAttributeParamType:
      type: string
      enum:
      - PARAM
    analytics-ClientAttributeTagType:
      type: string
      enum:
      - TAG
    analytics-ClientAttributeAggregateType:
      type: string
      enum:
      - AGGREGATE
    analytics-ClientAttributeSegmentationType:
      type: string
      enum:
      - SEGMENTATION
    analytics-ClientAttributeExpressionType:
      type: string
      enum:
      - EXPRESSION
    analytics-ClientAttributeSpecialType:
      type: string
      enum:
      - SPECIAL
    analytics-ClientAttributeEmptyType:
      type: string
      enum:
      - EMPTY
    analytics-ClientAttribute:
      description: A profile attribute to analyze
      discriminator:
        propertyName: type
        mapping:
          PARAM: '#/components/schemas/analytics-ClientParamAttribute'
          TAG: '#/components/schemas/analytics-ClientTagAttribute'
          AGGREGATE: '#/components/schemas/analytics-ClientAggregateAttribute'
          SEGMENTATION: '#/components/schemas/analytics-ClientSegmentationAttribute'
          EXPRESSION: '#/components/schemas/analytics-ClientExpressionAttribute'
          SPECIAL: '#/components/schemas/analytics-ClientSpecialAttribute'
          EMPTY: '#/components/schemas/analytics-ClientEmptyAttribute'
      oneOf:
      - $ref: '#/components/schemas/analytics-ClientParamAttribute'
      - $ref: '#/components/schemas/analytics-ClientTagAttribute'
      - $ref: '#/components/schemas/analytics-ClientAggregateAttribute'
      - $ref: '#/components/schemas/analytics-ClientSegmentationAttribute'
      - $ref: '#/components/schemas/analytics-ClientExpressionAttribute'
      - $ref: '#/components/schemas/analytics-ClientSpecialAttribute'
      - $ref: '#/components/schemas/analytics-ClientEmptyAttribute'
    analytics-ClientParamAttribute:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/analytics-ClientAttributeParamType'
        param:
          description: Name of the parameter
          type: string
      required:
      - type
      - param
    analytics-ClientTagAttribute:
      type: object
      description: Reference to a tag
      properties:
        type:
          $ref: '#/components/schemas/analytics-ClientAttributeTagType'
        tag:
          description: Name of the tag
          type: string
      required:
      - type
      - tag
    analytics-ClientAggregateAttribute:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/analytics-ClientAttributeAggregateType'
        uuid:
          $ref: '#/components/schemas/analytics-AnalyticId'
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
      required:
      - type
      - uuid
      - id
    analytics-ClientSegmentationAttribute:
      type: object
      description: Reference to a segmentation
      properties:
        type:
          $ref: '#/components/schemas/analytics-ClientAttributeSegmentationType'
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
      required:
      - type
      - id
    analytics-ClientExpressionAttribute:
      type: object
      description: Pointer to an expression
      properties:
        type:
          $ref: '#/components/schemas/analytics-ClientAttributeExpressionType'
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
      required:
      - type
      - id
    analytics-ClientSpecialAttribute:
      type: object
      description: Reference to a special parameter
      properties:
        type:
          $ref: '#/components/schemas/analytics-ClientAttributeSpecialType'
        special:
          type: string
          description: The name of the special parameter
      required:
      - type
      - special
    analytics-ClientEmptyAttribute:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/analytics-ClientAttributeEmptyType'
      required:
      - type
    analytics-ExpressionFilter:
      type: object
      description: "This filter lets you limit the results to profiles that match it. For no filter, leave the object empty.  \n\nThe `expression` object is only used by the Synerise Web Portal. If you're integrating an API, don't send this object or send it empty. If you send `expression` and `expressions`, `expressions` takes priority.\n"
      properties:
        matching:
          $ref: '#/components/schemas/analytics-matching'
        expressions:
          type: array
          description: Profile filter details. The expressions are applied according to their position in the array. The logical AND/OR operator must be placed between expressions. An empty array means no filters are applied.
          items:
            $ref: '#/components/schemas/analytics-FilterBox'
        expression:
          $ref: '#/components/schemas/analytics-FilterExpressionContent'
        groupBy:
          type: array
          items:
            $ref: '#/components/schemas/analytics-ClientValue'
      required:
      - matching
      - expressions
      - expression
    analytics-MetricView:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        author:
          $ref: '#/components/schemas/analytics-AuthorId'
        modifier:
          $ref: '#/components/schemas/analytics-modifierId'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        analysis:
          $ref: '#/components/schemas/analytics-MetricAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
        isPredefinedAnalytic:
          $ref: '#/components/schemas/analytics-IsPredefinedAnalytic'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        isMetricHistogram:
          $ref: '#/components/schemas/analytics-IsMetricHistogram'
        isDeleted:
          $ref: '#/components/schemas/analytics-IsDeleted'
        namespace:
          $ref: '#/components/schemas/analytics-Namespace'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
      required:
      - id
      - name
      - author
      - modifier
      - updatedAt
      - createdAt
      - usedAt
      - analysis
      - isPredefinedAnalytic
      - isDynamicAnalytic
      - isMetricHistogram
      - isDeleted
      - namespace
      - directoryId
    analytics-ClientValue:
      discriminator:
        propertyName: type
        mapping:
          CONSTANT: '#/components/schemas/analytics-ConstantClientValue'
          CLIENT: '#/components/schemas/analytics-ClientAttributeValue'
          VARIABLE: '#/components/schemas/analytics-VariableClientValue'
      oneOf:
      - $ref: '#/components/schemas/analytics-ConstantClientValue'
      - $ref: '#/components/schemas/analytics-ClientAttributeValue'
      - $ref: '#/components/schemas/analytics-VariableClientValue'
    analytics-ConstantClientValue:
      type: object
      title: Static value
      description: Inserts a static value.
      properties:
        type:
          x-class-name: ConstantClientValueType
          type: string
          description: Inserts a static value.
          enum:
          - CONSTANT
        constant:
          description: |
            The value can't:
              - be longer than 21000 characters if it's a string
              - be larger than 65000 items if it's an array. Strings in the array can't be longer than 21000 characters.
          oneOf:
          - type: string
          - type: number
          - type: boolean
          - type: array
            items:
              type: string
      required:
      - type
      - constant
    analytics-ClientAttributeValue:
      type: object
      title: Profile attribute
      properties:
        type:
          x-class-name: ClientClientValueType
          type: string
          enum:
          - CLIENT
          description: Definition of a profile attribute
        attribute:
          $ref: '#/components/schemas/analytics-ClientAttribute'
      required:
      - type
      - attribute
    analytics-VariableClientValue:
      type: object
      title: Dynamic value
      properties:
        type:
          x-class-name: VariableClientValueType
          type: string
          description: This type is called a Dynamic Key in the Synerise Portal. It can be used to let other analytic components, such as dashboards, insert a value.
          enum:
          - VARIABLE
        name:
          type: string
          description: The name of the dynamic key
        defaultValue:
          description: The default value to use
          oneOf:
          - type: string
          - type: number
          - type: array
            items: {}
      required:
      - type
      - name
      - defaultValue
    analytics-EventMetricExpression:
      type: object
      x-class-name: EventMetricExpression
      description: An event metric
      x-interface-name-ts: EventMetricExpression
      properties:
        type:
          $ref: '#/components/schemas/analytics-MetricExpressionEventType'
        occurrenceType:
          $ref: '#/components/schemas/analytics-OccurrenceType'
        title:
          $ref: '#/components/schemas/analytics-Name'
        aggregation:
          $ref: '#/components/schemas/analytics-EventMetricAggregation'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        action:
          $ref: '#/components/schemas/analytics-Action'
        filter:
          $ref: '#/components/schemas/analytics-ExpressionFilter'
        expressions:
          $ref: '#/components/schemas/analytics-EventExpressions'
        eventName:
          type: string
          description: Name (action) of the analyzed event
          nullable: true
      required:
      - type
      - occurrenceType
      - title
      - aggregation
      - dateFilter
      - action
      - filter
      - expressions
    analytics-EventMetricAggregation:
      type: object
      x-class-name: EventMetricAggregation
      x-interface-name-ts: EventMetricAggregation
      properties:
        type:
          $ref: '#/components/schemas/analytics-AggregateExpressionType'
        attribute:
          $ref: '#/components/schemas/analytics-EventAttribute'
        level:
          type: number
          nullable: true
      required:
      - type
      - attribute
    analytics-OccurrenceType:
      type: string
      x-class-name: OccurrenceType
      x-interface-name-ts: OccurrenceType
      enum:
      - FIRST
      - LAST
      - ALL
    analytics-NestedMetricExpression:
      type: object
      description: Reference to a metric
      x-class-name: NestedMetricExpression
      x-interface-name-ts: NestedMetricExpression
      properties:
        type:
          $ref: '#/components/schemas/analytics-MetricExpressionMetricType'
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        title:
          type: string
          description: Can't be empty, can't contain whitespace only
      required:
      - type
      - id
      - title
    analytics-NumberMetricExpression:
      type: object
      x-class-name: NumberMetricExpression
      x-interface-name-ts: NumberMetricExpression
      properties:
        type:
          $ref: '#/components/schemas/analytics-MetricExpressionNumberType'
        value:
          description: The numeric value
          type: number
      required:
      - type
      - value
    analytics-OperatorMetricExpression:
      type: object
      x-class-name: OperatorMetricExpression
      x-interface-name-ts: OperatorMetricExpression
      properties:
        type:
          $ref: '#/components/schemas/analytics-MetricExpressionOperatorType'
        operator:
          $ref: '#/components/schemas/analytics-MetricOperator'
      required:
      - type
      - operator
    analytics-MetricOperator:
      type: string
      description: A mathematical/logical operator
      enum:
      - ADDITION_SIGN
      - SUBSTRACTION_SIGN
      - DIVISION_SIGN
      - MULTIPLICATION_SIGN
      - REMINDER
      - LEFT_BRACKET
      - RIGHT_BRACKET
    analytics-FilterBox:
      discriminator:
        propertyName: type
        mapping:
          ATTRIBUTE: '#/components/schemas/analytics-AttributeFilterBox'
          EXPRESSION: '#/components/schemas/analytics-ExpressionFilterBox'
          FUNNEL: '#/components/schemas/analytics-FunnelFilterBox'
          OPERATOR: '#/components/schemas/analytics-OperatorFilterBox'
      oneOf:
      - $ref: '#/components/schemas/analytics-AttributeFilterBox'
      - $ref: '#/components/schemas/analytics-ExpressionFilterBox'
      - $ref: '#/components/schemas/analytics-FunnelFilterBox'
      - $ref: '#/components/schemas/analytics-OperatorFilterBox'
    analytics-AttributeFilterBox:
      type: object
      properties:
        type:
          x-class-name: AttributeFilterBoxType
          type: string
          enum:
          - ATTRIBUTE
          description: Tests a profile attribute against a condition
        name:
          $ref: '#/components/schemas/analytics-Name'
        matching:
          $ref: '#/components/schemas/analytics-matching'
        attribute:
          $ref: '#/components/schemas/analytics-Attribute'
    analytics-Attribute:
      type: object
      description: The condition to test a profile attribute
      properties:
        expressions:
          $ref: '#/components/schemas/analytics-ClientExpressions'
      required:
      - expressions
    analytics-ClientExpression:
      type: object
      properties:
        constraint:
          $ref: '#/components/schemas/analytics-ClientConstraint'
        attribute:
          $ref: '#/components/schemas/analytics-ClientAttribute'
    analytics-ClientExpressions:
      type: array
      description: An array of conditions. All conditions must be met.
      items:
        $ref: '#/components/schemas/analytics-ClientExpression'
    analytics-ExpressionFilterBox:
      description: A condition to test
      type: object
      properties:
        type:
          description: A condition to test
          x-class-name: ExpressionFilterBoxType
          type: string
          enum:
          - EXPRESSION
        name:
          type: string
        matching:
          type: boolean
        expressions:
          $ref: '#/components/schemas/analytics-FilterBox'
      required:
      - type
      - expressions
    analytics-FunnelFilterBox:
      type: object
      properties:
        type:
          description: Tests against a funnel
          x-class-name: ExpressionFilterBoxType
          type: string
          enum:
          - FUNNEL
        name:
          $ref: '#/components/schemas/analytics-Name'
        matching:
          $ref: '#/components/schemas/analytics-matching'
        funnel:
          $ref: '#/components/schemas/analytics-Funnel'
      required:
      - type
      - funnel
    analytics-OperatorFilterBox:
      type: object
      properties:
        type:
          description: Logical operator between expressions
          x-class-name: OperatorFilterBoxType
          type: string
          enum:
          - OPERATOR
        name:
          $ref: '#/components/schemas/analytics-Name'
        logic:
          x-class-name: FilterBoxOperatorType
          type: string
          enum:
          - OR
          - AND
          - LEFT_BRACKET
          - RIGHT_BRACKET
      required:
      - type
      - name
      - logic
    analytics-Funnel:
      type: object
      description: Funnel conditions
      properties:
        title:
          type: string
          description: Title of the funnel.
        completedWithin:
          $ref: '#/components/schemas/analytics-CompletedWithin'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        steps:
          type: array
          minItems: 0
          description: An array of steps in the funnel. The order of the steps in the array determines the order of their analysis (that is, the step at index 0 is the first step, the step at index 1 is the second step, and so on).
          items:
            $ref: '#/components/schemas/analytics-FunnelStep'
        exact:
          type: boolean
          default: false
          description: |
            When true, the profile's events must be exactly as in the funnel. For example, if the profile's history has events `A -> B -> C -> D`, and the funnel is `A -> C -> D`, the match is not exact, because there is an event between A and C.
      required:
      - title
      - steps
    analytics-FunnelStep:
      type: object
      properties:
        title:
          type: string
          description: The name of the step
        action:
          $ref: '#/components/schemas/analytics-Action'
        expressions:
          $ref: '#/components/schemas/analytics-EventExpressions'
      required:
      - action
      - title
      - expressions
    analytics-EventExpression:
      type: object
      description: The `attribute` object is an event attribute that must exist in the analyzed event. The `constraint` object is a condition that the attribute must meet.
      properties:
        constraint:
          $ref: '#/components/schemas/analytics-EventConstraint'
        attribute:
          $ref: '#/components/schemas/analytics-EventAttribute'
      required:
      - constrain
      - attribute
    analytics-EventExpressions:
      type: array
      description: An array of conditions that the event must meet
      items:
        $ref: '#/components/schemas/analytics-EventExpression'
    analytics-EventAttribute:
      description: An event attribute to analyze
      discriminator:
        propertyName: type
        mapping:
          PARAM: '#/components/schemas/analytics-ParameterEventAttribute'
          RUNNING_AGGREGATE: '#/components/schemas/analytics-RunningAggregateEventAttribute'
          EXPRESSION: '#/components/schemas/analytics-ExpressionEventAttribute'
          SPECIAL: '#/components/schemas/analytics-SpecialEventAttribute'
          EMPTY: '#/components/schemas/analytics-EmptyEventAttribute'
      oneOf:
      - $ref: '#/components/schemas/analytics-ParameterEventAttribute'
      - $ref: '#/components/schemas/analytics-RunningAggregateEventAttribute'
      - $ref: '#/components/schemas/analytics-ExpressionEventAttribute'
      - $ref: '#/components/schemas/analytics-SpecialEventAttribute'
      - $ref: '#/components/schemas/analytics-EmptyEventAttribute'
    analytics-ParameterEventAttribute:
      type: object
      title: Event parameter
      properties:
        type:
          x-class-name: ParamEventAttributeType
          enum:
          - PARAM
          description: This `type` refers to parameters in an event.
        param:
          type: string
          description: Name of the parameter
      required:
      - type
    analytics-RunningAggregateEventAttribute:
      type: object
      title: Event aggregate
      properties:
        type:
          x-class-name: RunningAggregateEventAttributeType
          type: string
          enum:
          - RUNNING_AGGREGATE
          description: This type refers to event aggregates. You must provide the ID of the aggregate.
        id:
          type: string
          format: uuid
          description: ID of the event aggregate
      required:
      - type
      - id
    analytics-ExpressionEventAttribute:
      type: object
      title: Expression
      properties:
        type:
          x-class-name: ExpressionEventAttributeType
          type: string
          enum:
          - EXPRESSION
          description: This type refers to expressions. You must provide the ID of the expression.
        id:
          type: string
          format: uuid
          description: ID of the expression
      required:
      - type
      - id
    analytics-SpecialEventAttribute:
      type: object
      title: Special property
      properties:
        type:
          x-class-name: SpecialEventAttributeType
          type: string
          enum:
          - SPECIAL
          description: This type lets you access special properties of an event.
        special:
          $ref: '#/components/schemas/analytics-SpecialTypeAttribute'
      required:
      - type
      - special
    analytics-EmptyEventAttribute:
      type: object
      title: No attribute
      properties:
        type:
          x-class-name: EmptyEventAttributeType
          type: string
          enum:
          - EMPTY
          description: Can be used for analyses whose result isn't based on an attribute, such as `EXISTS`. **Can't be used with `constraint`**.
      required:
      - type
    analytics-SpecialTypeAttribute:
      type: string
      description: The type of special attribute you want to use
      enum:
      - TIMESTAMP
    analytics-EventConstraint:
      description: |
        This object defines the logic to apply to the `attribute`, and the values to compare it against (if required).

        **The analytics engine doesn't check if the data types match - you need to ensure that your data types are consistent in the data you send to the database**.
      discriminator:
        propertyName: type
        mapping:
          BOOL: '#/components/schemas/analytics-BoolConstraintEventConstraint'
          STRING_ZERO: '#/components/schemas/analytics-StringZeroConstraintEventConstraint'
          STRING_ONE: '#/components/schemas/analytics-StringOneConstraintEventConstraint'
          NUMBER_ONE: '#/components/schemas/analytics-NumberOneConstraintEventConstraint'
          NUMBER_TWO: '#/components/schemas/analytics-NumberTwoConstraintEventConstraint'
          STRING_ARRAY: '#/components/schemas/analytics-StringArrayConstraintEventConstraint'
          ARRAY_STRING_ONE_DEPRECATED: '#/components/schemas/analytics-StringArrayOneConstraintEventConstraint'
          'NULL': '#/components/schemas/analytics-NullConstraintEventConstraint'
          DATE_ZERO: '#/components/schemas/analytics-DateZeroConstraintEventConstraint'
          DATE_ONE: '#/components/schemas/analytics-DateOneConstraintEventConstraint'
          DATE_TWO: '#/components/schemas/analytics-DateTwoConstraintEventConstraint'
          DATE_FILTER: '#/components/schemas/analytics-DateFilterConstraintEventConstraint'
      oneOf:
      - $ref: '#/components/schemas/analytics-BoolConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-StringZeroConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-StringOneConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-NumberOneConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-NumberTwoConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-StringArrayConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-StringArrayOneConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-NullConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-DateZeroConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-DateOneConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-DateTwoConstraintEventConstraint'
      - $ref: '#/components/schemas/analytics-DateFilterConstraintEventConstraint'
    analytics-BoolConstraintEventConstraint:
      type: object
      title: Boolean
      properties:
        type:
          x-class-name: BoolConstraintType
          type: string
          enum:
          - BOOL
          description: Tests a boolean value
        logic:
          x-class-name: BoolConstraintLogic
          type: string
          description: Boolean logic. Empty (zero-length) strings, `0`, and `"0"` are considered false. Null values are false.
          enum:
          - IS_TRUE
          - IS_FALSE
      required:
      - type
      - logic
    analytics-StringZeroConstraintEventConstraint:
      type: object
      title: Check empty
      description: This type is used to check if a string is empty.
      properties:
        type:
          title: String zero
          x-class-name: StringZeroConstraintType
          type: string
          description: This type is used to check if a string is empty.
          enum:
          - STRING_ZERO
        logic:
          x-class-name: StringZeroConstraintLogic
          type: string
          description: Checks if a string is empty (zero-length). Null value is considered empty. A string of whitespace characters is NOT empty.
          enum:
          - IS_EMPTY
          - IS_NOT_EMPTY
      required:
      - type
      - logic
    analytics-StringOneConstraintEventConstraint:
      type: object
      title: String
      properties:
        type:
          x-class-name: StringOneConstraintType
          type: string
          enum:
          - STRING_ONE
          description: This type is used to test values that are a single string.
        logic:
          x-class-name: StringOneConstraintLogic
          type: string
          description: Logic of the test. For example, if the logic is `CONTAIN` and the `value` returns "foo", the expression checks if the `attribute` (sibling object to `constraint`) contains the string "foo".
          enum:
          - CONTAIN
          - NOT_CONTAIN
          - EQUAL
          - NOT_EQUAL
          - STARTS_WITH
          - REGEXP
          - ENDS_WITH
        value:
          $ref: '#/components/schemas/analytics-EventValue'
      required:
      - type
      - logic
      - value
    analytics-NumberOneConstraintEventConstraint:
      type: object
      title: Number
      properties:
        type:
          x-class-name: NumberOneConstraintType
          type: string
          enum:
          - NUMBER_ONE
          description: This type is used to test values that are a single number
        logic:
          x-class-name: NumberOneConstraintLogic
          type: string
          description: Logic of the test. For example, if the logic is `EQUAL` and the `value` returns 15, the expression checks if the `attribute` (sibling object to `constraint`) is 15.
          enum:
          - EQUAL
          - NOT_EQUAL
          - LESS
          - MORE
          - MORE_OR_EQUAL
          - LESS_OR_EQUAL
        value:
          $ref: '#/components/schemas/analytics-EventValue'
      required:
      - type
      - logic
      - value
    analytics-NumberTwoConstraintEventConstraint:
      type: object
      title: Two numbers
      properties:
        type:
          x-class-name: NumberTwoConstraintType
          type: string
          enum:
          - NUMBER_TWO
          description: Checks if the `attribute` is between two numbers, defined in `value1` and `value2`.
        logic:
          description: Checks if the attribute is between two numbers.
          x-class-name: NumberTwoConstraintLogic
          type: string
          enum:
          - BETWEEN
        value1:
          $ref: '#/components/schemas/analytics-EventValue'
        value2:
          $ref: '#/components/schemas/analytics-EventValue'
      required:
      - type
      - logic
      - value1
      - value2
    analytics-StringArrayConstraintEventConstraint:
      type: object
      title: Check if string in array
      properties:
        type:
          x-class-name: StringArrayConstraintType
          type: string
          enum:
          - STRING_ARRAY
          description: This type is used to check if a string exists in an array defined in `value`
        logic:
          type: string
          x-class-name: StringArrayConstraintLogic
          description: You can check if the value from `attribute` is in the array defined in `value`
          enum:
          - IN
          - NOT_IN
        value:
          $ref: '#/components/schemas/analytics-EventValue'
      required:
      - type
      - logic
      - value
    analytics-StringArrayOneConstraintEventConstraint:
      type: object
      title: Other string array tests
      properties:
        type:
          x-class-name: ArrayStringOneConstraintType
          type: string
          enum:
          - ARRAY_STRING_ONE_DEPRECATED
          description: '`value` should be an array'
        logic:
          x-class-name: ArrayStringOneConstraintLogic
          type: string
          description: |
            - CONTAIN/NOT_CONTAIN test if any item in the array contains/doesn't contain the value from `attribute`
            - EQUAL/NOT_EQUAL test if any item in the array is/isn't identical to the value from `attribute`
            - STARTS_WITH/ENDS_WITH test if any item in the array starts/ends with the value from `attribute`
            - REGEXP tests if any item in the array matches the regular expression from `attribute`
          enum:
          - CONTAIN
          - NOT_CONTAIN
          - EQUAL
          - NOT_EQUAL
          - STARTS_WITH
          - REGEXP
          - ENDS_WITH
        value:
          $ref: '#/components/schemas/analytics-EventValue'
      required:
      - type
      - logic
      - value
    analytics-NullConstraintEventConstraint:
      type: object
      title: Check if null
      properties:
        type:
          x-class-name: NullConstraintType
          description: This type is used to check if a value is null
          type: string
          enum:
          - 'NULL'
        logic:
          x-class-name: NullConstraintLogic
          type: string
          description: Checks if the attribute is or isn't null. Empty strings, `0`, and negative numbers are NOT null. String `"null"` is NOT null.
          enum:
          - IS_NULL
          - IS_NOT_NULL
      required:
      - type
      - logic
    analytics-DateZeroConstraintEventConstraint:
      type: object
      title: Current date
      properties:
        type:
          x-class-name: DateZeroConstraintType
          type: string
          enum:
          - DATE_ZERO
          description: Compare a date from `attribute` to the current date
        logic:
          x-class-name: LogicZeroConstraintLogic
          type: string
          enum:
          - MATCHES_CURRENT_DAY
          - MATCHES_CURRENT_HOUR
          - MATCHES_CURRENT_MONTH
          - MATCHES_CURRENT_YEAR
          description: Logic to apply to the date from `attribute`
      required:
      - type
      - logic
    analytics-DateOneConstraintEventConstraint:
      description: This type is used to check `attribute` against a date.
      type: object
      title: Date
      properties:
        type:
          x-class-name: DateOneConstraintType
          type: string
          description: This type is used to check `attribute` against a date.
          enum:
          - DATE_ONE
        logic:
          x-class-name: DateOneConstraintLogic
          type: string
          description: Checks how the date from `attribute` compares to the one in `value`. For example, MORE returns true if `attribute` is the later date.
          enum:
          - LESS
          - MORE
          - LESS_OR_EQUAL
          - MORE_OR_EQUAL
        value:
          $ref: '#/components/schemas/analytics-EventValue'
      required:
      - type
      - logic
      - value
    analytics-DateTwoConstraintEventConstraint:
      description: This type is used to check if a date is between two other dates.
      type: object
      title: Date range
      properties:
        type:
          x-class-name: DateTwoConstraintType
          type: string
          description: This type is used to check if a date is between two other dates.
          enum:
          - DATE_TWO
        logic:
          x-class-name: DateTwoConstraintLogic
          type: string
          description: Checks if the date from `attribute` is between the dates from `value1` and `value2`.
          enum:
          - BETWEEN
        value1:
          $ref: '#/components/schemas/analytics-EventValue'
        value2:
          $ref: '#/components/schemas/analytics-EventValue'
      required:
      - type
      - logic
      - value1
      - value2
    analytics-DateFilterConstraintEventConstraint:
      description: This type is used to check if a date matches a date filter.
      type: object
      title: Date filter
      properties:
        type:
          x-class-name: DateFilterConstraintType
          type: string
          description: This type is used to check if a date matches a date filter.
          enum:
          - DATE_FILTER
        logic:
          x-class-name: DateFilterConstraintLogic
          type: string
          enum:
          - DATE_FILTER
          description: Checks if the date from `attribute` matches a date filter.
        value:
          $ref: '#/components/schemas/analytics-DateFilter'
      required:
      - type
      - logic
      - value
    analytics-EventValue:
      description: The value to test `attribute` against.
      discriminator:
        propertyName: type
        mapping:
          CONSTANT: '#/components/schemas/analytics-ConstantValue'
          EVENT: '#/components/schemas/analytics-EventParameter'
          CLIENT: '#/components/schemas/analytics-ClientParameter'
          VARIABLE: '#/components/schemas/analytics-VariableValue'
      oneOf:
      - $ref: '#/components/schemas/analytics-ConstantValue'
      - $ref: '#/components/schemas/analytics-EventParameter'
      - $ref: '#/components/schemas/analytics-ClientParameter'
      - $ref: '#/components/schemas/analytics-VariableValue'
    analytics-ConstantValue:
      type: object
      title: Static value
      description: Inserts a static value.
      properties:
        type:
          x-class-name: ConstantValueType
          type: string
          description: Inserts a static value.
          enum:
          - CONSTANT
        constant:
          $ref: '#/components/schemas/analytics-ConstantValueConstant'
      required:
      - type
      - constant
    analytics-ConstantValueConstant:
      description: |
        The value can't:
          - be longer than 21000 characters if it's a string
          - be larger than 65000 items if it's an array. Strings in the array can't be longer than 21000 characters.
      oneOf:
      - type: string
        maxLength: 21000
      - type: number
      - type: boolean
      - type: array
        maxItems: 65000
        items:
          type: string
          maxLength: 21000
    analytics-EventParameter:
      type: object
      title: Event parameter
      description: Inserts an event parameter value
      properties:
        type:
          x-class-name: EventParameterType
          description: Inserts an event parameter value
          type: string
          enum:
          - EVENT
        attribute:
          $ref: '#/components/schemas/analytics-EventAttribute'
      required:
      - type
      - attribute
    analytics-ClientParameter:
      type: object
      title: Profile attribute
      properties:
        type:
          description: References a profile attribute, including analyses.
          x-class-name: ClientEventValueType
          type: string
          enum:
          - CLIENT
        attribute:
          $ref: '#/components/schemas/analytics-ClientAttribute'
      required:
      - type
      - attribute
    analytics-VariableValue:
      type: object
      title: Dynamic value
      properties:
        type:
          x-class-name: VariableValueType
          type: string
          enum:
          - VARIABLE
          description: |
            This type is called a Dynamic Key in the Synerise Portal. It can be used to let other analytic components, such as dashboards, insert a value.

            The variable value can't:
              - be longer than 21000 characters if it's a string
              - be larger than 65000 items if it's an array. Strings in the array can't be longer than 21000 characters.
        name:
          type: string
          description: The name of the dynamic key
        defaultValue:
          type: string
          maxLength: 21000
          description: The default value to use
      required:
      - type
      - name
      - defaultValue
    analytics-FilterExpressionContent:
      deprecated: true
      example:
        type: EMPTY
      discriminator:
        propertyName: type
        mapping:
          FUNCTION: '#/components/schemas/analytics-FilterExpressionFunction'
          ATTRIBUTE: '#/components/schemas/analytics-AttributeFilterExpressionContent'
          FUNNEL: '#/components/schemas/analytics-FunnelFilterExpressionContent'
          EXPRESSION: '#/components/schemas/analytics-ExpressionFilterExpressionContent'
          EMPTY: '#/components/schemas/analytics-EmptyFilterExpressionContent'
      oneOf:
      - $ref: '#/components/schemas/analytics-FilterExpressionFunction'
      - $ref: '#/components/schemas/analytics-AttributeFilterExpressionContent'
      - $ref: '#/components/schemas/analytics-FunnelFilterExpressionContent'
      - $ref: '#/components/schemas/analytics-ExpressionFilterExpressionContent'
      - $ref: '#/components/schemas/analytics-EmptyFilterExpressionContent'
    analytics-FilterExpressionFunction:
      type: object
      description: Logical operators
      properties:
        type:
          description: Logical operators
          x-class-name: FunctionFilterExpressionContentType
          type: string
          enum:
          - FUNCTION
        function:
          x-class-name: FilterFunctionType
          type: string
          enum:
          - AND
          - OR
          - BRACKET
        arg:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: FilterExpressionContent
        arg1:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: FilterExpressionContent
        arg2:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: FilterExpressionContent
        name:
          type: string
      required:
      - type
      - function
    analytics-AttributeFilterExpressionContent:
      type: object
      title: Profile attribute
      properties:
        type:
          x-class-name: AttributeFilterExpressionContentType
          type: string
          enum:
          - ATTRIBUTE
          description: Tests a profile attribute against a condition
        matching:
          $ref: '#/components/schemas/analytics-matching'
        attribute:
          $ref: '#/components/schemas/analytics-Attribute'
    analytics-FunnelFilterExpressionContent:
      type: object
      title: Funnel
      properties:
        type:
          description: Tests against a funnel
          x-class-name: FunnelFilterExpressionContentType
          type: string
          enum:
          - FUNNEL
        matching:
          $ref: '#/components/schemas/analytics-matching'
        funnel:
          $ref: '#/components/schemas/analytics-Funnel'
    analytics-ExpressionFilterExpressionContent:
      description: Definition of a profile filter
      type: object
      properties:
        type:
          x-class-name: ExpressionFilterExpressionContentType
          type: string
          enum:
          - EXPRESSION
        name:
          type: string
        matching:
          $ref: '#/components/schemas/analytics-matching'
        expressions:
          description: Profile filter details. The expressions are applied according to their position in the array. The logical AND/OR operator must be placed between expressions. An empty array means no filters are applied.
          type: array
          items:
            $ref: '#/components/schemas/analytics-FilterBox'
        expression:
          $ref: '#/components/schemas/analytics-FilterExpressionContent'
      required:
      - type
      - expressions
    analytics-EmptyFilterExpressionContent:
      description: An empty value
      type: object
      properties:
        type:
          description: An empty value
          x-class-name: EmptyFilterExpressionContentType
          type: string
          enum:
          - EMPTY
        name:
          type: string
      required:
      - type
    analytics-ClientConstraint:
      discriminator:
        propertyName: type
        mapping:
          BOOL: '#/components/schemas/analytics-BoolConstraintClientConstraint'
          STRING_ZERO: '#/components/schemas/analytics-StringZeroConstraintClientConstraint'
          STRING_ONE: '#/components/schemas/analytics-StringOneConstraintClientConstraint'
          NUMBER_ONE: '#/components/schemas/analytics-NumberOneConstraintClientConstraint'
          NUMBER_TWO: '#/components/schemas/analytics-NumberTwoConstraintClientConstraint'
          STRING_ARRAY: '#/components/schemas/analytics-StringArrayConstraintClientConstraint'
          ARRAY_STRING_ONE_DEPRECATED: '#/components/schemas/analytics-StringArrayOneConstraintClientConstraint'
          'NULL': '#/components/schemas/analytics-NullConstraintClientConstraint'
          DATE_ZERO: '#/components/schemas/analytics-DateZeroConstraintClientConstraint'
          DATE_ONE: '#/components/schemas/analytics-DateOneConstraintClientConstraint'
          DATE_TWO: '#/components/schemas/analytics-DateTwoConstraintClientConstraint'
          DATE_FILTER: '#/components/schemas/analytics-DateFilterConstraintClientConstraint'
      oneOf:
      - $ref: '#/components/schemas/analytics-BoolConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-StringZeroConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-StringOneConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-NumberOneConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-NumberTwoConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-StringArrayConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-StringArrayOneConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-NullConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-DateZeroConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-DateOneConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-DateTwoConstraintClientConstraint'
      - $ref: '#/components/schemas/analytics-DateFilterConstraintClientConstraint'
    analytics-BoolConstraintClientConstraint:
      type: object
      title: Boolean
      properties:
        type:
          x-class-name: BoolClientConstraintType
          type: string
          enum:
          - BOOL
          description: Tests a boolean value
        logic:
          description: Boolean logic. Empty (zero-length) strings, `0`, and `"0"` are considered false. Null values are false.
          x-class-name: BoolClientConstraintLogic
          type: string
          enum:
          - IS_TRUE
          - IS_FALSE
      required:
      - type
      - logic
    analytics-StringZeroConstraintClientConstraint:
      type: object
      title: Check empty
      description: This type is used to check if a string is empty.
      properties:
        type:
          x-class-name: StringZeroClientConstraintType
          type: string
          description: This type is used to check if a string is empty.
          enum:
          - STRING_ZERO
        logic:
          description: Checks if a string is empty (zero-length). Null value is considered empty. A string of whitespace characters is NOT empty.
          x-class-name: StringZeroClientConstraintLogic
          type: string
          enum:
          - IS_EMPTY
          - IS_NOT_EMPTY
      required:
      - type
      - logic
    analytics-StringOneConstraintClientConstraint:
      type: object
      title: String
      properties:
        type:
          description: This type is used to test values that are a single string.
          x-class-name: StringOneClientConstraintType
          type: string
          enum:
          - STRING_ONE
        logic:
          description: Logic of the test. For example, if the logic is `CONTAIN` and the `value` returns "foo", the expression checks if the `attribute` (sibling object to `constraint`) contains the string "foo".
          x-class-name: StringOneClientConstraintLogic
          type: string
          enum:
          - CONTAIN
          - NOT_CONTAIN
          - EQUAL
          - NOT_EQUAL
          - STARTS_WITH
          - REGEXP
          - ENDS_WITH
        value:
          $ref: '#/components/schemas/analytics-ClientValue'
      required:
      - type
      - logic
      - value
    analytics-NumberOneConstraintClientConstraint:
      type: object
      title: Number
      properties:
        type:
          description: This type is used to test values that are a single number
          x-class-name: NumberOneClientConstraintType
          type: string
          enum:
          - NUMBER_ONE
        logic:
          description: Logic of the test. For example, if the logic is `EQUAL` and the `value` returns 15, the expression checks if the `attribute` (sibling object to `constraint`) is 15.
          x-class-name: NumberOneClientConstraintLogic
          type: string
          enum:
          - EQUAL
          - NOT_EQUAL
          - LESS
          - MORE
          - MORE_OR_EQUAL
          - LESS_OR_EQUAL
        value:
          $ref: '#/components/schemas/analytics-ClientValue'
      required:
      - type
      - logic
      - value
    analytics-NumberTwoConstraintClientConstraint:
      type: object
      title: Two numbers
      properties:
        type:
          description: Checks if the `attribute` is between two numbers, defined in `value1` and `value2`.
          x-class-name: NumberTwoClientConstraintType
          type: string
          enum:
          - NUMBER_TWO
        logic:
          description: Checks if the attribute is between two numbers.
          x-class-name: NumberTwoClientConstraintLogic
          type: string
          enum:
          - BETWEEN
        value1:
          $ref: '#/components/schemas/analytics-ClientValue'
        value2:
          $ref: '#/components/schemas/analytics-ClientValue'
      required:
      - type
      - logic
      - value1
      - value2
    analytics-StringArrayConstraintClientConstraint:
      type: object
      title: Check if string in array
      properties:
        type:
          description: This type is used to check if a string exists in an array defined in `value`
          x-class-name: StringArrayClientConstraintType
          type: string
          enum:
          - STRING_ARRAY
        logic:
          description: You can check if the value from `attribute` is in the array defined in `value`
          x-class-name: StringArrayClientConstraintLogic
          type: string
          enum:
          - IN
          - NOT_IN
        value:
          $ref: '#/components/schemas/analytics-ClientValue'
      required:
      - type
      - logic
      - value
    analytics-StringArrayOneConstraintClientConstraint:
      type: object
      title: Other string array tests
      properties:
        type:
          description: '`value` should be an array'
          x-class-name: ArrayStringOneClientConstraintType
          type: string
          enum:
          - ARRAY_STRING_ONE_DEPRECATED
        logic:
          description: '- CONTAIN/NOT_CONTAIN test if any item in the array contains/doesn''t contain the value from `attribute` - EQUAL/NOT_EQUAL test if any item in the array is/isn''t identical to the value from `attribute` - STARTS_WITH/ENDS_WITH test if any item in the array starts/ends with the value from `attribute` - REGEXP tests if any item in the array matches the regular expression from `attribute` '
          x-class-name: ArrayStringOneClientConstraintLogic
          type: string
          enum:
          - CONTAIN
          - NOT_CONTAIN
          - EQUAL
          - NOT_EQUAL
          - STARTS_WITH
          - REGEXP
          - ENDS_WITH
        value:
          $ref: '#/components/schemas/analytics-ClientValue'
      required:
      - type
      - logic
      - value
    analytics-NullConstraintClientConstraint:
      type: object
      title: Check if null
      properties:
        type:
          x-class-name: NullClientConstraintType
          type: string
          enum:
          - 'NULL'
          description: This type is used to check if a value is null
        logic:
          description: Checks if the attribute is or isn't null. Empty strings, `0`, and negative numbers are NOT null. String `"null"` is NOT null.
          x-class-name: NullClientConstraintLogic
          type: string
          enum:
          - IS_NULL
          - IS_NOT_NULL
      required:
      - type
      - logic
    analytics-DateZeroConstraintClientConstraint:
      type: object
      title: Current date
      properties:
        type:
          description: Compare a date from `attribute` to the current date
          x-class-name: DateZeroClientConstraintType
          type: string
          enum:
          - DATE_ZERO
        logic:
          description: Logic to apply to the date from `attribute`
          x-class-name: DateZeroClientConstraintLogic
          type: string
          enum:
          - MATCHES_CURRENT_DAY
          - MATCHES_CURRENT_HOUR
          - MATCHES_CURRENT_MONTH
          - MATCHES_CURRENT_YEAR
      required:
      - type
      - logic
    analytics-DateOneConstraintClientConstraint:
      description: This type is used to check `attribute` against a date.
      type: object
      title: Date
      properties:
        type:
          x-class-name: DateOneClientConstraintType
          type: string
          description: This type is used to check `attribute` against a date.
          enum:
          - DATE_ONE
        logic:
          description: Checks how the date from `attribute` compares to the one in `value`. For example, MORE returns true if `attribute` is the later date.
          x-class-name: DateOneClientConstraintLogic
          type: string
          enum:
          - LESS
          - MORE
          - LESS_OR_EQUAL
          - MORE_OR_EQUAL
        value:
          $ref: '#/components/schemas/analytics-ClientValue'
      required:
      - type
      - logic
      - value
    analytics-DateTwoConstraintClientConstraint:
      description: This type is used to check if a date is between two other dates.
      type: object
      title: Date range
      properties:
        type:
          x-class-name: DateTwoClientConstraintType
          type: string
          description: This type is used to check if a date is between two other dates.
          enum:
          - DATE_TWO
        logic:
          description: Checks if the date from `attribute` is between the dates from `value1` and `value2`.
          x-class-name: DateTwoClientConstraintLogic
          type: string
          enum:
          - BETWEEN
        value1:
          $ref: '#/components/schemas/analytics-ClientValue'
        value2:
          $ref: '#/components/schemas/analytics-ClientValue'
      required:
      - type
      - logic
      - value1
      - value2
    analytics-DateFilterConstraintClientConstraint:
      type: object
      title: Date filter
      description: This type is used to check if a date matches a date filter.
      properties:
        type:
          x-class-name: DateFilterClientConstraintType
          type: string
          description: This type is used to check if a date matches a date filter.
          enum:
          - DATE_FILTER
        logic:
          description: Checks if the date from `attribute` matches a date filter.
          x-class-name: DateFilterClientConstraintLogic
          type: string
          enum:
          - DATE_FILTER
        value:
          $ref: '#/components/schemas/analytics-DateFilter'
      required:
      - type
      - logic
      - value
    analytics-ReportPreviewRequest:
      type: object
      properties:
        allowNull:
          $ref: '#/components/schemas/analytics-AllowNull'
        analysis:
          $ref: '#/components/schemas/analytics-ReportAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - analysis
    analytics-AllowNull:
      type: boolean
      default: true
      description: When `true`, null values can be included in the results.
    analytics-ReportAnalysis:
      type: object
      description: Structure of the report analysis
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        title:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        reportMetrics:
          type: array
          minLength: 0
          description: An array of metrics in the report. The Synerise Web Portal currently only supports reports with one metric.
          items:
            $ref: '#/components/schemas/analytics-ReportMetricDefinition'
        filter:
          $ref: '#/components/schemas/analytics-ExpressionFilter'
      required:
      - title
      - description
      - reportMetrics
      - filter
    analytics-OverrideQueryRequest:
      type: object
      description: Override details
      properties:
        title:
          $ref: '#/components/schemas/analytics-Name'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        aggregateDataBy:
          $ref: '#/components/schemas/analytics-Period'
        filter:
          $ref: '#/components/schemas/analytics-ExpressionFilter'
        variables:
          type: array
          description: A list of variable values to use in this calculation
          items:
            $ref: '#/components/schemas/analytics-Variable'
        overrideNested:
          description: When `true`, the date filter overrides date filters in analyses nested in the conditions.
          type: boolean
          default: false
    analytics-ReportCalculationResponse:
      type: object
      properties:
        data:
          type: array
          description: Calculation results. Each object in this array corresponds to one metric included in the report. The Synerise Web UI currently only supports single-metric reports.
          items:
            $ref: '#/components/schemas/analytics-ReportCalculationData'
      required:
      - data
    analytics-ReportCalculationData:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        columnName:
          type: string
          description: |
            Column header for this metric. Uses the per-metric `columnName` from the report
            definition when set; otherwise falls back to the underlying metric's title.
        values:
          type: array
          description: |2

            An array of results for each grouping.

            Note that `values` is a single-item array of arrays.

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

            ```json
            "values": [
              [
                {
                  "name": [
                    "John",
                    "Discounted Product Page"
                  ],
                  "value": 26.0
                },
                {
                  "name": [
                    "Steve",
                    "Discounted Product Page"
                  ],
                  "value": 12.0
                },
                {
                  "name": [
                    "Steve",
                    "New product pre-order"
                  ],
                  "value": 117.0
                }
              ]
            ]
            ```

            This means that 26 profiles named John visited a page titled "Discounted Product Page". The same page was visited by 12 profiles named Steve. Profiles named Steve visited "New product pre-order" page 117 times.
          items:
            type: array
            items:
              $ref: '#/components/schemas/analytics-GroupingReportMetric'
        groups:
          type: array
          description: A list of parameters that were used for creating dimensions (grouping)
          items:
            type: string
      required:
      - columnName
      - groups
      - id
      - values
    analytics-GroupingReportMetric:
      type: object
      properties:
        name:
          type: array
          description: Parameter values
          items:
            anyOf:
            - type: string
            - type: number
        value:
          type: number
          description: The number of occurrences of the combination defined in `name`
          format: double
      required:
      - name
      - value
    analytics-ReportMetricGroup:
      description: |
        The type and source of data shown in the report.
        When type is CLIENT, attribute refers to a ProfileAttribute.
        When type is EVENT, attribute refers to an EventAttribute.
      discriminator:
        propertyName: type
        mapping:
          CLIENT: '#/components/schemas/analytics-ClientReportMetricGroup'
          EVENT: '#/components/schemas/analytics-EventReportMetricGroup'
      oneOf:
      - $ref: '#/components/schemas/analytics-ClientReportMetricGroup'
      - $ref: '#/components/schemas/analytics-EventReportMetricGroup'
    analytics-ClientReportMetricGroup:
      type: object
      title: ClientReportMetricGroup
      required:
      - type
      - attribute
      properties:
        title:
          type: string
          description: The name of the dimension
        format:
          $ref: '#/components/schemas/analytics-MetricFormat'
        type:
          title: ClientReportMetricGroupType
          x-class-name: ClientReportMetricGroupType
          type: string
          enum:
          - CLIENT
          description: Defines the source type of the data shown in the report.
        attribute:
          $ref: '#/components/schemas/analytics-ClientAttribute'
    analytics-EventReportMetricGroup:
      type: object
      title: EventReportMetricGroup
      required:
      - type
      - attribute
      properties:
        title:
          type: string
          description: The name of the dimension
        format:
          $ref: '#/components/schemas/analytics-MetricFormat'
        type:
          title: EventReportMetricGroupType
          x-class-name: EventReportMetricGroupType
          type: string
          enum:
          - EVENT
          description: Defines the source type of the data shown in the report.
        attribute:
          $ref: '#/components/schemas/analytics-EventAttribute'
    analytics-DynamicVariablesRequest:
      type: object
      properties:
        variables:
          $ref: '#/components/schemas/analytics-Variables'
      required:
      - variables
    analytics-SegmentationCalculationResponse:
      type: object
      properties:
        calculationResults:
          type: array
          description: A list of segments
          items:
            $ref: '#/components/schemas/analytics-CalculationResult'
        totalContacts:
          type: integer
          description: The total number of profiles in the database
        excludedContacts:
          type: integer
          description: The number of profiles which did not match the conditions of any segment
        metadata:
          $ref: '#/components/schemas/analytics-Metadata'
      required:
      - calculationResults
    analytics-CalculationResult:
      type: object
      properties:
        name:
          type: string
          description: Segment name
        result:
          type: integer
          format: int64
          description: |2

            The number of profiles which matched the conditions of this segment.

            **IMPORTANT:** If a profile matches a segment's conditions, that profile is not included in any further calculations, even if it would normally match the conditions of the segments that follow.
      required:
      - name
      - result
    analytics-Metadata:
      type: object
      description: Raw data of the calculation
      properties:
        source:
          type: array
          description: An array of results. Each number is the number of profiles which matched a segment, according to the segments' order in the request. The last number is the the number of profiles which don't match any of the segment.
          items:
            type: integer
    analytics-DirectoryRenameRequest:
      type: object
      properties:
        newName:
          type: string
          description: New name for the directory
      required:
      - newName
    analytics-ObjectType:
      type: string
      enum:
      - EXPRESSION
      - AGGREGATE
      - SEGMENTATION
      - METRIC
      - FUNNEL
      - SANKEY
      - TREND
      - HISTOGRAM
      - REPORT
      - ANALYTICS_QUERY
      - ANALYTICS_DASHBOARD
    analytics-Directory:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        businessProfileId:
          $ref: '#/components/schemas/analytics-BusinessProfileId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        objectType:
          $ref: '#/components/schemas/analytics-ObjectType'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        isDefault:
          type: boolean
          description: '`true` if this is the default directory'
      required:
      - createdAt
      - id
      - isDefault
      - name
      - objectType
      - updatedAt
    analytics-DirectoryCreateRequest:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/analytics-Name'
        analyticType:
          $ref: '#/components/schemas/analytics-ObjectType'
      required:
      - analyticType
      - name
    analytics-SegmentationPreviewRequest:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-SegmentationAnalysis'
        allowNull:
          $ref: '#/components/schemas/analytics-AllowNull'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - analysis
    analytics-SegmentationAnalysis:
      type: object
      description: Definition of the segmentation.
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        title:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        segments:
          type: array
          description: An array of segments in the segmentation. By default, a profile is only included in the first matching segment, even if it meets the filters of the following segments. To change this, use the `unique` parameter.
          minItems: 1
          items:
            $ref: '#/components/schemas/analytics-OneSegment'
        unique:
          $ref: '#/components/schemas/analytics-SegmentationUnique'
      required:
      - title
      - segments
    analytics-SegmentationView:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        businessProfileId:
          $ref: '#/components/schemas/analytics-BusinessProfileId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        author:
          $ref: '#/components/schemas/analytics-AuthorId'
        modifier:
          $ref: '#/components/schemas/analytics-modifierId'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        analysis:
          $ref: '#/components/schemas/analytics-SegmentationAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
        isPredefinedAnalytic:
          $ref: '#/components/schemas/analytics-IsPredefinedAnalytic'
        isVisibleForClientProfile:
          $ref: '#/components/schemas/analytics-IsVisibleForClientProfile'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        isDeleted:
          $ref: '#/components/schemas/analytics-IsDeleted'
        namespace:
          $ref: '#/components/schemas/analytics-Namespace'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
        sharing:
          $ref: '#/components/schemas/analytics-SharingData'
      required:
      - id
      - businessProfileId
      - name
      - description
      - author
      - modifier
      - updatedAt
      - createdAt
      - usedAt
      - analysis
      - isPredefinedAnalytic
      - isVisibleForClientProfile
      - isDynamicAnalytic
      - isDeleted
      - namespace
      - directoryId
      - sharing
    analytics-SegmentationUnique:
      type: boolean
      description: When `true`, a profile is only included in the first segment that it matches; segments that follow do not include this profile in their results even if their conditions are met. The segments are checked according to their order in the request.
      default: true
    analytics-OneSegment:
      type: object
      x-class-name: Segment
      properties:
        title:
          type: string
          description: Name of the segment. If you want to use the segment name (for example, by creating an expression that returns it for use in a filter), the name shouldn't include any whitespace or special characters.
        description:
          type: string
          description: Description of the segment
        filter:
          $ref: '#/components/schemas/analytics-ExpressionFilter'
      required:
      - title
      - description
      - filter
    analytics-DirectoryChangeRequest:
      type: object
      properties:
        newDir:
          description: ID of the new directory
          type: string
          format: uuid
        analyticType:
          $ref: '#/components/schemas/analytics-ObjectType'
      required:
      - analyticType
      - newDir
    analytics-MetricCalculationResponse:
      type: object
      properties:
        result:
          description: The numerical result. In metrics that return true/false values, `1` is "true" and `0` is "false".
          type: number
          format: double
        metricData:
          $ref: '#/components/schemas/analytics-MetricCalculationData'
      required:
      - metricData
      - result
    analytics-MetricCalculationData:
      type: object
      description: Basic information about the metric
      properties:
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        format:
          $ref: '#/components/schemas/analytics-MetricFormat'
        initialDateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
      required:
      - description
      - format
      - initialDateFilter
      - name
    analytics-IdentifierValue:
      type: string
      description: Value of the selected identifier. Note that IDs must also be sent as strings.
    analytics-BatchCalculationResult:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        name:
          $ref: '#/components/schemas/analytics-AnalyticName'
        result:
          description: Result of the analysis
          oneOf:
          - $ref: '#/components/schemas/analytics-SuccessResult'
          - $ref: '#/components/schemas/analytics-FailureResult'
      required:
      - id
      - name
      - result
    analytics-SuccessResult:
      type: object
      example:
        success: true
        value: '123'
      properties:
        success:
          type: boolean
          description: Always `true`
        value:
          type: string
          description: Calculation result
      required:
      - success
      - value
      title: Successful calculation
    analytics-FailureResult:
      type: object
      example:
        success: false
        errorMessage: Analytic or one of nested analytics does not exist
        httpStatus: 400
        errorCode: ANA-002
      properties:
        success:
          type: boolean
          description: Always `false`
        errorMessage:
          type: string
          description: Details of the error which caused the calculation failure
        httpStatus:
          type: integer
          description: HTTP status of the error which caused the calculation failure
        errorCode:
          type: string
          description: Code of the error which caused the calculation failure
      required:
      - errorMessage
      - success
      title: Failed calculation
    analytics-ExpressionTypedCalculationResponse:
      type: object
      properties:
        expressionId:
          type: string
          format: uuid
          description: Random ID for this expression preview
        clientId:
          type: integer
          format: int64
          description: ID of the profile
        title:
          type: string
          description: Expression title
        result:
          description: Result of the expression
          anyOf:
          - type: string
          - type: boolean
          - type: number
          - type: object
          - type: array
            items: {}
        variables:
          $ref: '#/components/schemas/analytics-Variables'
      required:
      - clientId
      - expressionId
      - result
      - title
      - variables
    analytics-ExpressionListItem:
      allOf:
      - type: object
        properties:
          action:
            $ref: '#/components/schemas/analytics-Action'
          type:
            $ref: '#/components/schemas/analytics-ExpressionType'
        required:
        - action
        - type
      - $ref: '#/components/schemas/analytics-ListAnalyticsItemCommon'
    analytics-ExpressionView:
      type: object
      x-interface-name-ts: ExpressionView
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-ExpressionEntity'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
        analyticVersion:
          $ref: '#/components/schemas/analytics-AnalyticVersion'
        isVisibleForClientProfile:
          $ref: '#/components/schemas/analytics-IsVisibleForClientProfile'
        id:
          $ref: '#/components/schemas/analytics-Id'
        businessProfileId:
          $ref: '#/components/schemas/analytics-BusinessProfileId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        author:
          $ref: '#/components/schemas/analytics-AuthorId'
        modifier:
          $ref: '#/components/schemas/analytics-modifierId'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        isPredefinedAnalytic:
          $ref: '#/components/schemas/analytics-IsPredefinedAnalytic'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        isDeleted:
          $ref: '#/components/schemas/analytics-IsDeleted'
        namespace:
          $ref: '#/components/schemas/analytics-Namespace'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
      required:
      - analysis
      - analyticVersion
      - author
      - businessProfileId
      - createdAt
      - description
      - directoryId
      - id
      - isDeleted
      - isDynamicAnalytic
      - isPredefinedAnalytic
      - isVisibleForClientProfile
      - modifier
      - name
      - namespace
      - updatedAt
      - usedAt
    analytics-ExpressionType:
      type: string
      x-class-name: ExpressionType
      enum:
      - EVENT
      - CLIENT
    analytics-ExpressionEntity:
      description: Details of the analysis
      discriminator:
        propertyName: type
        mapping:
          EVENT: '#/components/schemas/analytics-EventExpressionEntity'
          CLIENT: '#/components/schemas/analytics-ClientExpressionEntity'
      oneOf:
      - $ref: '#/components/schemas/analytics-EventExpressionEntity'
      - $ref: '#/components/schemas/analytics-ClientExpressionEntity'
    analytics-EventExpressionEntity:
      type: object
      title: Event expression
      properties:
        type:
          type: string
          enum:
          - EVENT
          description: This type of expression can be used to analyze event attributes, including the attributes of the profile that owns the event.
        action:
          $ref: '#/components/schemas/analytics-Action'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        expression:
          $ref: '#/components/schemas/analytics-EventExpressionContentEntity'
      required:
      - expression
      - name
      - type
      - description
    analytics-EventExpressionContentEntity:
      description: Structure of the expression. This is a recursive schema - functions can contain more functions.
      example:
        type: VALUE
        title: title
        value:
          type: CONSTANT
          constant: 10
      discriminator:
        propertyName: type
        mapping:
          VALUE: '#/components/schemas/analytics-EventExpressionContentEntityValue'
          FUNCTION: '#/components/schemas/analytics-EventExpressionContentEntityFunction'
      oneOf:
      - $ref: '#/components/schemas/analytics-EventExpressionContentEntityValue'
      - $ref: '#/components/schemas/analytics-EventExpressionContentEntityFunction'
    analytics-EventExpressionContentEntityValue:
      type: object
      title: Value
      description: A value reference in the expression - can reference an event parameter, profile parameter, constant, or variable.
      properties:
        type:
          description: A value reference in the expression - can reference an event parameter, profile parameter, constant, or variable.
          x-class-name: EventExpressionContentEntityValueType
          type: string
          enum:
          - VALUE
        title:
          type: string
          description: Title of the value
        value:
          $ref: '#/components/schemas/analytics-EventValue'
      required:
      - title
      - type
      - value
    analytics-EventExpressionContentEntityFunction:
      type: object
      title: Function
      description: |
        A function in the expression. Arguments are optional depending on function arity:
        - `arg` - argument for single-argument (unary) functions
        - `arg1` - first argument for multi-argument functions (binary, ternary)
        - `arg2` - second argument for multi-argument functions (binary, ternary)
        - `arg3` - third argument for ternary functions (IF)
      example:
        type: FUNCTION
        function: LN
        arg:
          type: VALUE
          title: title
          value:
            type: CONSTANT
            constant: 10
      properties:
        type:
          x-class-name: EventExpressionContentEntityFunctionType
          type: string
          enum:
          - FUNCTION
        function:
          x-class-name: EventExpressionFunctionType
          type: string
          description: |
            The function to apply. The number of required arguments depends on the function arity:
            - Nullary (0 args): NOW
            - Unary (1 arg via `arg`): LN, ABS, CEIL, EXP, FLOOR, ROUND, TO_NUMBER, TO_STRING, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, HOUR, MONTH, WEEK, YEAR, TO_MONEY, TO_TIMESTAMP, TO_DATE, BRACKET
            - Binary (2 args via `arg1`, `arg2`): DIVIDE, IF_NULL, MAX, MIN, MOD, MULTIPLY, SUB, SUM, GREATER, GREATER_OR_EQUALS, LESS, LESS_OR_EQUAL, NOT_EQUAL, EQUALS, ADD_YEARS, CONCAT, REGEXP
            - Ternary (3 args via `arg1`, `arg2`, `arg3`): IF (arg1 - condition; arg2 - return if true; arg3 - return if false)
          enum:
          - NOW
          - LN
          - ABS
          - CEIL
          - EXP
          - FLOOR
          - ROUND
          - TO_NUMBER
          - TO_STRING
          - DAY_OF_MONTH
          - DAY_OF_WEEK
          - DAY_OF_YEAR
          - HOUR
          - MONTH
          - WEEK
          - YEAR
          - TO_MONEY
          - TO_TIMESTAMP
          - TO_DATE
          - BRACKET
          - DIVIDE
          - IF_NULL
          - MAX
          - MIN
          - MOD
          - MULTIPLY
          - SUB
          - SUM
          - GREATER
          - GREATER_OR_EQUALS
          - LESS
          - LESS_OR_EQUAL
          - NOT_EQUAL
          - EQUALS
          - ADD_YEARS
          - CONCAT
          - REGEXP
          - IF
        arg:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: EventExpressionContentEntity
        arg1:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: EventExpressionContentEntity
        arg2:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: EventExpressionContentEntity
        arg3:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: EventExpressionContentEntity
      required:
      - type
      - function
    analytics-ClientExpressionEntity:
      type: object
      title: Profile expression
      description: Details of a profile expression. In the Synerise Portal, they are called _attribute_ expressions.
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        type:
          type: string
          enum:
          - CLIENT
          description: This type of expression can be used to analyze profile attributes.
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        expression:
          $ref: '#/components/schemas/analytics-ClientExpressionContentEntity'
      required:
      - type
      - name
      - expression
    analytics-ClientExpressionContentEntity:
      description: Structure of the expression. This is a recursive schema - functions can contain more functions.
      example:
        type: VALUE
        title: title
        value:
          type: CONSTANT
          constant: 10
      discriminator:
        propertyName: type
        mapping:
          VALUE: '#/components/schemas/analytics-ClientExpressionContentEntityValue'
          FUNCTION: '#/components/schemas/analytics-ClientExpressionContentEntityFunction'
      oneOf:
      - $ref: '#/components/schemas/analytics-ClientExpressionContentEntityValue'
      - $ref: '#/components/schemas/analytics-ClientExpressionContentEntityFunction'
    analytics-ClientExpressionContentEntityValue:
      type: object
      title: Value
      description: A value reference in the expression - can reference a profile parameter, constant, or variable.
      properties:
        type:
          x-class-name: ClientExpressionContentEntityValueType
          type: string
          description: A value reference in the expression - can reference a profile parameter, constant, or variable.
          enum:
          - VALUE
        title:
          type: string
          description: Title of the value
        value:
          oneOf:
          - $ref: '#/components/schemas/analytics-ClientParameter'
          - $ref: '#/components/schemas/analytics-ConstantValue'
          - $ref: '#/components/schemas/analytics-VariableValue'
      required:
      - title
      - type
      - value
    analytics-ClientExpressionContentEntityFunction:
      type: object
      title: Function
      description: |
        A function in the expression. Arguments are optional depending on function arity:
        - `arg` - argument for single-argument (unary) functions
        - `arg1` - first argument for multi-argument functions (binary, ternary)
        - `arg2` - second argument for multi-argument functions (binary, ternary)
        - `arg3` - third argument for ternary functions (IF)
      example:
        type: FUNCTION
        function: LN
        arg:
          type: VALUE
          title: title
          value:
            type: CONSTANT
            constant: 10
      properties:
        type:
          x-class-name: ClientExpressionContentEntityFunctionType
          type: string
          enum:
          - FUNCTION
        function:
          x-class-name: ClientExpressionFunctionType
          type: string
          description: |
            The function to apply. The number of required arguments depends on the function arity:
            - Nullary (0 args): NOW
            - Unary (1 arg via `arg`): LN, ABS, CEIL, EXP, FLOOR, ROUND, TO_NUMBER, TO_STRING, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, HOUR, MONTH, WEEK, YEAR, TO_MONEY, TO_TIMESTAMP, TO_DATE, BRACKET
            - Binary (2 args via `arg1`, `arg2`): DIVIDE, IF_NULL, MAX, MIN, MOD, MULTIPLY, SUB, SUM, GREATER, GREATER_OR_EQUALS, LESS, LESS_OR_EQUAL, NOT_EQUAL, EQUALS, ADD_YEARS, CONCAT, REGEXP
            - Ternary (3 args via `arg1`, `arg2`, `arg3`): IF (arg1 - condition; arg2 - return if true; arg3 - return if false)
          enum:
          - NOW
          - LN
          - ABS
          - CEIL
          - EXP
          - FLOOR
          - ROUND
          - TO_NUMBER
          - TO_STRING
          - DAY_OF_MONTH
          - DAY_OF_WEEK
          - DAY_OF_YEAR
          - HOUR
          - MONTH
          - WEEK
          - YEAR
          - TO_MONEY
          - TO_TIMESTAMP
          - TO_DATE
          - BRACKET
          - DIVIDE
          - IF_NULL
          - MAX
          - MIN
          - MOD
          - MULTIPLY
          - SUB
          - SUM
          - GREATER
          - GREATER_OR_EQUALS
          - LESS
          - LESS_OR_EQUAL
          - NOT_EQUAL
          - EQUALS
          - ADD_YEARS
          - CONCAT
          - REGEXP
          - IF
        arg:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: ClientExpressionContentEntity
        arg1:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: ClientExpressionContentEntity
        arg2:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: ClientExpressionContentEntity
        arg3:
          type: object
          description: An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.
          x-codegen-schema: ClientExpressionContentEntity
      required:
      - type
      - function
    analytics-Namespace:
      type: string
      description: Name of the namespace in the database where this resource is saved. This is **different than the namespace in the path parameters** of the request.
    analytics-IsDeleted:
      type: boolean
      description: '`true` if the resource was deleted'
    analytics-IsPredefinedAnalytic:
      type: boolean
      description: '`true` if the analysis was automatically created with the workspace'
    analytics-ExpressionPreviewRequestWithClient:
      type: object
      properties:
        identifierValue:
          $ref: '#/components/schemas/analytics-IdentifierValue'
        expression:
          $ref: '#/components/schemas/analytics-ClientExpressionEntity'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - expression
      - identifierValue
    analytics-HistogramAnalysis:
      type: object
      description: Details of a histogram
      properties:
        title:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        histogram:
          $ref: '#/components/schemas/analytics-HistogramDefinition'
      required:
      - description
      - histogram
      - title
    analytics-HistogramView:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        businessProfileId:
          $ref: '#/components/schemas/analytics-BusinessProfileId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        author:
          $ref: '#/components/schemas/analytics-AuthorId'
        modifier:
          $ref: '#/components/schemas/analytics-modifierId'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        analysis:
          $ref: '#/components/schemas/analytics-HistogramAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
        isPredefinedAnalytic:
          $ref: '#/components/schemas/analytics-IsPredefinedAnalytic'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        isDeleted:
          $ref: '#/components/schemas/analytics-IsDeleted'
        namespace:
          $ref: '#/components/schemas/analytics-Namespace'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
      required:
      - id
      - businessProfileId
      - name
      - author
      - modifier
      - updatedAt
      - createdAt
      - usedAt
      - analysis
      - isPredefinedAnalytic
      - isDynamicAnalytic
      - isDeleted
      - namespace
      - directoryId
    analytics-HistogramMetric:
      type: object
      properties:
        metricId:
          $ref: '#/components/schemas/analytics-AnalyticId'
        chartType:
          $ref: '#/components/schemas/analytics-ChartType'
        title:
          type: string
          description: Name of the metric on the histogram (can be different than the name saved in the metric's details)
      required:
      - chartType
      - metricId
    analytics-ChartType:
      type: string
      description: Currently unused. For compatibility, set to COLUMN
      enum:
      - COLUMN
      - LINE
    analytics-MetricProjectionResponse:
      type: object
      properties:
        hashId:
          $ref: '#/components/schemas/analytics-Id'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        action:
          $ref: '#/components/schemas/analytics-Action'
        eventName:
          $ref: '#/components/schemas/analytics-ActionName'
        actionId:
          $ref: '#/components/schemas/analytics-ActionId'
        isNumber:
          $ref: '#/components/schemas/analytics-IsNumber'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        variables:
          $ref: '#/components/schemas/analytics-Variables'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        isMetricHistogram:
          $ref: '#/components/schemas/analytics-IsMetricHistogram'
      required:
      - createdAt
      - isNumber
      - name
    analytics-HistogramCalculationResponse:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/analytics-HistogramMetadata'
        items:
          type: array
          description: The numerical results, divided into time units defined in the `period` object. Each object in the array holds the results of all metrics for a particular aggregation period.
          items:
            $ref: '#/components/schemas/analytics-HistogramItems'
        legends:
          type: array
          description: Information about included metrics and their display mode
          items:
            $ref: '#/components/schemas/analytics-HistogramLegends'
      required:
      - items
      - legends
      - metadata
    analytics-HistogramItems:
      type: object
      properties:
        aggregateTimeDescription:
          type: string
          description: Timestamp of the result
          format: date-time
        values:
          type: array
          description: An array of the results of the included metrics
          items:
            $ref: '#/components/schemas/analytics-HistogramItemsValues'
      required:
      - aggregateTimeDescription
      - values
    analytics-HistogramItemsValues:
      type: object
      properties:
        metricId:
          type: string
          description: UUID of a metric
          format: uuid
        value:
          type: number
          format: double
          description: Result of a metric
      required:
      - metricId
      - value
    analytics-HistogramLegends:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: UUID of a metric
        title:
          type: string
          description: Title of a metric
        chartType:
          $ref: '#/components/schemas/analytics-ChartType'
      required:
      - chartType
      - id
      - title
    analytics-HistogramMetadata:
      type: object
      description: Time constraints and aggregation details
      properties:
        period:
          $ref: '#/components/schemas/analytics-Period'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
      required:
      - aggregateDataBy
      - dateFilter
    analytics-TrendAnalysis:
      type: object
      description: Details of a trend analysis
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        title:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        filter:
          $ref: '#/components/schemas/analytics-ExpressionFilter'
        trend:
          $ref: '#/components/schemas/analytics-Trend'
      required:
      - filter
      - title
      - trend
    analytics-Trend:
      type: object
      properties:
        aggregateDataBy:
          $ref: '#/components/schemas/analytics-Period'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        trendDefinitions:
          type: array
          description: An array of trends included in the trend analysis
          items:
            $ref: '#/components/schemas/analytics-TrendDefinition'
    analytics-TrendDefinition:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        title:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        action:
          $ref: '#/components/schemas/analytics-Action'
        expressions:
          $ref: '#/components/schemas/analytics-EventExpressions'
        tabIndex:
          type: integer
          format: int32
          description: Currently unused. For compatibility, set to 0.
          default: 0
        aggregationType:
          type: string
          default: EVENT
          description: Currently unused. For compatibility, set to EVENT
          enum:
          - EVENT
          - CLIENT
        chartType:
          $ref: '#/components/schemas/analytics-ChartType'
      required:
      - title
      - chartType
      - action
      - expressions
      - tabIndex
      - aggregationType
    analytics-TerrariumVariable:
      type: object
      properties:
        name:
          type: string
        value: {}
      required:
      - name
      - value
    analytics-HistogramLegacyPreviewRequest:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-HistogramAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
    analytics-AnalyticsFirstMatchRequest:
      type: object
      properties:
        identifierValue:
          $ref: '#/components/schemas/analytics-IdentifierValue'
        segmentations:
          type: array
          description: An array of objects. The objects are checked in the order from the array, and when a segmentation from an object matches the profile, the value of that object's `id` is returned in the response. Note that each object can check multiple segmentations - in such cases, only one of those segmentation needs to match for the object to be considered a match.
          items:
            $ref: '#/components/schemas/analytics-FirstMatchingSegmentation'
      required:
      - identifierValue
      - segmentations
    analytics-FirstMatchingSegmentation:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: This ID will be returned in the response to identify which object contains the first matching segmentation.
        segmentationIds:
          type: array
          description: An array of segmentations to check in this entry
          items:
            type: string
            format: uuid
          minItems: 0
        query:
          type: object
          description: A segmentation query to check
          properties:
            analysis:
              $ref: '#/components/schemas/analytics-SegmentationAnalysis'
      required:
      - id
      - segmentationIds
    analytics-SegmentationBasic:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        author:
          $ref: '#/components/schemas/analytics-Author'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        segments:
          description: The number of segments in the segmentation
          type: integer
        starred:
          description: '`true` if the segmentation is added to starred items'
          type: boolean
        isPredefinedAnalytic:
          $ref: '#/components/schemas/analytics-IsPredefinedAnalytic'
        children:
          description: Analyses nested in the segmentation
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/analytics-SegmentationChild'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        variables:
          $ref: '#/components/schemas/analytics-Variables'
        sharing:
          $ref: '#/components/schemas/analytics-SharingData'
      required:
      - author
      - children
      - createdAt
      - directoryId
      - id
      - isDynamicAnalytic
      - isPredefinedAnalytic
      - name
      - segments
      - sharing
      - starred
      - updatedAt
      - usedAt
      - variables
    analytics-SegmentationChild:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        segmentationId:
          $ref: '#/components/schemas/analytics-Id'
        name:
          $ref: '#/components/schemas/analytics-Name'
      required:
      - name
      - segmentationId
    analytics-SharingData:
      type: object
      properties:
        process:
          $ref: '#/components/schemas/analytics-SharingProcessSimple'
        attribute:
          $ref: '#/components/schemas/analytics-AttributeData'
      required:
      - process
      - attribute
    analytics-SharingProcessSimple:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-SharingProcessId'
        name:
          $ref: '#/components/schemas/analytics-SharingProcessName'
        shareType:
          $ref: '#/components/schemas/analytics-SharingProcessShareType'
        automationId:
          $ref: '#/components/schemas/analytics-SharingProcessAutomationId'
        status:
          $ref: '#/components/schemas/analytics-SharingProcessStatus'
      required:
      - id
      - name
      - shareType
      - status
    analytics-AttributeData:
      type: object
      properties:
        name:
          description: Name of the attribute
          type: string
        id:
          description: Unique ID of the attribute
          type: integer
          format: int64
      required:
      - name
      - id
    analytics-SegmentationRequest:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-SegmentationAnalysis'
        isVisibleForClientProfile:
          $ref: '#/components/schemas/analytics-IsVisibleForClientProfile'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - analysis
      - isVisibleForClientProfile
    analytics-CalculatedAnalytic:
      type: object
      properties:
        analyticId:
          $ref: '#/components/schemas/analytics-AnalyticId'
        name:
          $ref: '#/components/schemas/analytics-AnalyticName'
        result:
          $ref: '#/components/schemas/analytics-CalculationResult'
      required:
      - analyticId
      - name
      - result
    analytics-AggregateHistogramRequest:
      type: object
      properties:
        variables:
          type: array
          description: A list of variable values to use in this calculation
          items:
            $ref: '#/components/schemas/analytics-Variable'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        aggregateDataBy:
          $ref: '#/components/schemas/analytics-Period'
      required:
      - aggregateDataBy
      - dateFilter
      - variables
    analytics-AggregateHistogramCalculationResponse:
      type: object
      properties:
        items:
          type: array
          description: The numerical results, divided into time units according to `aggregateDataBy`. Each object in the array holds the results for a particular aggregation period.
          items:
            $ref: '#/components/schemas/analytics-HistogramTimeDistributionItem'
        metadata:
          $ref: '#/components/schemas/analytics-HistogramMetadata'
      required:
      - items
      - metadata
    analytics-HistogramTimeDistributionItem:
      type: object
      properties:
        aggregateTimeDescription:
          type: string
          description: Time when this interval ended
        values:
          type: array
          description: The result of the aggregate
          items:
            $ref: '#/components/schemas/analytics-HistogramAggregateTimeDistributedChartItem'
      required:
      - aggregateTimeDescription
      - values
    analytics-HistogramAggregateTimeDistributedChartItem:
      type: object
      properties:
        uuid:
          description: Identifier of the value
          type: string
          format: uuid
        value:
          description: The value
          type: number
          format: double
      required:
      - metricId
      - value
    analytics-AggregatePreviewRequest:
      properties:
        identifierValue:
          $ref: '#/components/schemas/analytics-IdentifierValue'
        aggregate:
          $ref: '#/components/schemas/analytics-ClientAggregate'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - aggregate
      - identifierValue
    analytics-ClientAggregate:
      type: object
      description: The definition of an aggregate
      properties:
        aggregateType:
          x-class-name: ClientAggregateAggregateType
          type: string
          description: An aggregate with a profile context
          enum:
          - AGGREGATE
        id:
          $ref: '#/components/schemas/analytics-AnalysisOldId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        uuid:
          $ref: '#/components/schemas/analytics-AnalyticId'
        type:
          $ref: '#/components/schemas/analytics-AggregateExpressionType'
        level:
          $ref: '#/components/schemas/analytics-QuantileLevel'
        size:
          $ref: '#/components/schemas/analytics-AggregateSize'
        unique:
          $ref: '#/components/schemas/analytics-AggregateUnique'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        expressions:
          $ref: '#/components/schemas/analytics-EventExpressions'
        attribute:
          $ref: '#/components/schemas/analytics-EventAttribute'
        action:
          $ref: '#/components/schemas/analytics-Action'
      required:
      - aggregateType
      - id
      - name
      - description
      - uuid
      - type
      - level
      - size
      - unique
      - dateFilter
      - expressions
      - attribute
      - action
    analytics-RunningAggregate:
      type: object
      properties:
        aggregateType:
          description: An aggregate with an event context
          x-class-name: RunningAggregateAggregateType
          type: string
          enum:
          - RUNNING_AGGREGATE
        id:
          $ref: '#/components/schemas/analytics-AnalysisOldId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        uuid:
          $ref: '#/components/schemas/analytics-AnalyticId'
        type:
          $ref: '#/components/schemas/analytics-AggregateExpressionType'
        level:
          $ref: '#/components/schemas/analytics-QuantileLevel'
        size:
          $ref: '#/components/schemas/analytics-AggregateSize'
        unique:
          $ref: '#/components/schemas/analytics-AggregateUnique'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        expressions:
          $ref: '#/components/schemas/analytics-EventExpressions'
        attribute:
          $ref: '#/components/schemas/analytics-EventAttribute'
        action:
          $ref: '#/components/schemas/analytics-Action'
        excludeCurrent:
          $ref: '#/components/schemas/analytics-ExcludeCurrent'
        timeWindow:
          $ref: '#/components/schemas/analytics-Period'
      required:
      - aggregateType
      - id
      - name
      - description
      - uuid
      - type
      - level
      - size
      - unique
      - dateFilter
      - expressions
      - attribute
      - action
      - excludeCurrent
    analytics-AggregateTypedCalculationResponse:
      type: object
      properties:
        aggregateId:
          $ref: '#/components/schemas/analytics-AnalyticId'
        aggregateUuid:
          $ref: '#/components/schemas/analytics-AnalyticId'
        clientId:
          $ref: '#/components/schemas/analytics-ClientId'
        title:
          $ref: '#/components/schemas/analytics-AnalyticName'
        result:
          description: The result of the calculation
          anyOf:
          - type: string
          - type: number
          - type: object
          - type: boolean
          - type: array
            items: {}
        variables:
          $ref: '#/components/schemas/analytics-Variables'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        analyticVersion:
          $ref: '#/components/schemas/analytics-AnalyticVersion'
      required:
      - aggregateId
      - aggregateUuid
      - clientId
      - title
      - result
      - variables
      - dateFilter
      - analyticVersion
    analytics-AggregateResult:
      type: object
      properties:
        clientId:
          type: integer
          format: int32
          description: ID of the profile
        aggregateId:
          type: string
          format: uuid
          description: UUID of the aggregate
        name:
          type: string
          description: Name of the aggregate
        result:
          description: The result of the calculation
          anyOf:
          - type: string
          - type: number
          - type: object
          - type: boolean
          - type: array
            items: {}
      required:
      - aggregateId
      - clientId
      - name
      - result
    analytics-AggregateType:
      type: string
      enum:
      - AGGREGATE
      - RUNNING_AGGREGATE
    analytics-AggregateRequest:
      type: object
      description: Definition of the aggregate
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-AggregateAnalysis'
        isVisibleForClientProfile:
          $ref: '#/components/schemas/analytics-IsVisibleForClientProfile'
        aggregateType:
          $ref: '#/components/schemas/analytics-AggregateType'
        previewDefaultObjectId:
          $ref: '#/components/schemas/analytics-PreviewDefaultObjectId'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - analysis
      - isVisibleForClientProfile
    analytics-AggregateAnalysis:
      description: |
        Definition of the aggregate. In `attribute`, define the attribute that you want to analyze.
      discriminator:
        propertyName: aggregateType
        mapping:
          AGGREGATE: '#/components/schemas/analytics-ClientAggregate'
          RUNNING_AGGREGATE: '#/components/schemas/analytics-RunningAggregate'
      oneOf:
      - $ref: '#/components/schemas/analytics-ClientAggregate'
      - $ref: '#/components/schemas/analytics-RunningAggregate'
    analytics-AggregatePaginationContainer:
      type: object
      properties:
        data:
          type: array
          description: An array of funnels
          items:
            $ref: '#/components/schemas/analytics-AggregateSimplifiedView'
        meta:
          $ref: '#/components/schemas/analytics-Meta'
      required:
      - data
    analytics-AggregateSimplifiedView:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        author:
          $ref: '#/components/schemas/analytics-AuthorId'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        aggregateType:
          $ref: '#/components/schemas/analytics-AggregateType'
        variables:
          description: Dynamic keys used in this analysis
          type: array
          items:
            $ref: '#/components/schemas/analytics-TerrariumVariable'
      required:
      - id
      - name
      - author
      - updatedAt
      - createdAt
      - usedAt
      - directoryId
      - isDynamicAnalytic
      - aggregateType
      - variables
    analytics-AggregateView:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        oldId:
          $ref: '#/components/schemas/analytics-OldId'
        businessProfileId:
          $ref: '#/components/schemas/analytics-BusinessProfileId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        author:
          $ref: '#/components/schemas/analytics-AuthorId'
        modifier:
          $ref: '#/components/schemas/analytics-modifierId'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        analysis:
          $ref: '#/components/schemas/analytics-AggregateAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
        isPredefinedAnalytic:
          $ref: '#/components/schemas/analytics-IsPredefinedAnalytic'
        isVisibleForClientProfile:
          $ref: '#/components/schemas/analytics-IsVisibleForClientProfile'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        isDeleted:
          $ref: '#/components/schemas/analytics-IsDeleted'
        analyticVersion:
          $ref: '#/components/schemas/analytics-AnalyticVersion'
        namespace:
          $ref: '#/components/schemas/analytics-Namespace'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
        aggregateType:
          $ref: '#/components/schemas/analytics-AggregateType'
        previewDefaultObjectId:
          $ref: '#/components/schemas/analytics-PreviewDefaultObjectId'
      required:
      - id
      - oldId
      - businessProfileId
      - name
      - description
      - author
      - modifier
      - updatedAt
      - createdAt
      - usedAt
      - analysis
      - isPredefinedAnalytic
      - isVisibleForClientProfile
      - isDynamicAnalytic
      - isDeleted
      - analyticVersion
      - namespace
      - directoryId
      - aggregateType
      - previewDefaultObjectId
    analytics-PreviewDefaultObjectId:
      type: number
      format: int64
      nullable: true
      description: The ID of the default profile for generating a preview of the results.
    analytics-AggregateUpdateRequest:
      type: object
      description: Definition of the aggregate
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-AggregateAnalysis'
        isVisibleForClientProfile:
          $ref: '#/components/schemas/analytics-IsVisibleForClientProfile'
        aggregateType:
          $ref: '#/components/schemas/analytics-AggregateType'
        previewDefaultObjectId:
          $ref: '#/components/schemas/analytics-PreviewDefaultObjectId'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - analysis
      - isVisibleForClientProfile
    analytics-OldId:
      type: integer
      description: A unique numeric ID required for backwards compatibility. Cannot be changed.
    analytics-CreateRequestSankeyAnalysis:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-SankeyAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - analysis
    analytics-SankeyAnalysis:
      type: object
      description: Details of a Sankey analysis
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        title:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        sourceEvent:
          $ref: '#/components/schemas/analytics-SankeySourceEvent'
        reverseOrder:
          type: boolean
          description: |
            Defines the direction of the analysis:
            - When "false", the analysis shows paths that begin with the `sourceEvent`.
            - When "true", the analysis shows paths that end with the `sourceEvent`.
        numberOfSteps:
          type: integer
          format: int32
          minimum: 0
          description: The number of steps to analyze before or after the source event
        numberOfPaths:
          type: integer
          format: int32
          minimum: 0
          description: The number of paths to analyze
        drillDown:
          type: array
          description: An array of drilldown conditions. On each layer, an event can only have one drilldown assigned.
          items:
            $ref: '#/components/schemas/analytics-SankeyDrillDown'
        drillDownCount:
          type: integer
          nullable: true
          description: Defines the number of displayed top drilldown results.
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        filter:
          $ref: '#/components/schemas/analytics-ExpressionFilter'
        eventFilters:
          type: array
          description: An array of events to include or exclude according to the `excludeEvents` setting.
          items:
            $ref: '#/components/schemas/analytics-FunnelStep'
        excludeEvents:
          type: boolean
          description: |
            - When "true", the events defined in `eventFilters` are excluded from the analysis.
            - When "false", ONLY the events defined in `eventFilters` are included in the analysis.
        firstOccurrenceOnly:
          type: boolean
          description: When `true`, only the first occurrence of the source event is counted in the analysis.
      required:
      - id
      - title
      - description
      - sourceEvent
      - reverseOrder
      - numberOfSteps
      - numberOfPaths
      - drillDown
      - drillDownCount
      - dateFilter
      - filter
      - eventFilters
      - excludeEvents
      - firstOccurrenceOnly
    analytics-SankeySourceEvent:
      type: object
      description: The event that serves as the basis of the Sankey analysis
      properties:
        action:
          $ref: '#/components/schemas/analytics-Action'
        expressions:
          $ref: '#/components/schemas/analytics-EventExpressions'
      required:
      - action
      - expressions
    analytics-SankeyDrillDown:
      type: object
      description: A drilldown condition. On each layer, an event can only have one drilldown assigned.
      properties:
        layer:
          type: integer
          format: int32
          minimum: 0
          description: The layer where this drilldown applies. Layer indexes start at 0.
        action:
          $ref: '#/components/schemas/analytics-Action'
        attribute:
          $ref: '#/components/schemas/analytics-EventAttribute'
      required:
      - layer
      - action
      - attribute
    analytics-SankeyCalculationResponse:
      type: object
      properties:
        results:
          type: array
          description: |2

            Each array in this array is one transition.

            Each transition array includes six strings.
            - index 0 is the FROM event in the format `"<layer>_<eventId>_<drilldownResult>"`<br>Layer indexes start at 0. If you are analyzing paths starting at the sourceEvent, that event is layer 0. If you are analyzing paths that end with the sourceEvent, layer 0 is the first event in the path.<br>Drilldown result is nullified if no drilldown is defined for this event at this layer.
            - index 1 is the TO event in the same format
            - index 2 is the number of occurrences
            - index 3 is the average transition time in ms
            - index 4 is the shortest transition time in ms
            - index 5 is the longest transition time in ms

            **EXAMPLE:**

            Consider the following snippet, which includes two transitions:
            <pre><code><span>"results"</span><span>:</span> <span>[</span>
            <span>[</span>
                <span>"0_531_\"Mac OS X\""</span><span>,</span>
                <span>"1_1051_null"</span><span>,</span>
                <span>"2"</span><span>,</span>
                <span>"20"</span><span>,</span>
                <span>"10"</span><span>,</span>
                <span>"30"</span>
            <span>]</span><span>,</span>
            <span>[</span>
                <span>"1_1604_null"</span><span>,</span>
                <span>"2_6961_null"</span><span>,</span>
                <span>"1"</span><span>,</span>
                <span>"4242"</span><span>,</span>
                <span>"4242"</span><span>,</span>
                <span>"4242"</span>
            <span>]</span><span>,</span> </code></pre>
            The results of the first transition can be read as follows:

            Transition was FROM layer 0; sourceEvent (`action.id 531`); drilldown result \"Mac OS X\".

            Transition was TO layer 1; event with ID 1051, drilldown was undefined or result is null.

            Two profiles completed this transition.

            The average transition time was 20 ms, the longest time was 30 ms, and the shortest time was 10 ms.
          items:
            type: array
            items:
              type: string
    analytics-SankeyView:
      type: object
      description: A Sankey analytic view
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        businessProfileId:
          $ref: '#/components/schemas/analytics-BusinessProfileId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        author:
          $ref: '#/components/schemas/analytics-AuthorId'
        modifier:
          $ref: '#/components/schemas/analytics-modifierId'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        analysis:
          $ref: '#/components/schemas/analytics-SankeyAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
        isPredefinedAnalytic:
          $ref: '#/components/schemas/analytics-IsPredefinedAnalytic'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        isDeleted:
          $ref: '#/components/schemas/analytics-IsDeleted'
        namespace:
          $ref: '#/components/schemas/analytics-Namespace'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
      required:
      - id
      - businessProfileId
      - name
      - description
      - author
      - modifier
      - updatedAt
      - createdAt
      - usedAt
      - analysis
      - isPredefinedAnalytic
      - isDynamicAnalytic
      - isDeleted
      - namespace
      - directoryId
    analytics-FunnelCalculationResponse:
      type: object
      properties:
        calculationResult:
          type: array
          description: Funnel calculation results, listed step-by-step
          items:
            $ref: '#/components/schemas/analytics-FunnelCalculationResult'
        metadata:
          $ref: '#/components/schemas/analytics-FunnelMetadata'
        timeBetweenSteps:
          type: array
          description: Data about time between steps. The objects are arranged according to step order (the first object in the array relates to transition between step 1 and step 2). All times are in milliseconds.
          items:
            $ref: '#/components/schemas/analytics-TimeBetweenSteps'
    analytics-FunnelCalculationResult:
      type: object
      description: Calculation results, divided into steps
      properties:
        name:
          type: string
          description: Step name
        result:
          type: integer
          format: int64
          description: The number of profiles which completed this step
    analytics-FunnelMetadata:
      type: object
      description: Raw data of the calculation
      properties:
        source:
          type: array
          description: An array of results. The first item of the array is the number of profiles that matched the profile filter (if applicable), but didn't complete any steps. The second number is the number of profiles who completed the first step, and so on.
          items:
            type: integer
            format: int64
    analytics-TimeBetweenSteps:
      type: object
      description: Data about time between steps. All times are in milliseconds.
      properties:
        min:
          type: integer
          format: int64
          description: Shortest time
        max:
          type: integer
          format: int64
          description: Longest time
        avg:
          type: integer
          format: int64
          description: Average time
      required:
      - min
      - max
      - avg
    analytics-FunnelAnalysis:
      type: object
      description: Details of the funnel
      properties:
        title:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        funnel:
          $ref: '#/components/schemas/analytics-Funnel'
        filter:
          $ref: '#/components/schemas/analytics-ExpressionFilter'
      required:
      - description
      - filter
      - funnel
      - title
    analytics-FunnelView:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        businessProfileId:
          $ref: '#/components/schemas/analytics-BusinessProfileId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        author:
          $ref: '#/components/schemas/analytics-AuthorId'
        modifier:
          $ref: '#/components/schemas/analytics-modifierId'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        analysis:
          $ref: '#/components/schemas/analytics-FunnelAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
        isPredefinedAnalytic:
          $ref: '#/components/schemas/analytics-IsPredefinedAnalytic'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        isDeleted:
          $ref: '#/components/schemas/analytics-IsDeleted'
        namespace:
          $ref: '#/components/schemas/analytics-Namespace'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
      required:
      - id
      - businessProfileId
      - name
      - description
      - author
      - modifier
      - updatedAt
      - createdAt
      - usedAt
      - analysis
      - isPredefinedAnalytic
      - isDynamicAnalytic
      - isDeleted
      - namespace
      - directoryId
    analytics-FunnelRequest:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-FunnelAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - analysis
    analytics-CompletedWithin:
      type: object
      description: |
        Time constraint for completing all the steps in the funnel. Timer starts
        when the first step is triggered.

        - `period` sets the time unit
        - `value` sets the number of time units
      properties:
        period:
          $ref: '#/components/schemas/analytics-TimePeriod'
        value:
          description: The number of time units
          type: number
          format: int64
    analytics-ReportView:
      type: object
      description: Full report analysis details
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        businessProfileId:
          $ref: '#/components/schemas/analytics-BusinessProfileId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        author:
          $ref: '#/components/schemas/analytics-AuthorId'
        modifier:
          $ref: '#/components/schemas/analytics-modifierId'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        analysis:
          $ref: '#/components/schemas/analytics-ReportAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
        isPredefinedAnalytic:
          $ref: '#/components/schemas/analytics-IsPredefinedAnalytic'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        allowNull:
          $ref: '#/components/schemas/analytics-AllowNull'
        isDeleted:
          $ref: '#/components/schemas/analytics-IsDeleted'
        namespace:
          $ref: '#/components/schemas/analytics-Namespace'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
      required:
      - id
      - businessProfileId
      - name
      - description
      - author
      - modifier
      - updatedAt
      - createdAt
      - usedAt
      - analysis
      - isPredefinedAnalytic
      - isDynamicAnalytic
      - allowNull
      - isDeleted
      - namespace
      - directoryId
    analytics-ReportRequest:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-ReportAnalysis'
        allowNull:
          $ref: '#/components/schemas/analytics-AllowNull'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
    analytics-TrendRequest:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-TrendAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - analysis
    analytics-TrendView:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        businessProfileId:
          $ref: '#/components/schemas/analytics-BusinessProfileId'
        name:
          $ref: '#/components/schemas/analytics-Name'
        description:
          $ref: '#/components/schemas/analytics-Description'
        author:
          $ref: '#/components/schemas/analytics-AuthorId'
        modifier:
          $ref: '#/components/schemas/analytics-modifierId'
        updatedAt:
          $ref: '#/components/schemas/analytics-UpdatedAt'
        createdAt:
          $ref: '#/components/schemas/analytics-CreatedAt'
        usedAt:
          $ref: '#/components/schemas/analytics-UsedAt'
        analysis:
          $ref: '#/components/schemas/analytics-TrendAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
        isPredefinedAnalytic:
          $ref: '#/components/schemas/analytics-IsPredefinedAnalytic'
        isDynamicAnalytic:
          $ref: '#/components/schemas/analytics-IsDynamicAnalytic'
        isDeleted:
          $ref: '#/components/schemas/analytics-IsDeleted'
        namespace:
          $ref: '#/components/schemas/analytics-Namespace'
        directoryId:
          $ref: '#/components/schemas/analytics-DirectoryId'
      required:
      - id
      - businessProfileId
      - name
      - description
      - author
      - modifier
      - updatedAt
      - createdAt
      - usedAt
      - analysis
      - isPredefinedAnalytic
      - isDynamicAnalytic
      - isDeleted
      - namespace
      - directoryId
    analytics-TrendSignedCalculationResponse:
      type: object
      properties:
        name:
          description: Name of the resource
          type: string
        metadata:
          $ref: '#/components/schemas/analytics-TrendMetadata'
        items:
          description: Results, grouped by time unit
          type: array
          items:
            $ref: '#/components/schemas/analytics-TrendTimeDistributionItem'
        legends:
          description: Information about included trends and their display mode
          type: array
          items:
            $ref: '#/components/schemas/analytics-TrendCalculationLegend'
      required:
      - name
      - metadata
      - items
      - legends
    analytics-TrendMetadata:
      type: object
      description: Metadata of the analysis
      properties:
        aggregateDataBy:
          $ref: '#/components/schemas/analytics-TrendAggregateDataBy'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
      required:
      - aggregateDataBy
      - dateFilter
    analytics-TrendAggregateDataBy:
      type: object
      description: The interval for grouping data
      properties:
        type:
          $ref: '#/components/schemas/analytics-TimePeriod'
        value:
          $ref: '#/components/schemas/analytics-TimeValue'
      required:
      - type
      - value
    analytics-TrendTimeDistributionItem:
      type: object
      properties:
        aggregateTimeDescription:
          type: string
          description: Timestamp of the result
          format: date-time
        values:
          description: An array of the results of the included metrics
          type: array
          items:
            $ref: '#/components/schemas/analytics-TrendCalculationExpression'
      required:
      - aggregateTimeDescription
      - values
    analytics-TrendCalculationExpression:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-AnalyticId'
        countedEvents:
          type: number
          format: double
          description: The number of events that matched the trend. If the trend analyzes profiles, this value is `0.0`.
        countedClients:
          type: number
          format: double
          description: The number of profiles which matched the trend. If the trend analyzes events, this value is `0.0`.
      required:
      - id
      - countedEvents
      - countedClients
    analytics-TrendCalculationLegend:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/analytics-Id'
        title:
          $ref: '#/components/schemas/analytics-Name'
        chartType:
          $ref: '#/components/schemas/analytics-ChartType'
      required:
      - id
      - title
      - chartType
    analytics-TrendAnalysisRequest:
      type: object
      description: A trend analysis
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-TrendAnalysis'
        tags:
          description: Currently unused
          type: array
          items:
            type: string
      required:
      - analysis
    analytics-SharingProcessId:
      type: string
      format: uuid
      description: Unique identifier of the sharing process
    analytics-SharingProcessName:
      type: string
      description: Name of the sharing process
    analytics-SharingProcessAutomationId:
      type: string
      format: uuid
      description: ID of the automation which handles the sharing
    analytics-SharingProcessShareType:
      type: string
      description: Type of sharing process
      enum:
      - CROSSWORKSPACE
      - INTERNAL
    analytics-SharingProcessStatus:
      type: string
      description: Status of the sharing process
      enum:
      - ACTIVE
      - INACTIVE
      - DELETED
    analytics-Error:
      allOf:
      - type: object
        properties:
          source:
            type: object
            nullable: true
            description: Information about a parameter that caused the error, if applicable.
            properties:
              pointer:
                type: string
                description: Information about a parameter
              value:
                type: string
                nullable: true
                description: Currently unused
          errors:
            type: array
            description: An array of errors, if applicable
            items:
              $ref: '#/components/schemas/analytics-ErrorContent'
      - $ref: '#/components/schemas/analytics-ErrorContent'
    analytics-ErrorContent:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        errorCode:
          type: string
          description: Code of the error, needed for troubleshooting. See [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html).
        httpStatus:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Description of the problem
        traceId:
          type: string
          description: Currently unused
          nullable: true
        help:
          type: string
          nullable: true
          description: Currently unused
    analytics-matching:
      type: boolean
      description: When `true`, the results include only data that matched the condition. When `false`, the results include only data that did not match the condition.
      default: true
    analytics-modifierId:
      type: integer
      format: int64
      description: Unique ID of the last editor. `1` means the resource was edited by a request with workspace authorization.
    analytics-ReportMetricDefinition:
      type: object
      properties:
        metricId:
          $ref: '#/components/schemas/analytics-Id'
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        action:
          $ref: '#/components/schemas/analytics-Action'
        format:
          $ref: '#/components/schemas/analytics-MetricFormat'
        columnName:
          type: string
          description: Optional alias displayed as this metric's column header. Falls back to the underlying metric's title when null or omitted.
        grouping:
          $ref: '#/components/schemas/analytics-ReportMetricGrouping'
        groups:
          type: array
          description: |2

            The data to be included in the report. This data is called the _dimensions_ of the report.
            Each object in the array adds one dimension.
            - When you choose a metric created on the basis of one event only, you can group the results in reports only by the parameters assigned to this event.
            - When you choose a metric that is based only on the profile attributes, then you can group the results according to attributes assigned to profiles.
            - When you choose a metric that is created on the basis of events and profile attributes which don't have a common parameter, then you can group the results in reports only by attributes assigned to profiles.
            Grouping: The parameters of an event defined in this object can be used in the dimensions (`group` object) of the report. The event must be included in the metric that is the base of the report.
            Date filter: This date filter overrides the date filter in the metric.
            **Example 1:**
            You have a metric that counts page visits. You want to see the results of the report grouped by the first name of the person who visited the page.
            To achieve this, you need to add one dimension: the profile's first name. The response will include an array of objects that list the names and the number of their occurrences.

            **Example 2:**
            While using the same metric as in example 1, you add two dimensions:
            - profile's name (`firstname` param)
            - title of the page (`title` param)

            The response will include the firstname/title combinations and the number of their occurrences. For a JSON example, see the description of the response schema for this method.
          items:
            $ref: '#/components/schemas/analytics-ReportMetricGroup'
      required:
      - action
      - dateFilter
      - format
      - grouping
      - groups
      - metricId
    analytics-MetricLegacyPreview:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-MetricAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - analysis
    analytics-PathIdentifierType:
      type: string
      enum:
      - id
      - uuid
      - email
      - custom_identify
    analytics-ExpressionResult:
      type: object
      properties:
        clientId:
          type: integer
          format: int32
          description: ID of the profile
        expressionId:
          type: string
          format: uuid
          description: UUID of the expression
        name:
          type: string
          description: Name of the expression
        result:
          type: string
          description: The result of the expression
      required:
      - clientId
      - expressionId
      - name
      - result
    analytics-expressionCreateRequestBody:
      type: object
      properties:
        isVisibleForClientProfile:
          $ref: '#/components/schemas/analytics-IsVisibleForClientProfile'
        analysis:
          $ref: '#/components/schemas/analytics-ExpressionEntity'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - isVisibleForClientProfile
      - analysis
    analytics-AnalyticVersion:
      type: string
      format: uuid
      nullable: true
      description: Unique ID of this version of the resource
    analytics-HistogramDefinition:
      type: object
      description: Structure of a histogram analysis. A histogram must have a date filter - an empty (infinite) filter causes a Bad Request error due to database limits per request.
      properties:
        dateFilter:
          $ref: '#/components/schemas/analytics-DateFilter'
        period:
          $ref: '#/components/schemas/analytics-Period'
        eventMetrics:
          type: array
          description: An array of metrics in the histogram
          items:
            $ref: '#/components/schemas/analytics-HistogramMetric'
      required:
      - dateFilter
      - eventMetrics
      - period
    analytics-HistogramRequest:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/analytics-HistogramAnalysis'
        inlineAnalytics:
          $ref: '#/components/schemas/analytics-InlineAnalytics'
      required:
      - analysis
    analytics-SegmentationWithRelated:
      type: object
      properties:
        segmentationId:
          $ref: '#/components/schemas/analytics-AnalyticId'
        related:
          type: boolean
          description: '`true` if profile belongs to this segmentation.'
      required:
      - related
      - segmentationId
    api-service-TransactionMeta-apiv4:
      type: object
      description: "Any custom parameters.   \nIf you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.   \nInclude these parameters in the `metadata` object, so Synerise can redeem it automatically.\n"
      additionalProperties: true
      properties:
        promotionCode:
          $ref: '#/components/schemas/api-service-promotionCode-apiv4'
        quantityToRedeem:
          $ref: '#/components/schemas/api-service-quantityToRedeem-apiv4'
    api-service-JWTtoken-apiv4:
      type: object
      properties:
        token:
          type: string
          description: '[JWT](https://jwt.io/) token'
          example: eyJhbGciOiinvalidI6IkFQSSIsInJsbSI6ImNsaWVudCIsImN0ZCI6MTUyODM1NTgzMjEzOCwiZW1sIjoia3J6eXN6dG9mLmN6ZXJlcGFrQGdtYWlsLmNvbSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo1OTQsImNsSWQiOjUyNTQ0NjU3NCwinvalidx2XwJp-QBZ94d_EEKf41KtDCE33KhP_vTAYrs-JzbnIHgKRvG6ZRwsNOL8OTnbfbUZH4XYaqBB_tZTPPKfzHutP6GEGp7PLtu2E92JbChkVyrn8VCQ5v4z2e1-zsdgbmWcQk2g9RydaydO6NYO55suT3Hz2ZRv0AYLsG8rM1biZGdREWx9OaknVVuIo2ivehBiukL7VQ6Bu8ugjep3mn-z666a-nCMh6ZuASiQ6Geq0NSWmdDQIoCa5Hg44KzMfGRlCR2uKBXeHTD0SkwJ1VJM0sHNKwSfMXKpaX8OJ5wUJpgCzDzQwKVgxgWFp4eO_sbcvxWrpI7W0lfdCy1WKirnZ6Uh3uJ06v97GQDAQqVgBZFEpS47MrGZhTNuAG4ZbfYO7yyxVO8AHQbEC-UvZ-8DC1XZjvQ6S1uNqQIlVGcthnrxg8K6vKVhNzu6ifQI0bbsCl8bGsKkXOEK1pKR3ekckcSjNeeY2LrcdXs8F2gtkm0TjXU
    api-service-recommendationEventParams-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      properties:
        productId:
          $ref: '#/components/schemas/api-service-ItemSku-apiv4'
        name:
          $ref: '#/components/schemas/api-service-ItemName-apiv4'
        source:
          $ref: '#/components/schemas/api-service-eventSource-apiv4'
        campaignHash:
          $ref: '#/components/schemas/api-service-CampaignHash-apiv4'
        url:
          $ref: '#/components/schemas/api-service-inBodyResourceUrl-apiv4'
        category:
          $ref: '#/components/schemas/api-service-ItemCategory-apiv4'
    api-service-AiCompatBatchEventRequest-apiv4:
      type: object
      properties:
        eventType:
          type: string
          enum:
          - item.search.click
          - suggestion.search.click
          - product.search.click
          - recommendation.click
          - recommendation.view
          description: A request can only include events of the same type.
        items:
          type: array
          description: An array of events
          items:
            oneOf:
            - $ref: '#/components/schemas/api-service-ItemSearchClickEventDataCompat-apiv4'
            - $ref: '#/components/schemas/api-service-SuggestionSearchClickEventDataCompat-apiv4'
            - $ref: '#/components/schemas/api-service-RecommendationViewEventDataCompat-apiv4'
            - $ref: '#/components/schemas/api-service-RecommendationClickEventDataCompat-apiv4'
            - $ref: '#/components/schemas/api-service-ProductSearchClickEventDataCompat-apiv4'
    api-service-ItemSearchClickEventDataCompat-apiv4:
      title: item.search.click
      type: object
      required:
      - correlationId
      - clientUUID
      - position
      - searchType
      - item
      properties:
        correlationId:
          $ref: '#/components/schemas/api-service-CorrelationId-apiv4'
        clientUUID:
          $ref: '#/components/schemas/api-service-inBodyClientUuid-apiv4'
        position:
          $ref: '#/components/schemas/api-service-ItemPosition-apiv4'
        searchType:
          $ref: '#/components/schemas/api-service-SearchType-apiv4'
        item:
          $ref: '#/components/schemas/api-service-Item-apiv4'
        EventTimestamp:
          $ref: '#/components/schemas/api-service-Time-apiv4'
      additionalProperties:
        description: |
          Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

          Events accept custom, free-form parameters, with the following restrictions:

            <span style="color:red"><strong>WARNING:</strong></span>
            - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
            - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>
            <code>modifiedBy</code><br>
            <code>apiKey</code><br>
            <code>eventUUID</code><br>
            <code>ip</code><br>
            <code>time</code><br>
            <code>businessProfileId</code>
    api-service-SuggestionSearchClickEventDataCompat-apiv4:
      title: suggestion.search.click
      type: object
      required:
      - correlationId
      - clientUUID
      - position
      - searchType
      - suggestion
      properties:
        correlationId:
          $ref: '#/components/schemas/api-service-CorrelationId-apiv4'
        clientUUID:
          $ref: '#/components/schemas/api-service-inBodyClientUuid-apiv4'
        position:
          $ref: '#/components/schemas/api-service-ItemPosition-apiv4'
        searchType:
          $ref: '#/components/schemas/api-service-SearchType-apiv4'
        EventTimestamp:
          $ref: '#/components/schemas/api-service-Time-apiv4'
        suggestion:
          $ref: '#/components/schemas/api-service-Suggestion-apiv4'
      additionalProperties:
        description: |
          Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

          Events accept custom, free-form parameters, with the following restrictions:

            <span style="color:red"><strong>WARNING:</strong></span>
            - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
            - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>
            <code>modifiedBy</code><br>
            <code>apiKey</code><br>
            <code>eventUUID</code><br>
            <code>ip</code><br>
            <code>time</code><br>
            <code>businessProfileId</code>
    api-service-RecommendationViewEventDataCompat-apiv4:
      title: recommendation.view
      type: object
      required:
      - correlationId
      - clientUUID
      - items
      properties:
        correlationId:
          $ref: '#/components/schemas/api-service-CorrelationId-apiv4'
        clientUUID:
          $ref: '#/components/schemas/api-service-inBodyClientUuid-apiv4'
        items:
          $ref: '#/components/schemas/api-service-RecommendationItems-apiv4'
        EventTimestamp:
          $ref: '#/components/schemas/api-service-Time-apiv4'
        campaignId:
          $ref: '#/components/schemas/api-service-CampaignId-apiv4'
      additionalProperties:
        description: |
          Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

          Events accept custom, free-form parameters, with the following restrictions:

            <span style="color:red"><strong>WARNING:</strong></span>
            - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
            - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>
            <code>modifiedBy</code><br>
            <code>apiKey</code><br>
            <code>eventUUID</code><br>
            <code>ip</code><br>
            <code>time</code><br>
            <code>businessProfileId</code>
    api-service-RecommendationClickEventDataCompat-apiv4:
      title: recommendation.click
      type: object
      required:
      - correlationId
      - clientUUID
      - item
      properties:
        correlationId:
          $ref: '#/components/schemas/api-service-CorrelationId-apiv4'
        clientUUID:
          $ref: '#/components/schemas/api-service-inBodyClientUuid-apiv4'
        item:
          $ref: '#/components/schemas/api-service-Item-apiv4'
        campaignId:
          $ref: '#/components/schemas/api-service-CampaignId-apiv4'
        sessionId:
          type: string
          description: ID of the user session
        EventTimestamp:
          $ref: '#/components/schemas/api-service-Time-apiv4'
      additionalProperties:
        description: |
          Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

          Events accept custom, free-form parameters, with the following restrictions:

            <span style="color:red"><strong>WARNING:</strong></span>
            - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
            - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>
            <code>modifiedBy</code><br>
            <code>apiKey</code><br>
            <code>eventUUID</code><br>
            <code>ip</code><br>
            <code>time</code><br>
            <code>businessProfileId</code>
    api-service-ProductSearchClickEventDataCompat-apiv4:
      title: product.search.click
      deprecated: true
      type: object
      required:
      - correlationId
      - clientUUID
      - position
      - searchType
      - productId
      properties:
        correlationId:
          $ref: '#/components/schemas/api-service-CorrelationId-apiv4'
        clientUUID:
          $ref: '#/components/schemas/api-service-inBodyClientUuid-apiv4'
        position:
          $ref: '#/components/schemas/api-service-ItemPosition-apiv4'
        searchType:
          $ref: '#/components/schemas/api-service-SearchType-apiv4'
        productId:
          $ref: '#/components/schemas/api-service-Item-apiv4'
        EventTimestamp:
          $ref: '#/components/schemas/api-service-Time-apiv4'
      additionalProperties:
        description: |
          Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

          Events accept custom, free-form parameters, with the following restrictions:

            <span style="color:red"><strong>WARNING:</strong></span>
            - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
            - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>
            <code>modifiedBy</code><br>
            <code>apiKey</code><br>
            <code>eventUUID</code><br>
            <code>ip</code><br>
            <code>time</code><br>
            <code>businessProfileId</code>
    api-service-RecommendationViewEventData-apiv4:
      type: object
      allOf:
      - type: object
        required:
        - params
        properties:
          params:
            type: object
            description: |
              Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

              Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                <span style="color:red"><strong>WARNING:</strong></span>
                - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
                - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                <code>modifiedBy</code><br>
                <code>apiKey</code><br>
                <code>eventUUID</code><br>
                <code>ip</code><br>
                <code>time</code><br>
                <code>businessProfileId</code>
            required:
            - items
            - correlationId
            properties:
              items:
                $ref: '#/components/schemas/api-service-RecommendationItems-apiv4'
              correlationId:
                $ref: '#/components/schemas/api-service-CorrelationId-apiv4'
              campaignId:
                $ref: '#/components/schemas/api-service-CampaignId-apiv4'
            additionalProperties: true
      - $ref: '#/components/schemas/api-service-EventBase-apiv4'
    api-service-promotionCode-apiv4:
      type: string
      description: "Unique promotion ID.  \nIf you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.  \nInclude these parameters in the metadata object, so Synerise can redeem it automatically.\n"
    api-service-quantityToRedeem-apiv4:
      type: integer
      description: "The number of items to which the promotion has been applied.  \nIf you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.  \nInclude these parameters in the metadata object, so Synerise can redeem it automatically.\n"
    api-service-ItemSearchClickEventData-apiv4:
      type: object
      allOf:
      - type: object
        required:
        - params
        properties:
          params:
            type: object
            description: |
              Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

              Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                <span style="color:red"><strong>WARNING:</strong></span>
                - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
                - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                <code>modifiedBy</code><br>
                <code>apiKey</code><br>
                <code>eventUUID</code><br>
                <code>ip</code><br>
                <code>time</code><br>
                <code>businessProfileId</code>
            required:
            - item
            - correlationId
            - position
            - searchType
            properties:
              item:
                $ref: '#/components/schemas/api-service-Item-apiv4'
              correlationId:
                $ref: '#/components/schemas/api-service-CorrelationId-apiv4'
              position:
                $ref: '#/components/schemas/api-service-ItemPosition-apiv4'
              searchType:
                $ref: '#/components/schemas/api-service-SearchType-apiv4'
            additionalProperties: true
      - $ref: '#/components/schemas/api-service-EventBase-apiv4'
    api-service-Currency-apiv4:
      type: string
      description: The currency of the transaction in ISO 4217
      example: USD
    api-service-OrderId-apiv4:
      type: string
      description: |-
        ID of the transaction.
        If you want to be able to overwrite this transaction in the future, you use `eventSalt`. If you send a transaction with the same `orderId` multiple times, the system generates multiple transaction events.
      example: be466362-71e9-4bdd-ad11-bfacead5276b
    api-service-ClientChangeset-apiv4:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/api-service-inBodyClientAddress-apiv4'
        agreements:
          $ref: '#/components/schemas/api-service-Agreements-apiv4'
        attributes:
          $ref: '#/components/schemas/api-service-Attributes-apiv4-apiv4'
        avatarUrl:
          $ref: '#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4'
        birthDate:
          $ref: '#/components/schemas/api-service-inBodyClientBirthDate-apiv4'
        city:
          $ref: '#/components/schemas/api-service-inBodyClientCity-apiv4'
        company:
          $ref: '#/components/schemas/api-service-inBodyClientCompany-apiv4'
        countryCode:
          $ref: '#/components/schemas/api-service-inBodyClientCountryCode-apiv4'
        customId:
          $ref: '#/components/schemas/api-service-inBodyClientCustomId-apiv4'
        displayName:
          $ref: '#/components/schemas/api-service-inBodyClientDisplayName-apiv4'
        email:
          $ref: '#/components/schemas/api-service-inBodyClientEmail-apiv4'
        firstName:
          $ref: '#/components/schemas/api-service-inBodyClientFirstName-apiv4'
        lastName:
          $ref: '#/components/schemas/api-service-inBodyClientLastName-apiv4'
        phone:
          $ref: '#/components/schemas/api-service-inBodyClientPhone-apiv4'
        province:
          $ref: '#/components/schemas/api-service-inBodyClientProvince-apiv4'
        sex:
          $ref: '#/components/schemas/api-service-inBodyClientSex-apiv4'
        whatsAppId:
          $ref: '#/components/schemas/api-service-inBodyClientWhatsAppId-apiv4'
        zipCode:
          $ref: '#/components/schemas/api-service-inBodyClientZipCode-apiv4'
    api-service-ClientId-apiv4:
      description: |
        Unique ID. This ID is generated by the system during profile creation.

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      type: integer
      format: int64
      example: 433230297
    api-service-TagAssociation-apiv4:
      type: object
      properties:
        clientId:
          $ref: '#/components/schemas/api-service-ClientId-apiv4'
        id:
          type: integer
          format: int64
          description: ID of the assignment
          example: 73
        tagId:
          type: integer
          format: int64
          description: ID of the tag
          example: 645
    api-service-Error-apiv4:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: 12082
          description: A numeric identifier of the error type
        field:
          type: string
          example: countryCode
          description: Field in the request body that caused the error
        message:
          type: string
          example: Country Code must have 0 or 3 characters as per ISO format.
          description: A detailed description of the problem
        rejectedValue:
          type: string
          example: Poland
          description: The value that caused the error
    api-service-RegularUnitPrice-apiv4:
      description: The regular price of the items
      required:
      - amount
      - currency
      type: object
      properties:
        amount:
          type: number
          minimum: 0
          description: The price of the items
        currency:
          $ref: '#/components/schemas/api-service-Currency-apiv4'
    api-service-DiscountedUnitPrice-apiv4:
      required:
      - amount
      - currency
      description: Price after discounts
      type: object
      properties:
        amount:
          type: number
          minimum: 0
          description: The amount of currency
        currency:
          $ref: '#/components/schemas/api-service-Currency-apiv4'
    api-service-FinalUnitPrice-apiv4:
      description: Final price per unit.
      required:
      - amount
      - currency
      type: object
      properties:
        amount:
          type: number
          minimum: 0
          description: The price of the items
          example: 3.25
        currency:
          $ref: '#/components/schemas/api-service-Currency-apiv4'
    api-service-inBodyResourceUrl-apiv4:
      type: string
      description: URL address of the resource
    api-service-ItemSku-apiv4:
      type: string
      example: '189784563455'
      description: SKU of the item
    api-service-ClientCartEventRequest-apiv4:
      allOf:
      - $ref: '#/components/schemas/api-service-EventBase-apiv4'
      - required:
        - params
        type: object
        properties:
          params:
            type: object
            description: |
              Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

              Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                <span style="color:red"><strong>WARNING:</strong></span>
                - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
                - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                <code>modifiedBy</code><br>
                <code>apiKey</code><br>
                <code>eventUUID</code><br>
                <code>ip</code><br>
                <code>time</code><br>
                <code>businessProfileId</code>
            required:
            - sku
            - source
            - finalUnitPrice
            - quantity
            properties:
              sku:
                $ref: '#/components/schemas/api-service-ItemSku-apiv4'
              name:
                $ref: '#/components/schemas/api-service-ItemName-apiv4'
              category:
                $ref: '#/components/schemas/api-service-ItemCategory-apiv4'
              categories:
                $ref: '#/components/schemas/api-service-ItemCategories-apiv4'
              offline:
                $ref: '#/components/schemas/api-service-Offline-apiv4'
              source:
                $ref: '#/components/schemas/api-service-eventSource-apiv4'
              regularUnitPrice:
                $ref: '#/components/schemas/api-service-RegularUnitPrice-apiv4'
              discountedUnitPrice:
                $ref: '#/components/schemas/api-service-DiscountedUnitPrice-apiv4'
              finalUnitPrice:
                $ref: '#/components/schemas/api-service-FinalUnitPrice-apiv4'
              ItemUrlAddress:
                $ref: '#/components/schemas/api-service-ItemUrlAddress-apiv4'
              producer:
                $ref: '#/components/schemas/api-service-Producer-apiv4'
              quantity:
                $ref: '#/components/schemas/api-service-Quantity-apiv4'
            additionalProperties: true
    api-service-inBodyClientDeviceId-apiv4:
      type: string
      description: Unique Android or iOS device ID
    api-service-eventLabel-apiv4:
      type: string
      example: Human-readable label
      minLength: 1
      description: This parameter is required, but not saved in the database. It can't be used in Analytics, Automations, and so on.
    api-service-Time-apiv4:
      type: string
      description: "Time when the event occurred, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601). \n\nThis time isn't affected and doesn't affect the timezone of your workspace - you can send events with a timezone different than that of the workspace. Synerise calculates the times into UTC standard when saving events in the database.\n\nIf not defined, the backend inserts the time of receiving the event.\n\nA time with a \"Z\" at the end (for example, `2022-10-14T12:02:06Z`) denotes a time in the UTC standard.\n\nIf you want to send time in a different timezone, you can do this by appending `{+|-}hh:mm` at the end of the string.  \n\nNote that if the timezone is ahead (+) of UTC, the UTC time is calculated by subtraction. When the timezone is behind (-) UTC, the UTC time is calculated by addition.  \nFor example:\n  - if your timezone is UTC+1, append `+01:00`. When you send `2022-10-14T15:00:000+01:00`, it is saved in the database as `2022-10-14T14:00:000Z`\n  - if your timezone is UTC-8, append `-08:00`. When you send `2022-10-14T22:00:000-08:00`, it is saved in the database as `2022-10-15T06:00:000Z` (note that the date also changes between timezones in this example)\n\n**IMPORTANT**: If you send an event with a future time, the parameter is rejected and the time of receiving the event is saved as the occurrence time. For example, if your timezone is UTC+1 and you send the event at 15:00 local time, future times are:  \n- later than 15:00 local time\n- later than 14:00 UTC\n\nWhen you retrieve an event, its time is always shown as UTC. The original time string that you sent (even if it was a future time and was rejected) can be retrieved with the [activities](https://developers.synerise.com/DataManagement/DataManagement.html#tag/Activities) endpoints, as `snr-original-time`.\n"
      example: '2019-02-07T09:53:56.999+00:00'
    api-service-ApplicationstartedRequest-apiv4:
      allOf:
      - $ref: '#/components/schemas/api-service-EventBase-apiv4'
      - required:
        - params
        type: object
        properties:
          params:
            $ref: '#/components/schemas/api-service-ClientApplicationStartedEventParams-apiv4'
    api-service-GetClientevents-HTTP200-apiv4:
      type: object
      properties:
        time:
          type: string
          description: "Time when the event occurred. \n\nThis is the time that:\n- is sent as `recordedAt` to **v4/transactions/** endpoints\n- is sent as `time` to **v4/events/** endpoints\n- is the occurrence time of system events\n\nIf the event had no time provided when sending, the time of saving in the database is used.\n\nIf the event had a future time when sending, it was rejected and the time of saving in the database is used.\n\nThis is the value that needs to be used as `time` (`recordedAt` in v4/transactions endpoints) when overwriting events by using eventSalt.\n"
        action:
          type: string
          example: client.updateData
          description: The system name for the action
        label:
          $ref: '#/components/schemas/api-service-eventLabel-apiv4'
        client:
          $ref: '#/components/schemas/api-service-Client-apiv4'
        params:
          type: object
          properties:
            eventCreateTime:
              type: string
              description: |
                Time when the event was received. If the event had no time or a future time, this value is used as the time when the event occurred.

                This parameter does not exist in system events.

                When you overwrite an event with eventSalt, this value changes to the time of overwriting.
              format: date-time
              example: '2022-11-23T18:39:26.789Z'
            ip:
              description: IP of the source device. This parameter does not exist in system events.
          additionalProperties:
            description: Additional properties depending on event type and custom parameters.
          description: |
            Details of the event, depending on event type and the requirements of your own system. This can be almost any type of data.

              <span style="color:red"><strong>WARNING:</strong></span>
              - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
              - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:
              <details><summary>Click to expand the list of reserved params</summary>
              <code>modifiedBy</code><br>
              <code>apiKey</code><br>
              <code>eventUUID</code><br>
              <code>ip</code><br>
              <code>time</code><br>
              <code>businessProfileId</code>
              </details>
    api-service-LinkaClientdeviceRequest-apiv4:
      type: object
      required:
      - deviceId
      - type
      - registrationId
      properties:
        deviceId:
          $ref: '#/components/schemas/api-service-inBodyClientDeviceId-apiv4'
        registrationId:
          type: string
          description: Registration ID for [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)
        type:
          type: string
          description: Device type
          enum:
          - android
          - ios
          - windows
        bluetoothAddress:
          type: string
          description: Bluetooth MAC address of the device
        macAddress:
          type: string
          description: MAC address of the network adapter
        manufacturer:
          type: string
          description: Manufacturer of the device
        model:
          type: string
          description: Model of the device
        osVersion:
          type: string
          description: Operating system of the device
        product:
          type: string
          description: Additional information about the OS on the device
          example: a51ul_htc_europe
        screenHeight:
          type: integer
          format: int32
          description: Screen height in pixels
        screenWidth:
          type: integer
          format: int32
          description: Screen width in pixels
        publicKey:
          type: string
          description: Public key used to encrypt push messages
    api-service-inBodyClientCompany-apiv4:
      type: string
      description: |
        Profiles's company

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientBirthDate-apiv4:
      type: string
      description: 'Date of birth in the profile. Must be in `yyyy-mm-dd` format and later than `1900-01-01`. Must be a date in the past. <br>**IMPORTANT**: Months and days must be zero-padded. For example: May 3, 1993 is `1993-05-03`.'
      example: '1987-10-24'
    api-service-inBodyClientAvatarUrl-apiv4:
      type: string
      nullable: true
      description: |
        URL of the profile's avatar picture

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientDisplayName-apiv4:
      type: string
      description: Currently unused
    api-service-inBodyClientLastName-apiv4:
      type: string
      description: |
        Profile's last name

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientCustomId-apiv4:
      type: string
      description: |
        A custom ID for the Profile. It is a unique identifier.

        The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
    api-service-inBodyClientPhone-apiv4:
      type: string
      description: "Phone number of the profile\n\n- Must match the pattern (ECMA flavor): `/(^\\+[0-9 \\-()/]{6,19}$)|(^[0-9 \\-()/]{6,20}$)/`  \n- The value can't include any characters that match the pattern (ECMA flavor): `/([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])|([\\r\\n\\u2028\\u2029\\u00AD]|[\\uFE00-\\uFE0F]|[\\u0000])/`\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n"
      example: '+48111222333'
    api-service-inBodyClientWhatsAppId-apiv4:
      type: string
      nullable: true
      description: |
        WhatsApp identifier of the profile, used for WhatsApp communication.

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
      example: TestWhatsappId
    api-service-inBodyClientEmail-apiv4:
      type: string
      description: "The profile's e-mail address. \n\n- Must match the pattern (ECMA flavor): `/^(([^<>()[\\]\\\\.,;:\\s@\\\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\\\"]+)*)|(\\\\\".+\\\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/`  \n- The value can't include any characters that match the pattern (ECMA flavor): `/([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])|([\\r\\n\\u2028\\u2029\\u00AD]|[\\uFE00-\\uFE0F]|[\\u0000])/`\n\nBy default, email is a unique identifier.\n\nIf [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, this field should not be used. It is no longer an identifier. The configuration of non-unique emails includes creating an email parameter for communication.\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n"
    api-service-inBodyClientFirstName-apiv4:
      type: string
      description: |
        Profile's first name.

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientUuid-apiv4:
      type: string
      description: |
        UUID of the Profile. It is a unique identifier.

        The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      example: 07243772-008a-42e1-ba37-c3807cebde8f
    api-service-inBodyClientCity-apiv4:
      type: string
      description: |
        Profile's city of residence.

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientAddress-apiv4:
      type: string
      description: |
        Profile's street address.

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientZipCode-apiv4:
      type: string
      description: |
        Profile's zip code

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientProvince-apiv4:
      type: string
      description: |
        Profile's province of residence

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientCountryCode-apiv4:
      type: string
      description: Code of profile's country of residence in accordance with the ISO 3166 format
      example: PL
    api-service-inBodyClientSex-apiv4:
      type: string
      description: Profile's sex
      enum:
      - FEMALE
      - MALE
      - NOT_SPECIFIED
      - OTHER
    api-service-CreateClientRequestBody-apiv4:
      type: object
      properties:
        email:
          $ref: '#/components/schemas/api-service-inBodyClientEmail-apiv4'
        phone:
          $ref: '#/components/schemas/api-service-inBodyClientPhone-apiv4'
        customId:
          $ref: '#/components/schemas/api-service-inBodyClientCustomId-apiv4'
        firstName:
          $ref: '#/components/schemas/api-service-inBodyClientFirstName-apiv4'
        lastName:
          $ref: '#/components/schemas/api-service-inBodyClientLastName-apiv4'
        displayName:
          $ref: '#/components/schemas/api-service-inBodyClientDisplayName-apiv4'
        uuid:
          $ref: '#/components/schemas/api-service-inBodyClientUuid-apiv4'
        avatarUrl:
          $ref: '#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4'
        birthDate:
          $ref: '#/components/schemas/api-service-inBodyClientBirthDate-apiv4'
        company:
          $ref: '#/components/schemas/api-service-inBodyClientCompany-apiv4'
        city:
          $ref: '#/components/schemas/api-service-inBodyClientCity-apiv4'
        address:
          $ref: '#/components/schemas/api-service-inBodyClientAddress-apiv4'
        zipCode:
          $ref: '#/components/schemas/api-service-inBodyClientZipCode-apiv4'
        province:
          $ref: '#/components/schemas/api-service-inBodyClientProvince-apiv4'
        countryCode:
          $ref: '#/components/schemas/api-service-inBodyClientCountryCode-apiv4'
        sex:
          $ref: '#/components/schemas/api-service-inBodyClientSex-apiv4'
        whatsAppId:
          $ref: '#/components/schemas/api-service-inBodyClientWhatsAppId-apiv4'
        agreements:
          $ref: '#/components/schemas/api-service-Agreements-apiv4'
        attributes:
          $ref: '#/components/schemas/api-service-Attributes-apiv4-apiv4'
        tags:
          $ref: '#/components/schemas/api-service-Tags-apiv4'
    api-service-Tags-apiv4:
      type: array
      description: |
        Tags can be used to group profiles.

        Tag names (strings):
        - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
      items:
        type: string
        description: |
          Tag names (strings):
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-Attributes-apiv4-apiv4:
      type: object
      description: |
        This object contains custom attributes that can have any name (except for reserved attributes, see warning below) and data type, as required by your integration.

        The attribute names can't include any characters that match the pattern (ECMA flavor): `/[\r\n\u2028\u2029\u00AD\u0000\uFE00-\uFE0F]/`

        String values:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)

        If you want to send a date/time attribute for use in analytics, take the following into account:
        - The date/time should be formatted according to ISO 8601.
        - The time zone of the workspace affects dates/times in the attributes that DON'T have a defined timezone. Example:
            - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.
            - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.
            - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.

        <strong><span style="color:red">WARNING<span></strong>: Some attributes cannot be sent in this object and will be ignored. Some of these are reserved for system use, and others must be sent as properties of the profile in the root object of the request body instead of inside the `attributes` object.

        <details><summary><span style="background:red;color:white">Click to expand the list of reserved attributes</span></summary>
        <code>email</code><br><code>id</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br>
        <code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br>
        <code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br>
        <code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br>
        <code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br>
        <code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br>
        <code>receive_whatsapp_messages</code><br><code>whatsAppId</code><br><code>whatsapp_id</code><br>
        <code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br>
        <code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_country</code><br><code>geo_loc_isp</code><br>
        <code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>deletedAt</code><br><code>deleted_unique</code><br><code>status</code><br><code>recognized</code><br><code>previous_clients</code><br><code>testProfile</code><br>
        <code>apikey</code><br><code>apiKey</code><br><code>ApiKey</code><br><code>Apikey</code><br><code>tracker</code><br><code>snr_sdk_version</code><br><code>eventCreateTime</code><br><code>correlationId</code>
        </details>
      additionalProperties:
        description: |
          The attribute names can't include any characters that match the pattern (ECMA flavor): `/[\r\n\u2028\u2029\u00AD\u0000\uFE00-\uFE0F]/`

          String values:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-Agreements-apiv4:
      description: |-
        This object contains the marketing agreements of the Profile.

        You can also pass the values as strings (`"true"`;`"True"`/`"false"`;`"False"`) or integers (`1` for true and `0` for false).
      type: object
      properties:
        email:
          type: boolean
          description: Permission to receive marketing information by e-mail. This field has no effect if [email is not a unique identifier](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/).
          default: false
        sms:
          type: boolean
          description: Permission to receive marketing information by SMS
          default: false
        push:
          type: boolean
          description: Permission to receive push notifications
          default: false
        webPush:
          type: boolean
          description: Permission to receive webpush notifications
          default: false
        whatsApp:
          type: boolean
          description: Permission to receive marketing information via WhatsApp
          default: false
        bluetooth:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
        rfid:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
        wifi:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
    api-service-inResponseClientDetailsArray-apiv4:
      type: array
      items:
        $ref: '#/components/schemas/api-service-inResponseClientDetails-apiv4'
    api-service-inResponseClientDetails-apiv4:
      type: object
      properties:
        clientId:
          $ref: '#/components/schemas/api-service-ClientId-apiv4'
        email:
          $ref: '#/components/schemas/api-service-inBodyClientEmail-apiv4'
        phone:
          $ref: '#/components/schemas/api-service-inBodyClientPhone-apiv4'
        customId:
          $ref: '#/components/schemas/api-service-inBodyClientCustomId-apiv4'
        uuid:
          $ref: '#/components/schemas/api-service-inBodyClientUuid-apiv4'
        firstName:
          $ref: '#/components/schemas/api-service-inBodyClientFirstName-apiv4'
        lastName:
          $ref: '#/components/schemas/api-service-inBodyClientLastName-apiv4'
        displayName:
          $ref: '#/components/schemas/api-service-inBodyClientDisplayName-apiv4'
        company:
          $ref: '#/components/schemas/api-service-inBodyClientCompany-apiv4'
        address:
          $ref: '#/components/schemas/api-service-inBodyClientAddress-apiv4'
        city:
          $ref: '#/components/schemas/api-service-inBodyClientCity-apiv4'
        province:
          $ref: '#/components/schemas/api-service-inBodyClientProvince-apiv4'
        zipCode:
          $ref: '#/components/schemas/api-service-inBodyClientZipCode-apiv4'
        countryCode:
          $ref: '#/components/schemas/api-service-inBodyClientCountryCode-apiv4'
        birthDate:
          $ref: '#/components/schemas/api-service-inBodyClientBirthDate-apiv4'
        sex:
          $ref: '#/components/schemas/api-service-inBodyClientSex-apiv4'
        avatarUrl:
          $ref: '#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4'
        whatsAppId:
          $ref: '#/components/schemas/api-service-inBodyClientWhatsAppId-apiv4'
        anonymous:
          description: Information if the profile is anonymous
          type: boolean
          example: false
        agreements:
          $ref: '#/components/schemas/api-service-Agreements-apiv4'
        attributes:
          $ref: '#/components/schemas/api-service-Attributes-apiv4-apiv4'
        tags:
          $ref: '#/components/schemas/api-service-Tags-apiv4'
        previousClients:
          $ref: '#/components/schemas/api-service-PreviousClients-apiv4'
        lastActivityDate:
          deprecated: true
          type: string
          example: '2019-03-19T14:05:39Z'
          description: '**Don''t use** the values from this field. The last activity calculation mechanism is disabled and the value is always the profile''s creation date. The field will be removed in a future release.'
    api-service-PreviousClients-apiv4:
      type: array
      description: "- When retrieving profile data, this field is always empty.\n- In the response after a profile merge, the format depends on the merge type.  \n      This field only provides information about the last merge. If a profile in the last merge was the result of another merge in the past, the data of the previous merge isn't included.\n"
      items:
        oneOf:
        - type: integer
          title: Merged by ID
          description: IDs of the profiles which were merged into the target profile
        - type: object
          title: Merged by customId
          description: Profiles which were merged into the target profile
          properties:
            customId:
              type: string
              description: customId of a profile merged into the target profile
    api-service-CreateatransactionRequest-apiv4:
      required:
      - client
      - orderId
      - paymentInfo
      - products
      - revenue
      - value
      - source
      type: object
      properties:
        client:
          $ref: '#/components/schemas/api-service-Client-apiv4'
        discountAmount:
          description: How much the total cost decreased
          type: object
          nullable: true
          properties:
            amount:
              type: number
              description: The discount amount
              minimum: 0
            currency:
              $ref: '#/components/schemas/api-service-Currency-apiv4'
        metadata:
          $ref: '#/components/schemas/api-service-TransactionMeta-apiv4'
        orderId:
          $ref: '#/components/schemas/api-service-OrderId-apiv4'
        paymentInfo:
          $ref: '#/components/schemas/api-service-PaymentInfo-apiv4'
        products:
          type: array
          items:
            $ref: '#/components/schemas/api-service-Product-apiv4'
          description: "A list of items in the transaction.\n\nEach item creates a `product.buy` event. The UUID of that event is generated from a combination of:\n  - the UUID of the `transaction.charge` event created by the transaction\n  - the position of the item in this array. This has an effect on updating transaction events. \n\nThis means that when you update a transaction (a transaction can only be updated if it has an `eventSalt` and the same timestamp as the original), you must keep the original order of items in the array. Otherwise, you may accidentally overwrite a `product.buy` event with another item's event. The system does NOT recognize the item by SKU in this case.\n\n**Example**:\n  1. You create a transaction with items A, B and C (in that order).\n  2. You update the transaction and the items are now A, B, D, and C (in that order).\n  3. Because item D took the position of C in the event, it has the same UUID as C had earlier. The event of D overwrites the event of C, and C is generated as a new event.\n\nAdditionally, because events can't be deleted from the database, cancelled items remain as events in a Profile's history. You can use a custom free-form property to tag items as cancelled. This way, you can keep cancelled items in `products` when updating a transaction without breaking the order of items. You can also use the property to filter cancelled items out in Analytics.\n"
        recordedAt:
          $ref: '#/components/schemas/api-service-Time-apiv4'
        revenue:
          $ref: '#/components/schemas/api-service-Revenue-apiv4'
        value:
          required:
          - amount
          - currency
          type: object
          description: If you want to display the price before taxation, use this object. If you only want to display the price after taxation, set the values to the same as in `revenue`.
          properties:
            amount:
              type: number
              minimum: 0
              description: The total amount
              example: 112.25
            currency:
              $ref: '#/components/schemas/api-service-Currency-apiv4'
        source:
          $ref: '#/components/schemas/api-service-eventSource-apiv4'
        eventSalt:
          $ref: '#/components/schemas/api-service-EventSalt-apiv4'
    api-service-EventSalt-apiv4:
      type: string
      example: 972346context.action2019-02-07T09:53:56.999+00:00
      description: "When an event has an `eventSalt`, it can be overwritten by sending another event. The event's UUID stays the same.\n\n`eventSalt` must be unique in a workspace. An example of creating a salt is by generating a UUID or concatenating the profile ID, event's name, and timestamp, including milliseconds. This creates a value whose possibility of being duplicated is practically zero.\n\nTo overwrite an event with another one, the new event MUST:\n- have the same `eventSalt` as the original event\n- have the same date and time as the original event (If the date and time don't match the original event, event salt doesn't have any effect.)\n- belong to the same `clientId` as the original event\n- have the same action (event name) as the original event\n\n------\n**IMPORTANT**:  \n- DO NOT send the same `eventSalt` to different profiles!\n- DO NOT send the same `eventSalt` with a different action!\n- Pay attention to timezones - more details in the description of the `time` property (in v4/transactions events, it's called `recordedAt`).\n- If you send a future time in an event, it is rejected and the current time is assigned automatically. This means it's impossible to use event salt with future times.\n- An event without an `eventSalt` can't be overwritten. The parameter cannot be added to an event at a later time.\n- The parameter can't be retrieved later. You must keep track of the values that you send.  \n- In Automations that use the overwritten event as a trigger, the **automation is triggered if the new event is sent more than 72 hours after the original**. This is because the event UUID stays the same, and Automation treats events with the same UUID within 72 hours as duplicates that were sent due to an error.\n"
    api-service-HTTP400-apiv4:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: Additional details of the errors, if applicable
          items:
            $ref: '#/components/schemas/api-service-Error-apiv4'
    api-service-PaymentInfo-apiv4:
      description: Payment details
      required:
      - method
      type: object
      properties:
        method:
          description: Payment method
          type: string
          example: CASH
    api-service-Product-apiv4:
      required:
      - finalUnitPrice
      - quantity
      - sku
      type: object
      additionalProperties:
        description: Additional, free-form properties of the item
      properties:
        finalUnitPrice:
          description: Total final price of the item per unit, including tax and discounts
          required:
          - amount
          - currency
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The price of the items
              example: 3.25
            currency:
              $ref: '#/components/schemas/api-service-Currency-apiv4'
        name:
          type: string
          example: Soft drink
          description: Name of the item
        sku:
          $ref: '#/components/schemas/api-service-ItemSku-apiv4'
        categories:
          type: array
          description: A list of the item's categories
          items:
            type: string
        image:
          type: string
          description: URL of the item's image
        url:
          type: string
          description: URL of the item's page
        netUnitPrice:
          required:
          - amount
          - currency
          type: object
          description: Price before taxation (before or after discounts, depending on your implementation and discount type)
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 3.25
            currency:
              $ref: '#/components/schemas/api-service-Currency-apiv4'
        tax:
          type: number
          format: float
          description: Tax as a percentage
        quantity:
          type: number
          example: 2.5
          description: The number or amount of purchased items
        regularPrice:
          description: Regular price of the item after taxation, before discounts
          required:
          - amount
          - currency
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 3.25
            currency:
              $ref: '#/components/schemas/api-service-Currency-apiv4'
        discountPrice:
          description: Discount as an amount. For example, if the regular price is 500, and the final price is 450, the discount amount is 50.
          type: object
          required:
          - amount
          - currency
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 15.5
            currency:
              $ref: '#/components/schemas/api-service-Currency-apiv4'
        discountPercent:
          type: number
          format: float
          description: Discount as a percentage
    api-service-Client-apiv4:
      type: object
      description: |
        You must provide at least one of those profile identifiers.

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      properties:
        customId:
          $ref: '#/components/schemas/api-service-inBodyClientCustomId-apiv4'
        id:
          $ref: '#/components/schemas/api-service-ClientId-apiv4'
        uuid:
          $ref: '#/components/schemas/api-service-inBodyClientUuid-apiv4'
        email:
          $ref: '#/components/schemas/api-service-inBodyClientEmail-apiv4'
    api-service-eventSource-apiv4:
      type: string
      enum:
      - WEB_DESKTOP
      - WEB_MOBILE
      - MOBILE_APP
      - POS
      - MOBILE
      - DESKTOP
      description: "Source of the event. \n"
      example: MOBILE
    api-service-Tag-apiv4:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/api-service-TagId-apiv4'
        name:
          $ref: '#/components/schemas/api-service-TagName-apiv4'
        color:
          $ref: '#/components/schemas/api-service-TagColor-apiv4'
    api-service-TagCreate-apiv4:
      type: object
      required:
      - name
      properties:
        name:
          $ref: '#/components/schemas/api-service-TagName-apiv4'
        color:
          $ref: '#/components/schemas/api-service-TagColor-apiv4'
    api-service-TagUpdate-apiv4:
      type: object
      properties:
        color:
          $ref: '#/components/schemas/api-service-TagColor-apiv4'
    api-service-TagResponse-apiv4:
      type: object
      properties:
        businessProfileId:
          type: integer
          description: ID of the Workspace where the tag was created
          example: 100005
        id:
          $ref: '#/components/schemas/api-service-TagId-apiv4'
        name:
          $ref: '#/components/schemas/api-service-TagName-apiv4'
        color:
          $ref: '#/components/schemas/api-service-TagColor-apiv4'
    api-service-TagId-apiv4:
      description: ID of the tag
      type: integer
      format: int32
      example: 645
    api-service-TagColor-apiv4:
      description: Display color of the tag; hexadecimal value
      type: string
      example: '#0768ff'
    api-service-TagName-apiv4:
      description: Name of the tag
      type: string
      example: nice tag
    api-service-EventBase-apiv4:
      type: object
      required:
      - label
      - client
      properties:
        label:
          $ref: '#/components/schemas/api-service-eventLabel-apiv4'
        client:
          $ref: '#/components/schemas/api-service-Client-apiv4'
        time:
          $ref: '#/components/schemas/api-service-Time-apiv4'
        eventSalt:
          $ref: '#/components/schemas/api-service-EventSalt-apiv4'
    api-service-DiscountAmount-apiv4:
      description: How much the total cost decreased
      type: object
      nullable: true
      properties:
        amount:
          type: number
          description: The discount amount
          minimum: 0
        currency:
          $ref: '#/components/schemas/api-service-Currency-apiv4'
    api-service-DiscountPercent-apiv4:
      description: Discount as a percentage
      type: number
      format: float
    api-service-DiscountCode-apiv4:
      description: Discount code
      type: string
    api-service-OrderStatus-apiv4:
      description: Status of the order
      type: string
    api-service-Value-apiv4:
      required:
      - amount
      - currency
      type: object
      description: If you want to display the price without tax, use this object. If you only want to display the total price of the transaction, set the values to the same as in `revenue`.
      properties:
        amount:
          type: number
          minimum: 0
          description: The total amount
          example: 112.25
        currency:
          $ref: '#/components/schemas/api-service-Currency-apiv4'
    api-service-Revenue-apiv4:
      required:
      - amount
      - currency
      type: object
      description: Transaction revenue (amount after taxation). This field is not calculated automatically by the backend, you must provide the value by summing up the results of `finalUnitPrice * quantity` from all items in the `products` array.
      properties:
        amount:
          type: number
          minimum: 0
          description: The total amount
          example: 64.25
        currency:
          $ref: '#/components/schemas/api-service-Currency-apiv4'
    api-service-Products-apiv4:
      type: array
      items:
        $ref: '#/components/schemas/api-service-Product-apiv4'
      description: A list of items in the transaction
    api-service-ItemName-apiv4:
      type: string
      description: Item name
      example: Soft drink
    api-service-ItemCategory-apiv4:
      type: string
      description: Item category
      example: Beverages
    api-service-ItemCategories-apiv4:
      type: array
      items:
        type: string
      description: If an item belongs to more than one category, include the categories in an array
    api-service-Offline-apiv4:
      type: boolean
      description: Set to `true` if the event occurred outside a website, for example in a cash register
    api-service-ItemUrlAddress-apiv4:
      type: string
      description: URL address of the item page
    api-service-Producer-apiv4:
      type: string
      description: Manufacturer of the item
    api-service-Quantity-apiv4:
      description: The amount of goods
      type: number
    api-service-FromRecommendation-apiv4:
      type: boolean
      description: Set to `true` if the event is triggered by an element from a recommendation.
    api-service-CampaignHash-apiv4:
      type: string
      description: If the event results from a recommendation, this is the from the `x-Correlation-Id` header of AI Recommendations download
      example: 21e0d4b0-bd4e-497b-817b-4fr660284918
    api-service-DefaultParamSource-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        If you want to send a date/time param for use in analytics, take the following into account:
        - The date/time should be formatted according to ISO 8601.
        - The time zone of the workspace affects dates/times in the params that DON'T have a defined timezone. Example:
            - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.
            - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.
            - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      additionalProperties: true
    api-service-ClientApplicationStartedEventParams-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      required:
      - applicationName
      - version
      properties:
        applicationName:
          $ref: '#/components/schemas/api-service-ApplicationName-apiv4'
        version:
          $ref: '#/components/schemas/api-service-Version-apiv4'
      additionalProperties: true
    api-service-ApplicationName-apiv4:
      type: string
      description: Name of the application which sends the event
    api-service-Version-apiv4:
      type: string
      description: Version of the application which sends the event
    api-service-EventAction-apiv4:
      type: string
      example: context.action
      pattern: ^[a-zA-Z0-9\.\-_]{2,64}$
      description: |
        For custom events, enter your own action name. For pre-defined events, omit this field.<br>The action name can be up to 32 characters long and must match the following regular expression (ECMA flavor): `^[a-zA-Z0-9\\.\\-_]{2,64}$`
    api-service-EventType-apiv4:
      type: string
      description: |
        The type of event. If custom event, use `custom`.

        If other type, use the value that corresponds to the single event's endpoint.(for example, "content shared" events, which use the `/v4/events/shared` endpoint when sent as single events, have the type set to `shared`).
    api-service-CorrelationId-apiv4:
      type: string
      description: |
        `correlationId` of the request which this event relates to, for example a recommendation or search request (the parameter is included in the response to that request).
    api-service-CampaignId-apiv4:
      type: string
      description: ID of the campaign related to the event
    api-service-RecommendationItems-apiv4:
      type: array
      description: An array of items included in the recommendation. The items are identified by their `itemId` (also called `sku`, `productId`, and `retailer_part_no` in other APIs and SDKs)
      minItems: 0
      items:
        $ref: '#/components/schemas/api-service-Item-apiv4'
    api-service-Item-apiv4:
      type: string
      description: itemId (also called `sku`, `productId`, and `retailer_part_no` in other APIs and SDKs) of the item
    api-service-ItemPosition-apiv4:
      type: integer
      description: Position of the clicked item in the result list (count starts with 1)
    api-service-SearchType-apiv4:
      type: string
      description: Type of the search
      enum:
      - full-text-search
      - autocomplete
      - listing
      - visual
    api-service-Suggestion-apiv4:
      type: string
      description: Suggestion name
    automation-brain-TriggerTypeCount:
      type: object
      properties:
        triggerType:
          type: string
          description: The type of trigger node
          example: EventTrigger
        count:
          type: integer
          description: Number of running workflows with this trigger type
          example: 25
      required:
      - triggerType
      - count
    automation-brain-DiagramCountByTriggerTypeResponse:
      type: object
      properties:
        counts:
          type: array
          items:
            $ref: '#/components/schemas/automation-brain-TriggerTypeCount'
          description: List of trigger types with their workflow counts
        total:
          type: integer
          description: Total number of active workflows across all trigger types
          example: 55
      required:
      - counts
      - total
    automation-brain-DiagramStatus:
      type: string
      description: The status of the workflow
      enum:
      - Draft
      - Pending
      - Running
      - Paused
      - Stopped
    automation-brain-StatusCount:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/automation-brain-DiagramStatus'
        count:
          type: integer
          description: Number of workflows with this status
          example: 42
      required:
      - status
      - count
    automation-brain-DiagramCountByStatusResponse:
      type: object
      properties:
        counts:
          type: array
          items:
            $ref: '#/components/schemas/automation-brain-StatusCount'
          description: List of statuses with their workflow counts (always includes all 5 statuses)
        total:
          type: integer
          description: Total number of workflows across all statuses
          example: 70
      required:
      - counts
      - total
    automation-brain-DashboardDiagramMostUsedItem:
      type: object
      properties:
        diagramId:
          $ref: '#/components/schemas/automation-brain-DiagramId'
        name:
          $ref: '#/components/schemas/automation-brain-DiagramName'
        status:
          $ref: '#/components/schemas/automation-brain-DiagramStatus'
        dataPoints:
          type: integer
          description: Number of data points generated by this workflow
          example: 1500
      required:
      - diagramId
      - name
      - status
      - dataPoints
    automation-brain-PaginatedDashboardDiagramsMostUsed:
      type: object
      required:
      - data
      - meta
      properties:
        data:
          type: array
          description: An array of most used workflows
          items:
            $ref: '#/components/schemas/automation-brain-DashboardDiagramMostUsedItem'
        meta:
          $ref: '#/components/schemas/automation-brain-PaginationV2'
    automation-brain-DashboardDiagramMostTriggeredItem:
      type: object
      properties:
        diagramId:
          $ref: '#/components/schemas/automation-brain-DiagramId'
        name:
          $ref: '#/components/schemas/automation-brain-DiagramName'
        status:
          $ref: '#/components/schemas/automation-brain-DiagramStatus'
        triggeredPathsCount:
          type: integer
          description: Number of triggered paths for this workflow
          example: 320
      required:
      - diagramId
      - name
      - status
      - triggeredPathsCount
    automation-brain-PaginatedDashboardDiagramsMostTriggered:
      type: object
      required:
      - data
      - meta
      properties:
        data:
          type: array
          description: An array of most triggered workflows
          items:
            $ref: '#/components/schemas/automation-brain-DashboardDiagramMostTriggeredItem'
        meta:
          $ref: '#/components/schemas/automation-brain-PaginationV2'
    automation-brain-DashboardDiagramInProgressItem:
      type: object
      properties:
        diagramId:
          $ref: '#/components/schemas/automation-brain-DiagramId'
        name:
          $ref: '#/components/schemas/automation-brain-DiagramName'
        status:
          $ref: '#/components/schemas/automation-brain-DiagramStatus'
        journeysInProgress:
          type: integer
          description: Number of paths currently active in this workflow
          example: 42
      required:
      - diagramId
      - name
      - status
      - journeysInProgress
    automation-brain-PaginatedDashboardDiagramsInProgress:
      type: object
      required:
      - data
      - meta
      properties:
        data:
          type: array
          description: An array of workflows with at least one path in progress
          items:
            $ref: '#/components/schemas/automation-brain-DashboardDiagramInProgressItem'
        meta:
          $ref: '#/components/schemas/automation-brain-PaginationV2'
    automation-brain-DashboardUpcomingStatusChangeItem:
      type: object
      properties:
        actionType:
          type: string
          description: Type of the scheduled status change
          enum:
          - Resume
          - Pause
          - Stop
          example: Pause
        plannedAt:
          $ref: '#/components/schemas/automation-brain-PlannedAt'
        diagramId:
          $ref: '#/components/schemas/automation-brain-DiagramId'
        name:
          $ref: '#/components/schemas/automation-brain-DiagramName'
        currentStatus:
          type: string
          description: Current status of the workflow
          enum:
          - Draft
          - Running
          - Paused
          - Stopped
          - Pending
          example: Running
      required:
      - actionType
      - plannedAt
      - diagramId
      - name
      - currentStatus
    automation-brain-DashboardUpcomingTriggerItem:
      type: object
      properties:
        triggerType:
          type: string
          description: Type of the trigger
          example: RepeatTrigger
        plannedAt:
          $ref: '#/components/schemas/automation-brain-PlannedAt'
        diagramId:
          $ref: '#/components/schemas/automation-brain-DiagramId'
        name:
          $ref: '#/components/schemas/automation-brain-DiagramName'
      required:
      - plannedAt
      - diagramId
      - name
    automation-brain-PaginatedDashboardUpcomingStatusChanges:
      type: object
      required:
      - data
      - meta
      properties:
        data:
          type: array
          description: An array of upcoming status changes
          items:
            $ref: '#/components/schemas/automation-brain-DashboardUpcomingStatusChangeItem'
        meta:
          $ref: '#/components/schemas/automation-brain-PaginationV2'
    automation-brain-PaginatedDashboardUpcomingTriggers:
      type: object
      required:
      - data
      - meta
      properties:
        data:
          type: array
          description: An array of upcoming trigger events
          items:
            $ref: '#/components/schemas/automation-brain-DashboardUpcomingTriggerItem'
        meta:
          $ref: '#/components/schemas/automation-brain-PaginationV2'
    automation-brain-DashboardDiagramWithIssuesItem:
      type: object
      properties:
        diagramId:
          $ref: '#/components/schemas/automation-brain-DiagramId'
        name:
          $ref: '#/components/schemas/automation-brain-DiagramName'
        status:
          $ref: '#/components/schemas/automation-brain-DiagramStatus'
        failureCount:
          type: integer
          description: Number of failures encountered by this workflow
          example: 12
      required:
      - diagramId
      - name
      - status
      - failureCount
    automation-brain-PaginatedDashboardDiagramsWithIssues:
      type: object
      required:
      - data
      - meta
      properties:
        data:
          type: array
          description: An array of workflows with issues
          items:
            $ref: '#/components/schemas/automation-brain-DashboardDiagramWithIssuesItem'
        meta:
          $ref: '#/components/schemas/automation-brain-PaginationV2'
    automation-brain-DiagramId:
      type: string
      format: uuid
      description: UUID of the workflow
    automation-brain-DiagramName:
      type: string
      description: Name of the workflow
      example: Example workflow
    automation-brain-PointerSource:
      type: object
      description: Source of the problem
      properties:
        pointer:
          type: string
        value:
          type: string
      required:
      - pointer
    automation-brain-ErrorDetails:
      type: object
      description: Additional details
      additionalProperties:
        type: string
    automation-brain-Error:
      type: object
      properties:
        httpStatus:
          type: integer
          description: HTTP status code of error
        errorCode:
          type: string
          description: Synerise error code. See [API error reference](https://developers.synerise.com/errors.html)
        message:
          type: string
          description: A description of the problem
        timestamp:
          type: string
          format: date-time
          description: Time when the problem occurred
        help:
          type: string
          description: Link to the error reference
        traceId:
          type: string
          description: Trace ID for troubleshooting
        errors:
          type: array
          description: Array of errors
          items:
            $ref: '#/components/schemas/automation-brain-Error'
        source:
          $ref: '#/components/schemas/automation-brain-PointerSource'
        details:
          $ref: '#/components/schemas/automation-brain-ErrorDetails'
        field:
          type: string
          description: JSON field which caused a problem
      required:
      - errorCode
      - httpStatus
      - message
    automation-brain-AutomationContext:
      description: |
        Context of the workflow.
        - `Client` workflows are triggered by "Profile Event"; "Data Changed"; and "Audience" nodes.
        - `Business` workflows are triggered by "Business Event" and "Scheduled Run" nodes.
        - `Undefined` workflows have no trigger and can't be started until their configuration is finished.
      type: string
      enum:
      - Client
      - Business
      - Undefined
    automation-brain-PaginatedDiagrams:
      type: object
      required:
      - data
      - meta
      properties:
        data:
          type: array
          description: An array of workflows
          items:
            $ref: '#/components/schemas/automation-brain-DiagramDetails'
        meta:
          $ref: '#/components/schemas/automation-brain-Pagination'
    automation-brain-PaginatedDiagramsV2:
      type: object
      required:
      - data
      - meta
      properties:
        data:
          type: array
          description: An array of workflows
          items:
            $ref: '#/components/schemas/automation-brain-DiagramDetails'
        meta:
          $ref: '#/components/schemas/automation-brain-PaginationV2'
    automation-brain-DiagramDetails:
      type: object
      description: Details of the workflow
      required:
      - diagramId
      - author
      - listingAuthor
      - name
      - created
      - updated
      - status
      - scheduleStatus
      - configuration
      - catalogId
      - context
      - tags
      - description
      - hasTransformation
      - businessProfileId
      properties:
        diagramId:
          $ref: '#/components/schemas/automation-brain-DiagramId'
        author:
          description: Author of the workflow
          type: string
          example: example@synerise.com
        listingAuthor:
          type: object
          properties:
            userId:
              type: number
            clientId:
              type: number
            clientApiHash:
              type: string
            businessProfileApiHash:
              type: string
        name:
          $ref: '#/components/schemas/automation-brain-DiagramName'
        created:
          description: Creation time
          type: string
          format: date-time
          example: '2019-01-04T13:17:18.315Z'
        updated:
          description: Last update time
          type: string
          format: date-time
          example: '2019-01-04T13:17:18.315Z'
        status:
          $ref: '#/components/schemas/automation-brain-DiagramStatus'
        scheduleStatus:
          description: Workflow schedule status
          type: string
          enum:
          - 'On'
          - 'Off'
          - NoSchedule
        configuration:
          $ref: '#/components/schemas/automation-brain-DiagramConfiguration'
        catalogId:
          description: UUID of the catalog where the workflow is saved
          type: string
          example: 030a9be3-8ccc-44c7-b20b-27768816cab7
        context:
          $ref: '#/components/schemas/automation-brain-AutomationContext'
        tags:
          description: Tags associated with this workflow
          type: array
          items:
            $ref: '#/components/schemas/automation-brain-TagDetails'
        description:
          description: Workflow description
          type: string
          example: Sample workflow description
        hasTransformation:
          type: boolean
          description: '`true` if the workflow contains Data Transformation nodes'
        businessProfileId:
          type: number
    automation-brain-DiagramConfiguration:
      description: Workflow configuration
      type: object
      properties:
        capping:
          $ref: '#/components/schemas/automation-brain-LimitConfiguration'
        multipleJourneys:
          type: boolean
          description: Diagram has multiple journeys enabled
          default: false
    automation-brain-LimitConfiguration:
      type: object
      description: Capping configuration of the workflow
      required:
      - limit
      - period
      properties:
        limit:
          type: number
          description: The maximum number of times the a journey for a single profile within the limits defined in `period`
        period:
          type: object
          description: The time period for the quantitative limit defined in `limit`
          required:
          - type
          properties:
            type:
              type: string
              description: |-
                The type of time limit. `Time` is the only type available for workflows. A journey can be started X times in a period defined by `timeSeconds`.
                X is defined by the `limit` field.
              enum:
              - Time
            timeSeconds:
              type: number
              description: The length of the limit, in seconds (the limit is always calculated into seconds, even if another unit of time is used in the Synerise Web Application).
    automation-brain-TagDetails:
      type: object
      required:
      - hash
      - value
      - color
      properties:
        hash:
          type: string
          example: 030a9be3-8ccc-44c7-b20b-27768816cab7
          description: Unique ID of the tag
        value:
          type: string
          description: Name of the tag
        color:
          type: string
          description: Color of the tag, hexadecimal
          example: '#0b68ff'
        description:
          type: string
          description: Description of the tag
        icon:
          type: string
          description: URL of the tag's icon
    automation-brain-Pagination:
      type: object
      description: Pagination data
      required:
      - limit
      - page
      - totalPages
      - totalCount
      properties:
        limit:
          type: number
          example: 3
          description: Maximum number of items per page
        page:
          type: number
          example: 1
          description: Current page number
        totalPages:
          type: number
          example: 10
          description: Total number of pages
        totalCount:
          description: Total number of workflows on all pages
          type: number
          example: 29
    automation-brain-PaginationV2:
      type: object
      description: Pagination data
      required:
      - limit
      - links
      properties:
        limit:
          type: number
          example: 3
          description: Maximum number of items per page
        links:
          type: array
          description: Links to previous/next/first pages
          items:
            $ref: '#/components/schemas/automation-brain-ListingLink'
    automation-brain-ListingLink:
      type: object
      required:
      - rel
      - url
      properties:
        rel:
          type: string
          description: The type of relation
          example: first
          enum:
          - first
          - prev
          - next
        url:
          type: string
          description: Link to the page
          example: http://automation-brain/v2/diagrams?page=1&limit=10
    automation-brain-RepeatModel:
      description: Repetition times
      type: object
      required:
      - repeatType
      - body
      properties:
        repeatType:
          description: |
            Repetition type. **Currently, only `OnDate` is compatible with the Synerise Web Portal.**

            - "Interval" runs the rule after a counter finishes. Then the counter restarts.
            - "Daily" runs the rule at a specific time each day.
            - "Weekly" runs the rule on specific days of the week, at a specific time.
            - "Monthly" runs the rule on specific days of the month, at a specific time.
            - "OnDate" runs the rule once, at a specific date and time.
          type: string
          enum:
          - Interval
          - Daily
          - Weekly
          - Monthly
          - OnDate
        body:
          description: Repetition time
          oneOf:
          - $ref: '#/components/schemas/automation-brain-RepeatInterval'
          - $ref: '#/components/schemas/automation-brain-RepeatDaily'
          - $ref: '#/components/schemas/automation-brain-RepeatWeekly'
          - $ref: '#/components/schemas/automation-brain-RepeatMonthly'
          - $ref: '#/components/schemas/automation-brain-OnDate'
    automation-brain-RepeatInterval:
      title: Interval
      type: object
      required:
      - start
      - intervalSeconds
      properties:
        start:
          type: string
          description: Date and time to start counting the interval from
          format: date-time
          example: '2020-01-01T01:00:00.000'
        intervalSeconds:
          type: integer
          minimum: 3600
          maximum: 31536000
          description: The interval value in seconds
          example: 6000
    automation-brain-RepeatDaily:
      title: Daily
      type: object
      required:
      - hours
      properties:
        hours:
          type: array
          description: Used for running the rule at a specific time or times every day.
          items:
            type: string
            description: Hour with minutes
            example: '12:30'
    automation-brain-RepeatWeekly:
      title: Weekly
      type: object
      required:
      - daysOfWeek
      properties:
        daysOfWeek:
          type: array
          description: Used for running the rule on specific days of the week.
          items:
            type: object
            required:
            - day
            - dayTime
            - ruleId
            properties:
              day:
                type: integer
                description: Number of the day in the week. `1` is Monday.
              dayTime:
                type: string
                description: Hour with minutes
                example: '21:37'
              ruleId:
                type: integer
                description: Number of the rule
    automation-brain-RepeatMonthly:
      title: Monthly
      type: object
      required:
      - daysOfMonth
      properties:
        daysOfMonth:
          type: array
          description: Used for running the automation on specific days of the month.
          items:
            type: object
            required:
            - day
            - dayTime
            - ruleId
            properties:
              day:
                type: integer
                description: Days of the month with. `-1` is the last day of the month.
              dayTime:
                type: string
                description: Hour with minutes
                example: '21:37'
              ruleId:
                type: integer
                description: Number of rule
    automation-brain-OnDate:
      title: OnDate
      type: object
      required:
      - date
      properties:
        date:
          type: string
          description: A date and time when the rule runs.
          example: '2020-01-01T01:00:00.000'
    automation-brain-ExternalBlockStatsWithInfo:
      type: object
      description: The name of this object is the UUID of the node
      required:
      - type
      - entered
      properties:
        name:
          type: string
          description: Name of the node, if defined
        type:
          type: string
          description: Node type
          example: EventTrigger
        entered:
          type: integer
          format: int64
          description: The number of profiles which entered this node
        executed:
          type: integer
          format: int64
          description: 'The number of profiles which completed this node. NOT available for: Trigger nodes, End nodes, ABx Test nodes, Split Path nodes, and Merge Paths nodes.'
      additionalProperties:
        type: integer
        description: Additional statistics, depending on node type. See the [User guide](https://hub.synerise.com/docs/automation/automation-activity-tracking/#statistics-reference) for a list.
        format: int64
    automation-brain-ExternalDiagramStatsWithInfo:
      type: object
      required:
      - started
      - finished
      - inProgress
      - blocks
      properties:
        started:
          type: integer
          format: int64
          description: The number of times a workdlow was started (a trigger node was activated)
        finished:
          type: integer
          format: int64
          description: The number of times an "End" node was reached.
        inProgress:
          type: integer
          format: int64
          description: The number of profiles currently in the workflow.
        blocks:
          type: object
          description: Statistics for individual nodes.
          additionalProperties:
            $ref: '#/components/schemas/automation-brain-ExternalBlockStatsWithInfo'
    automation-brain-HTTP400:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        message:
          type: string
          description: Description of the problem
    automation-brain-ScheduledActionType:
      type: string
      description: The status to apply when the rule runs. **A stopped workflow can't be restarted**.
      enum:
      - Resume
      - Pause
      - Stop
    automation-brain-ScheduleTimezone:
      description: |
        Timezone of the schedule. Accepts these formats:
        - "Europe/Paris"
        - "-05:00"
        - "UTC-1"
      type: string
      example: Europe/Paris
    automation-brain-RuleId:
      type: string
      format: uuid
      description: Unique ID of the rule
    automation-brain-DiagramScheduleRequest:
      type: object
      properties:
        timezone:
          $ref: '#/components/schemas/automation-brain-ScheduleTimezone'
        rules:
          type: array
          description: Rules of the schedule
          items:
            type: object
            properties:
              ruleId:
                type: string
                format: uuid
                description: In POST requests, rule ID is only used in `preview` requests. It lets you match a rule with upcoming events and status changes.
              actionType:
                $ref: '#/components/schemas/automation-brain-ScheduledActionType'
              repeatModel:
                $ref: '#/components/schemas/automation-brain-RepeatModel'
            required:
            - actionType
            - repeatModel
      required:
      - timezone
      - rules
    automation-brain-DiagramSchedule:
      type: object
      properties:
        active:
          description: '`true` if schedule is enabled.'
          type: boolean
        timezone:
          $ref: '#/components/schemas/automation-brain-ScheduleTimezone'
        rules:
          type: array
          description: Rules of the schedule
          items:
            type: object
            properties:
              ruleId:
                $ref: '#/components/schemas/automation-brain-RuleId'
              actionType:
                $ref: '#/components/schemas/automation-brain-ScheduledActionType'
              repeatModel:
                $ref: '#/components/schemas/automation-brain-RepeatModel'
              listingAuthor:
                type: object
                description: Author of the rule
                properties:
                  userId:
                    type: number
                    description: Unique ID of a Synerise user
              createdAt:
                type: string
                example: 2020-01-01T01:00:00Z
                format: date-time
                description: Date and time when the rule was created
            required:
            - ruleId
            - actionType
            - repeatModel
            - listingAuthor
            - createdAt
      required:
      - active
      - timezone
      - rules
    automation-brain-ExecutedDiagramScheduleEvent:
      type: object
      properties:
        actionType:
          $ref: '#/components/schemas/automation-brain-ScheduledActionType'
        ruleId:
          $ref: '#/components/schemas/automation-brain-RuleId'
        executedAt:
          type: string
          example: 2020-01-01T01:00:00Z
          description: Date and time when the rule was executed
        timezone:
          $ref: '#/components/schemas/automation-brain-ScheduleTimezone'
        status:
          type: string
          enum:
          - Success
          - Failure
        error:
          $ref: '#/components/schemas/automation-brain-Error'
      required:
      - actionId
      - actionType
      - executedAt
      - timezone
      - status
    automation-brain-UpcomingDiagramScheduleEvent:
      type: object
      properties:
        actionType:
          $ref: '#/components/schemas/automation-brain-ScheduledActionType'
        ruleId:
          $ref: '#/components/schemas/automation-brain-RuleId'
        plannedAt:
          $ref: '#/components/schemas/automation-brain-PlannedAtNoTz'
        timezone:
          $ref: '#/components/schemas/automation-brain-ScheduleTimezone'
      required:
      - actionId
      - actionType
      - plannedAt
      - timezone
    automation-brain-UpcomingDiagramStatusChange:
      type: object
      description: A workflow status change defined by a schedule
      properties:
        status:
          type: string
          description: The status to apply
          enum:
          - Running
          - Paused
          - Stopped
        ruleId:
          $ref: '#/components/schemas/automation-brain-RuleId'
        plannedAt:
          $ref: '#/components/schemas/automation-brain-PlannedAtNoTz'
        timezone:
          $ref: '#/components/schemas/automation-brain-ScheduleTimezone'
      required:
      - actionId
      - actionType
      - plannedAt
      - timezone
    automation-brain-DiagramActionRequest:
      type: object
      properties:
        scheduleAction:
          type: string
          enum:
          - 'On'
          - 'Off'
          - NoAction
    automation-brain-HasMore:
      type: boolean
      description: '`true` when there are entries outside the start/end range'
    automation-brain-PlannedAt:
      type: string
      format: date-time
      description: Planned execution time
      example: '2024-06-15T10:00:00.000Z'
    automation-brain-PlannedAtNoTz:
      type: string
      description: The time when this rule will be executed
      example: 2020-01-01T01:00:00Z
    boxes-v2-designHideLabel:
      type: boolean
      description: When true, the label is not displayed
    boxes-v2-designPlaceholder:
      type: string
      description: Placeholder text displayed until the user fills in a value
    boxes-v2-designDescription:
      type: string
      description: The description appears under the field.
    boxes-v2-designTooltip:
      type: string
      description: Tooltip text is displayed when the user hovers over the information icon.
    boxes-v2-designTabIndex:
      type: number
      description: Tab index defines the order of field display when the user uses the **TAB** key to navigate the form.
    boxes-v2-designInitialFocus:
      type: boolean
      description: If true, the field becomes the initially focused element when the form is opened.
    boxes-v2-validationRequired:
      type: boolean
      description: When true, the field must be filled in before the form can be submitted.
    boxes-v2-validationUnique:
      type: boolean
      description: When true, the form cannot be sent if the field contains the same data that was sent before (for example, if a user is trying to send a record with a clientUUID that already exists in another record).
    boxes-v2-validationRegexPattern:
      type: string
      description: A regular expression that the entered value must match
    boxes-v2-validationErrorMessage:
      type: string
      description: The message to display if a validation error occurs
    boxes-v2-Label:
      type: string
      description: A descriptive label for the field, displayed in the UI
    boxes-v2-DataSourceDefaultValue:
      type: string
      enum:
      - FIRST
      - LAST
      description: Defines which option is initially selected when the form is opened
    boxes-v2-ValuesDataSource:
      type: object
      description: Definition of available values
      required:
      - type
      - data
      properties:
        type:
          type: string
          enum:
          - VALUES
          description: Used when the selection is from a list of values.
        data:
          type: object
          description: Value-related data
          required:
          - values
          properties:
            values:
              type: array
              description: An array of values
              items:
                $ref: '#/components/schemas/boxes-v2-LabelValue'
    boxes-v2-RelationDataSource:
      type: object
      description: Definition of relations
      required:
      - type
      - data
      properties:
        type:
          type: string
          enum:
          - RELATION
          description: Used for defining relations
        data:
          type: object
          description: Relation definition
          required:
          - rhsSchemaId
          - relationType
          properties:
            rhsSchemaId:
              type: string
              example: 0790bd7c-8c2b-4e31-b01a-eee434331800
              description: UUID of the schema that the relation refers to, called a Right-Hand Schema (RHS)
            relationType:
              type: string
              enum:
              - many_to_one
              - one_to_many
              - many_to_many
              - one_to_one
              description: |2

                *Origin schema* is the schema where this relation is defined.
                *RHS* is the schema identified by `rhsSchemaId`.
                - `one_to_many`: origin schema record can store multiple references to RHS records; RHS record can store one reference to origin schema record.
                - `many_to_one`: origin schema record can store one reference to RHS record; RHS record can store multiple references to origin schema records.
                - `many_to_many`: origin schema record can store multiple references to RHS records; RHS records can store multiple references to origin schema records.
                - `one_to_one`: origin schema record can store one reference to RHS record; RHS record can store one reference to origin schema record.
            displayField:
              type: string
              example: field1
              description: Unique name of the field whose value should represent the related record
    boxes-v2-LabelValue:
      type: object
      required:
      - label
      - value
      properties:
        label:
          type: string
          description: HTML `<label>` tag of the option
        value:
          type: string
          description: HTML `value` attribute of the option
    boxes-v2-ValueType:
      description: |
        This object represents a field that can be used for storing data.

        The name of a field (this object) cannot contain spaces or special characters other than the underscore `_`,dash `-`, or dot `.`

        This name is the ID of the field and must be unique across the schema.
      oneOf:
      - $ref: '#/components/schemas/boxes-v2-TextValueType'
      - $ref: '#/components/schemas/boxes-v2-PasswordValueType'
      - $ref: '#/components/schemas/boxes-v2-ButtonValueType'
      - $ref: '#/components/schemas/boxes-v2-SelectValueType'
      - $ref: '#/components/schemas/boxes-v2-NumberValueType'
      - $ref: '#/components/schemas/boxes-v2-CheckboxGroupValueType'
      - $ref: '#/components/schemas/boxes-v2-SwitchValueType'
      - $ref: '#/components/schemas/boxes-v2-RadioValueType'
      - $ref: '#/components/schemas/boxes-v2-FileValueType'
      discriminator:
        propertyName: type
        mapping:
          TEXT: '#/components/schemas/boxes-v2-TextValueType'
          PASSWORD: '#/components/schemas/boxes-v2-PasswordValueType'
          BUTTON: '#/components/schemas/boxes-v2-ButtonValueType'
          SELECT: '#/components/schemas/boxes-v2-SelectValueType'
          NUMBER: '#/components/schemas/boxes-v2-NumberValueType'
          CHECKBOX_GROUP: '#/components/schemas/boxes-v2-CheckboxGroupValueType'
          SWITCH: '#/components/schemas/boxes-v2-SwitchValueType'
          RADIO_GROUP: '#/components/schemas/boxes-v2-RadioValueType'
          FILE: '#/components/schemas/boxes-v2-FileValueType'
    boxes-v2-ButtonValueType:
      type: object
      title: Button value type
      required:
      - type
      - design
      - layout
      properties:
        type:
          type: string
          description: This field type renders an action button.
          enum:
          - BUTTON
        design:
          $ref: '#/components/schemas/boxes-v2-TextValueTypeDesign'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-PasswordValueTypeDesign:
      allOf:
      - $ref: '#/components/schemas/boxes-v2-TextValueTypeDesign'
    boxes-v2-PasswordValueTypeValidation:
      allOf:
      - $ref: '#/components/schemas/boxes-v2-TextValueTypeValidation'
    boxes-v2-PasswordValueType:
      type: object
      title: Password value type
      required:
      - type
      - design
      - validation
      - layout
      properties:
        type:
          type: string
          description: This field type accepts password values.
          enum:
          - PASSWORD
        design:
          $ref: '#/components/schemas/boxes-v2-PasswordValueTypeDesign'
        validation:
          $ref: '#/components/schemas/boxes-v2-PasswordValueTypeValidation'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-TextValueTypeDesign:
      type: object
      title: Text value type design
      description: Field design
      required:
      - label
      - hideLabel
      - initialFocus
      properties:
        label:
          $ref: '#/components/schemas/boxes-v2-Label'
        hideLabel:
          $ref: '#/components/schemas/boxes-v2-designHideLabel'
        placeholder:
          $ref: '#/components/schemas/boxes-v2-designPlaceholder'
        description:
          $ref: '#/components/schemas/boxes-v2-designDescription'
        tooltip:
          $ref: '#/components/schemas/boxes-v2-designTooltip'
        tabIndex:
          $ref: '#/components/schemas/boxes-v2-designTabIndex'
        initialFocus:
          $ref: '#/components/schemas/boxes-v2-designInitialFocus'
    boxes-v2-TextValueTypeValidation:
      type: object
      description: Text value type validation
      required:
      - required
      - unique
      properties:
        required:
          $ref: '#/components/schemas/boxes-v2-validationRequired'
        unique:
          $ref: '#/components/schemas/boxes-v2-validationUnique'
        minimumLength:
          type: number
          description: The minimum number of characters
        maximumLength:
          type: number
          description: The maximum number of characters
        regexPattern:
          $ref: '#/components/schemas/boxes-v2-validationRegexPattern'
        errorMessage:
          $ref: '#/components/schemas/boxes-v2-validationErrorMessage'
    boxes-v2-TextValueType:
      type: object
      title: Text value type
      required:
      - type
      - design
      - validation
      - layout
      properties:
        type:
          type: string
          description: This field type accepts text values.
          enum:
          - TEXT
        design:
          $ref: '#/components/schemas/boxes-v2-TextValueTypeDesign'
        validation:
          $ref: '#/components/schemas/boxes-v2-TextValueTypeValidation'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-FileValueTypeDesign:
      type: object
      title: File value type design
      description: Field design
      required:
      - label
      - hideLabel
      - initialFocus
      properties:
        label:
          $ref: '#/components/schemas/boxes-v2-Label'
        hideLabel:
          $ref: '#/components/schemas/boxes-v2-designHideLabel'
        description:
          $ref: '#/components/schemas/boxes-v2-designDescription'
        tooltip:
          $ref: '#/components/schemas/boxes-v2-designTooltip'
        tabIndex:
          $ref: '#/components/schemas/boxes-v2-designTabIndex'
        initialFocus:
          $ref: '#/components/schemas/boxes-v2-designInitialFocus'
    boxes-v2-FileValueTypeData:
      type: object
      description: File value type data
      additionalProperties: true
    boxes-v2-FileValueTypeValidation:
      type: object
      description: File value type validation
      additionalProperties: true
    boxes-v2-FileValueType:
      type: object
      title: File value type
      required:
      - type
      - design
      - data
      - validation
      - layout
      properties:
        type:
          type: string
          description: This field type accepts file values.
          enum:
          - FILE
        design:
          $ref: '#/components/schemas/boxes-v2-FileValueTypeDesign'
        data:
          $ref: '#/components/schemas/boxes-v2-FileValueTypeData'
        validation:
          $ref: '#/components/schemas/boxes-v2-FileValueTypeValidation'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-SelectValueTypeDesign:
      type: object
      title: Select value design
      description: Field design
      required:
      - label
      - hideLabel
      - initialFocus
      properties:
        label:
          $ref: '#/components/schemas/boxes-v2-Label'
        hideLabel:
          $ref: '#/components/schemas/boxes-v2-designHideLabel'
        placeholder:
          $ref: '#/components/schemas/boxes-v2-designPlaceholder'
        description:
          $ref: '#/components/schemas/boxes-v2-designDescription'
        tooltip:
          $ref: '#/components/schemas/boxes-v2-designTooltip'
        tabIndex:
          $ref: '#/components/schemas/boxes-v2-designTabIndex'
        initialFocus:
          $ref: '#/components/schemas/boxes-v2-designInitialFocus'
    boxes-v2-SelectValueTypeData:
      type: object
      description: Select value type data or details of the relation between schemas
      required:
      - source
      properties:
        source:
          $ref: '#/components/schemas/boxes-v2-SelectValueTypeDataSource'
    boxes-v2-SelectValueTypeDataSource:
      description: Defines the source of values or relations available for selection.
      oneOf:
      - $ref: '#/components/schemas/boxes-v2-ValuesDataSource'
      - $ref: '#/components/schemas/boxes-v2-RelationDataSource'
      discriminator:
        propertyName: type
        mapping:
          VALUES: '#/components/schemas/boxes-v2-ValuesDataSource'
          RELATION: '#/components/schemas/boxes-v2-RelationDataSource'
    boxes-v2-SelectValueTypeValidation:
      type: object
      description: Select value type validation
      required:
      - required
      - unique
      properties:
        required:
          $ref: '#/components/schemas/boxes-v2-validationRequired'
        unique:
          $ref: '#/components/schemas/boxes-v2-validationUnique'
        errorMessage:
          $ref: '#/components/schemas/boxes-v2-validationErrorMessage'
    boxes-v2-SelectValueType:
      type: object
      title: Select value type
      required:
      - type
      - design
      - data
      - validation
      - layout
      properties:
        type:
          type: string
          description: This field type accepts select values and is also used for creating relations between schemas.
          enum:
          - SELECT
        design:
          $ref: '#/components/schemas/boxes-v2-SelectValueTypeDesign'
        data:
          $ref: '#/components/schemas/boxes-v2-SelectValueTypeData'
        validation:
          $ref: '#/components/schemas/boxes-v2-SelectValueTypeValidation'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-NumberValueTypeDesign:
      type: object
      title: Number value type design
      description: Field design
      required:
      - label
      - hideLabel
      - initialFocus
      properties:
        label:
          $ref: '#/components/schemas/boxes-v2-Label'
        hideLabel:
          $ref: '#/components/schemas/boxes-v2-designHideLabel'
        placeholder:
          $ref: '#/components/schemas/boxes-v2-designPlaceholder'
        description:
          $ref: '#/components/schemas/boxes-v2-designDescription'
        tooltip:
          $ref: '#/components/schemas/boxes-v2-designTooltip'
        tabIndex:
          $ref: '#/components/schemas/boxes-v2-designTabIndex'
        initialFocus:
          $ref: '#/components/schemas/boxes-v2-designInitialFocus'
    boxes-v2-NumberValueTypeData:
      type: object
      description: Number value type data
      required:
      - decimalPlaces
      properties:
        decimalPlaces:
          type: number
          description: Number of digits after the decimal separator
    boxes-v2-NumberValueTypeValidation:
      type: object
      description: Number value type validation
      required:
      - required
      - unique
      properties:
        required:
          $ref: '#/components/schemas/boxes-v2-validationRequired'
        unique:
          $ref: '#/components/schemas/boxes-v2-validationUnique'
        minimumValue:
          type: number
          description: The minimum value
        maximumValue:
          type: number
          description: The maximum value
        regexPattern:
          $ref: '#/components/schemas/boxes-v2-validationRegexPattern'
        errorMessage:
          $ref: '#/components/schemas/boxes-v2-validationErrorMessage'
    boxes-v2-NumberValueType:
      type: object
      title: Number value type
      required:
      - type
      - design
      - data
      - validation
      - layout
      properties:
        type:
          type: string
          description: This field type accepts number fields.
          enum:
          - NUMBER
        design:
          $ref: '#/components/schemas/boxes-v2-NumberValueTypeDesign'
        data:
          $ref: '#/components/schemas/boxes-v2-NumberValueTypeData'
        validation:
          $ref: '#/components/schemas/boxes-v2-NumberValueTypeValidation'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-CheckboxGroupValueTypeDesign:
      type: object
      title: CheckboxGroup value type design
      description: Field design
      required:
      - label
      - hideLabel
      - initialFocus
      properties:
        label:
          $ref: '#/components/schemas/boxes-v2-Label'
        hideLabel:
          $ref: '#/components/schemas/boxes-v2-designHideLabel'
        description:
          $ref: '#/components/schemas/boxes-v2-designDescription'
        tooltip:
          $ref: '#/components/schemas/boxes-v2-designTooltip'
        tabIndex:
          $ref: '#/components/schemas/boxes-v2-designTabIndex'
        initialFocus:
          $ref: '#/components/schemas/boxes-v2-designInitialFocus'
    boxes-v2-CheckboxGroupValueTypeData:
      type: object
      description: Checkbox value data source
      required:
      - source
      properties:
        source:
          $ref: '#/components/schemas/boxes-v2-ValuesDataSource'
    boxes-v2-CheckboxGroupValueTypeValidation:
      type: object
      description: Checkbox Group value type validation
      required:
      - required
      properties:
        required:
          $ref: '#/components/schemas/boxes-v2-validationRequired'
        minimumAmount:
          type: number
          description: The minimal allowed number of check boxes
        maximumAmount:
          type: number
          description: The maximal allowed number of check boxes
        errorMessage:
          $ref: '#/components/schemas/boxes-v2-validationErrorMessage'
    boxes-v2-CheckboxGroupValueType:
      type: object
      title: Checkbox group value type
      required:
      - type
      - design
      - data
      - validation
      - layout
      properties:
        type:
          type: string
          enum:
          - CHECKBOX_GROUP
          description: This field type creates checkboxes.
        design:
          $ref: '#/components/schemas/boxes-v2-CheckboxGroupValueTypeDesign'
        data:
          $ref: '#/components/schemas/boxes-v2-CheckboxGroupValueTypeData'
        validation:
          $ref: '#/components/schemas/boxes-v2-CheckboxGroupValueTypeValidation'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-SwitchValueTypeDesign:
      type: object
      title: Switch value type design
      description: Field design
      required:
      - label
      - hideLabel
      - initialFocus
      properties:
        label:
          $ref: '#/components/schemas/boxes-v2-Label'
        hideLabel:
          $ref: '#/components/schemas/boxes-v2-designHideLabel'
        description:
          $ref: '#/components/schemas/boxes-v2-designDescription'
        tooltip:
          $ref: '#/components/schemas/boxes-v2-designTooltip'
        tabIndex:
          $ref: '#/components/schemas/boxes-v2-designTabIndex'
        initialFocus:
          $ref: '#/components/schemas/boxes-v2-designInitialFocus'
    boxes-v2-SwitchValueTypeData:
      type: object
      description: Switch value type data
      required:
      - defaultValue
      properties:
        defaultValue:
          type: boolean
          description: If true, the default state of the switch (toggle) when opening the form is ON.
    boxes-v2-SwitchValueType:
      type: object
      title: Switch value type
      required:
      - type
      - data
      - design
      - layout
      properties:
        type:
          type: string
          description: This field type creates switches (toggles).
          enum:
          - SWITCH
        design:
          $ref: '#/components/schemas/boxes-v2-SwitchValueTypeDesign'
        data:
          $ref: '#/components/schemas/boxes-v2-SwitchValueTypeData'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-RadioValueTypeDesign:
      type: object
      title: Radio value type design
      description: Field design
      required:
      - label
      - hideLabel
      - initialFocus
      properties:
        label:
          $ref: '#/components/schemas/boxes-v2-Label'
        hideLabel:
          $ref: '#/components/schemas/boxes-v2-designHideLabel'
        description:
          $ref: '#/components/schemas/boxes-v2-designDescription'
        tooltip:
          $ref: '#/components/schemas/boxes-v2-designTooltip'
        tabIndex:
          $ref: '#/components/schemas/boxes-v2-designTabIndex'
        initialFocus:
          $ref: '#/components/schemas/boxes-v2-designInitialFocus'
    boxes-v2-RadioValueTypeData:
      type: object
      description: Radio value type data
      required:
      - defaultValue
      - source
      properties:
        defaultValue:
          $ref: '#/components/schemas/boxes-v2-DataSourceDefaultValue'
        source:
          $ref: '#/components/schemas/boxes-v2-ValuesDataSource'
    boxes-v2-RadioValueType:
      type: object
      title: Radio value type
      required:
      - type
      - data
      - design
      - layout
      properties:
        type:
          type: string
          description: This field type creates radio buttons.
          enum:
          - RADIO_GROUP
        design:
          $ref: '#/components/schemas/boxes-v2-RadioValueTypeDesign'
        data:
          $ref: '#/components/schemas/boxes-v2-RadioValueTypeData'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-TypeLayout:
      type: object
      description: Layout of the item within its parent element
      required:
      - marginTop
      - marginRight
      - marginBottom
      - marginLeft
      properties:
        marginTop:
          type: string
          description: Top margin of the element
          example: 15px
        marginRight:
          type: string
          description: Right margin of the element
          example: 1cm
        marginBottom:
          type: string
          description: Bottom margin of the element
          example: 12pt
        marginLeft:
          type: string
          description: Left margin of the element
          example: 1.0em
    boxes-v2-Value:
      description: Each object is named after the corresponding field in the schema or the relation it refers to.
      oneOf:
      - $ref: '#/components/schemas/boxes-v2-TextValue'
      - $ref: '#/components/schemas/boxes-v2-SelectValue'
      - $ref: '#/components/schemas/boxes-v2-NumberValue'
      - $ref: '#/components/schemas/boxes-v2-CheckboxGroupValue'
      - $ref: '#/components/schemas/boxes-v2-SwitchValue'
      - $ref: '#/components/schemas/boxes-v2-RadioValue'
      - $ref: '#/components/schemas/boxes-v2-RelationValue'
    boxes-v2-TextValue:
      type: object
      title: Text
      properties:
        value:
          type: string
          example: This is my first task
          description: Text input
    boxes-v2-SelectValue:
      type: object
      title: Select
      properties:
        value:
          type: string
          example: Selected value
          description: Select value
        recordId:
          type: string
          format: uuid
          description: UUID of the related record (single relation)
        recordIds:
          type: array
          description: An array of related record UUIDs (multiple relations)
          items:
            type: string
            format: uuid
    boxes-v2-NumberValue:
      type: object
      title: Number
      properties:
        value:
          type: string
          example: '33'
          description: Numerical input. **The value is sent as a string.**
    boxes-v2-CheckboxGroupValue:
      type: object
      title: Checkbox
      properties:
        values:
          type: array
          items:
            type: string
          description: The checkboxes that were selected
    boxes-v2-SwitchValue:
      type: object
      title: Switch
      required:
      - value
      properties:
        value:
          type: boolean
          description: When `true`, the toggle is switched on.
          example: 'false'
    boxes-v2-RadioValue:
      type: object
      title: Radio
      properties:
        value:
          type: string
          example: my favourite hobby
          description: Selected radio value
    boxes-v2-RelationValue:
      type: object
      title: Relation
      required:
      - recordId
      properties:
        recordId:
          type: string
          format: uuid
          description: Related record ID
    boxes-v2-CustomCssClass:
      type: string
      description: CSS class to assign to the element
    boxes-v2-SingleLayout:
      type: object
      title: Input field
      required:
      - type
      - fieldName
      properties:
        type:
          type: string
          enum:
          - SINGLE
          example: SINGLE
          description: The "single" layout must be the final element in each layout structure. It is the only layout that allows the display of fields.
        fieldName:
          type: string
          description: The input field is identified by the name of that field's object (not the `label` property).
    boxes-v2-ColumnsLayout:
      type: object
      title: Columns layout
      required:
      - type
      - columns
      - design
      properties:
        type:
          type: string
          enum:
          - COLUMNS
          example: COLUMNS
          description: This element defines a two-column layout. A column layout may include other layouts, allowing you to build complex structures.
        columns:
          type: array
          description: An array of columns. Each column may contain a number of layouts or fields.
          items:
            type: array
            items:
              $ref: '#/components/schemas/boxes-v2-LayoutItem'
        design:
          $ref: '#/components/schemas/boxes-v2-ColumnDesign'
    boxes-v2-ColumnDesign:
      type: object
      title: Column design
      description: Columns design
      required:
      - display
      - layout
      properties:
        display:
          $ref: '#/components/schemas/boxes-v2-ColumnDisplay'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-ColumnDisplay:
      type: object
      title: Column display
      description: Columns display configuration
      required:
      - customCssClass
      - columnProperties
      - columnGap
      properties:
        customCssClass:
          $ref: '#/components/schemas/boxes-v2-CustomCssClass'
        columnProperties:
          type: array
          title: Column properties
          description: Column properties
          default: []
          items:
            $ref: '#/components/schemas/boxes-v2-ColumnProperty'
        columnGap:
          type: string
          description: The width of the gap between columns
          example: 24px
    boxes-v2-ColumnProperty:
      type: object
      title: Columns property
      required:
      - column
      - width
      properties:
        column:
          type: number
          description: Column number (left to right, starting with 1)
        width:
          type: string
          description: Column width
          example: 20%
    boxes-v2-TableLayout:
      type: object
      title: Table layout
      required:
      - type
      - cells
      - design
      properties:
        type:
          type: string
          enum:
          - TABLE
          example: TABLE
          description: This element defines a table layout. A table layout may include other layouts, allowing you to build complex structures.
        cells:
          type: array
          description: An array of table cells. Each cell may contain a number of layouts or fields.
          items:
            type: array
            items:
              type: array
              items:
                $ref: '#/components/schemas/boxes-v2-LayoutItem'
        design:
          $ref: '#/components/schemas/boxes-v2-TableDesign'
    boxes-v2-TableDesign:
      type: object
      title: Table design
      description: Table design
      required:
      - display
      - layout
      properties:
        display:
          $ref: '#/components/schemas/boxes-v2-TableDisplay'
        layout:
          $ref: '#/components/schemas/boxes-v2-TypeLayout'
    boxes-v2-TableDisplay:
      type: object
      title: Table display
      description: Table display configuration
      required:
      - customCssClass
      - isStriped
      - isBordered
      - isHover
      - isCondensed
      properties:
        customCssClass:
          $ref: '#/components/schemas/boxes-v2-CustomCssClass'
        isStriped:
          type: boolean
          description: Defines if the table is striped (every second row has a colored background for better readability).
        isBordered:
          type: boolean
          description: Defines if the table has borders.
        isHover:
          type: boolean
          description: Defines if rows are highlighted when hovered.
        isCondensed:
          type: boolean
          description: Condenses the size of the table.
    boxes-v2-Layout:
      type: array
      title: Layout
      description: The graphical layout of the schema. The layouts are displayed according to their order in the array.
      items:
        $ref: '#/components/schemas/boxes-v2-LayoutItem'
    boxes-v2-LayoutItem:
      title: Input field, column layout, or table layout
      oneOf:
      - $ref: '#/components/schemas/boxes-v2-SingleLayout'
      - $ref: '#/components/schemas/boxes-v2-ColumnsLayout'
      - $ref: '#/components/schemas/boxes-v2-TableLayout'
      discriminator:
        propertyName: type
        mapping:
          SINGLE: '#/components/schemas/boxes-v2-SingleLayout'
          COLUMNS: '#/components/schemas/boxes-v2-ColumnsLayout'
          TABLE: '#/components/schemas/boxes-v2-TableLayout'
    boxes-v2-Fields:
      type: object
      description: The fields define the data that can be entered into a record.
      additionalProperties:
        $ref: '#/components/schemas/boxes-v2-ValueType'
    boxes-v2-EqualFieldValueRelationConstraint:
      type: object
      description: Field of one record is equal to second one.
      required:
      - type
      - schemaFieldName
      - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
          - equal
          description: This value is used when a record of this schema has to have field equal to record related by relation.
        schemaFieldName:
          type: string
          description: Name of record of this schema's field.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueGreaterThanRelationConstraint:
      type: object
      description: Field of related record is greater than provided value.
      required:
      - type
      - value
      - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
          - greater_than
          description: This value is used when a related record field's value should be greater than provided value.
        value:
          type: string
          description: Provided value.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueGreaterThanOrEqualRelationConstraint:
      type: object
      description: Field of related record is greater than or equal to provided value.
      required:
      - type
      - value
      - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
          - greater_than_or_equal
          description: This value is used when a related record field's value should be greater than or equal to provided value.
        value:
          type: string
          description: Provided value.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueLessThanRelationConstraint:
      type: object
      description: Field of related record is less than provided value.
      required:
      - type
      - value
      - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
          - less_than
          description: This value is used when a related record field's value should be less than provided value.
        value:
          type: string
          description: Provided value.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueLessThanOrEqualRelationConstraint:
      type: object
      description: Field of related record have value that is less than or equal to provided value.
      required:
      - type
      - value
      - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
          - less_than_or_equal
          description: This value is used when a related record field's value should be less than or equal to provided value.
        value:
          type: string
          description: Provided value.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueBetweenRelationConstraint:
      type: object
      description: Field of related record is less than or equal to provided value.
      required:
      - type
      - from
      - to
      - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
          - between
          description: This value is used when a related record field's value should be between provided values.
        from:
          type: string
          description: Provided value (from).
        to:
          type: string
          description: Provided value (to).
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-FieldValueEqualToConstantRelationConstraint:
      type: object
      description: Field of related record is equal to provided value.
      required:
      - type
      - value
      - relatedSchemaFieldName
      properties:
        type:
          type: string
          enum:
          - equal_to_constant
          description: This value is used when a related record field's value should be equal to provided value.
        value:
          type: string
          description: Provided value.
        relatedSchemaFieldName:
          type: string
          description: Name of record of related schema's field.
    boxes-v2-SchemaRelationConstraint:
      title: Schema relation constraint.
      oneOf:
      - $ref: '#/components/schemas/boxes-v2-EqualFieldValueRelationConstraint'
      - $ref: '#/components/schemas/boxes-v2-FieldValueGreaterThanRelationConstraint'
      - $ref: '#/components/schemas/boxes-v2-FieldValueGreaterThanOrEqualRelationConstraint'
      - $ref: '#/components/schemas/boxes-v2-FieldValueLessThanRelationConstraint'
      - $ref: '#/components/schemas/boxes-v2-FieldValueLessThanOrEqualRelationConstraint'
      - $ref: '#/components/schemas/boxes-v2-FieldValueBetweenRelationConstraint'
      - $ref: '#/components/schemas/boxes-v2-FieldValueEqualToConstantRelationConstraint'
    boxes-v2-SchemaRelationOne:
      title: One relation per record
      type: object
      required:
      - type
      - schemaId
      properties:
        type:
          type: string
          enum:
          - one
          description: This value is used when a record of this schema can be related to one record of the schema identified by `schemaId`.
        schemaId:
          type: string
          example: 0790bd7c-8c2b-4e31-b01a-eee434331800
          description: UUID of the schema that the relation refers to
        constraints:
          type: array
          description: An array of relation constraints.
          items:
            $ref: '#/components/schemas/boxes-v2-SchemaRelationConstraint'
    boxes-v2-SchemaRelationMany:
      title: Many relations per record
      type: object
      required:
      - type
      - schemaId
      properties:
        type:
          type: string
          enum:
          - many
          description: This value is used when a record of this schema can be related to more than one record of the schema identified by `schemaId`.
        schemaId:
          type: string
          example: 0790bd7c-8c2b-4e31-b01a-eee434331800
          description: UUID of the schema that the relation refers to
        constraints:
          type: array
          description: An array of relation constraints.
          items:
            $ref: '#/components/schemas/boxes-v2-SchemaRelationConstraint'
    boxes-v2-SchemaRelationItem:
      description: Each object is named after the relation it refers to.
      oneOf:
      - $ref: '#/components/schemas/boxes-v2-SchemaRelationOne'
      - $ref: '#/components/schemas/boxes-v2-SchemaRelationMany'
    boxes-v2-SchemaRelations:
      type: object
      description: This object stores information (as objects) about relations to other schemas.
      additionalProperties:
        $ref: '#/components/schemas/boxes-v2-SchemaRelationItem'
    boxes-v2-RecordRelationOne:
      title: One relation
      type: object
      required:
      - type
      - recordId
      properties:
        type:
          type: string
          enum:
          - one
          description: This value is used when a record can store relations to only one other record.
        recordId:
          type: string
          example: 0790bd7c-8c2b-4e31-b01a-eee434331800
          description: UUID of the related record
    boxes-v2-RecordRelationMany:
      title: Many relations
      type: object
      required:
      - type
      - recordIds
      properties:
        type:
          type: string
          enum:
          - many
          description: This value is used when a record can store relations to more than one other record.
        recordIds:
          type: array
          description: An array of related record UUIDs
          items:
            $ref: '#/components/schemas/boxes-v2-RecordId'
    boxes-v2-RecordRelationItem:
      title: Relation
      description: Each object is named after the relation it references.
      discriminator:
        propertyName: type
        mapping:
          one: '#/components/schemas/boxes-v2-RecordRelationOne'
          many: '#/components/schemas/boxes-v2-RecordRelationMany'
      oneOf:
      - $ref: '#/components/schemas/boxes-v2-RecordRelationOne'
      - $ref: '#/components/schemas/boxes-v2-RecordRelationMany'
    boxes-v2-RecordRelations:
      type: object
      description: This objects stores information (as objects) about relations to other records. Each object is named after the relation. For an example of relation usage, see the description of [this endpoint](#operation/addRelationToSchema)
      additionalProperties:
        $ref: '#/components/schemas/boxes-v2-RecordRelationItem'
    boxes-v2-SchemaInput:
      type: object
      required:
      - schemaName
      - layout
      - fields
      properties:
        schemaName:
          $ref: '#/components/schemas/boxes-v2-SchemaName'
        primaryKey:
          $ref: '#/components/schemas/boxes-v2-SchemaPrimaryKey'
        fields:
          $ref: '#/components/schemas/boxes-v2-Fields'
        layout:
          $ref: '#/components/schemas/boxes-v2-Layout'
        tags:
          $ref: '#/components/schemas/boxes-v2-SchemaTags'
    boxes-v2-SchemaPrimaryKey:
      oneOf:
      - $ref: '#/components/schemas/boxes-v2-SchemaPrimaryKeyAuto'
      - $ref: '#/components/schemas/boxes-v2-SchemaPrimaryKeySingleField'
      discriminator:
        propertyName: type
        mapping:
          auto_pk: '#/components/schemas/boxes-v2-SchemaPrimaryKeyAuto'
          single_field_pk: '#/components/schemas/boxes-v2-SchemaPrimaryKeySingleField'
    boxes-v2-SchemaPrimaryKeyAuto:
      type: object
      required:
      - type
      properties:
        type:
          type: string
          enum:
          - auto_pk
    boxes-v2-SchemaPrimaryKeySingleField:
      type: object
      required:
      - type
      - fieldName
      properties:
        type:
          type: string
          enum:
          - single_field_pk
        fieldName:
          type: string
          description: Name of field of valid type in schema
    boxes-v2-SchemaTags:
      type: array
      description: Tags assigned to the schema
      items:
        type: string
        description: Name of the tag
    boxes-v2-SchemaName:
      type: string
      example: firstSchema
      description: Name of the schema
    boxes-v2-Schema:
      type: object
      required:
      - businessProfileId
      - primaryKey
      - schemaName
      - schemaId
      - createdAt
      - createdBy
      - modifiedAt
      - modifiedBy
      - fields
      - layout
      - relations
      - tags
      - permissionStatus
      properties:
        businessProfileId:
          type: integer
          example: '48'
          description: Workspace ID
        primaryKey:
          $ref: '#/components/schemas/boxes-v2-SchemaPrimaryKey'
        schemaName:
          $ref: '#/components/schemas/boxes-v2-SchemaName'
        schemaId:
          type: string
          format: uuid
          example: 86403a7d-1120-491a-a789-3d328d91193d
          description: UUID of the schema
        createdAt:
          type: string
          example: '2020-07-07T09:03:13.390101Z'
          description: Time of schema creation
        createdBy:
          type: number
          example: '1234'
          description: ID of the user who created the schema
        modifiedAt:
          type: string
          example: '2020-07-07T09:03:13.390101Z'
          description: Time of last modification of the schema
        modifiedBy:
          type: number
          example: '1234'
          description: ID of the user who modified the schema
        deletedAt:
          type: string
          example: '2020-07-07T09:03:13.390101Z'
          description: Time of schema deletion
        deletedBy:
          type: number
          example: '1234'
          description: ID of the user who deleted the schema
        fields:
          $ref: '#/components/schemas/boxes-v2-Fields'
        layout:
          $ref: '#/components/schemas/boxes-v2-Layout'
        relations:
          $ref: '#/components/schemas/boxes-v2-SchemaRelations'
        tags:
          $ref: '#/components/schemas/boxes-v2-SchemaTags'
        permissionStatus:
          $ref: '#/components/schemas/boxes-v2-PermissionStatus'
    boxes-v2-SchemaProjection:
      type: object
      required:
      - schemaId
      - schemaName
      properties:
        schemaId:
          type: string
          format: uuid
          example: 4da878bc-ed5d-4d32-b31c-b6f7cc68936f
          description: UUID of the schema
        schemaName:
          type: string
          example: schema1
          description: Name of the schema
    boxes-v2-PaginatedSchema:
      type: object
      required:
      - data
      - pagination
      properties:
        data:
          type: array
          description: A list of schemas
          items:
            $ref: '#/components/schemas/boxes-v2-Schema'
        pagination:
          $ref: '#/components/schemas/boxes-v2-Pagination'
    boxes-v2-PaginatedSchemaProjection:
      type: object
      required:
      - data
      - pagination
      properties:
        data:
          type: array
          description: A list of schema names
          items:
            $ref: '#/components/schemas/boxes-v2-SchemaProjection'
        pagination:
          $ref: '#/components/schemas/boxes-v2-Pagination'
    boxes-v2-RulePredicate:
      oneOf:
      - $ref: '#/components/schemas/boxes-v2-RulePredicateOr'
      - $ref: '#/components/schemas/boxes-v2-RulePredicateAnd'
      - $ref: '#/components/schemas/boxes-v2-RulePredicateNeg'
      - $ref: '#/components/schemas/boxes-v2-RulePredicateId'
      discriminator:
        propertyName: type
        mapping:
          OR: '#/components/schemas/boxes-v2-RulePredicateOr'
          AND: '#/components/schemas/boxes-v2-RulePredicateAnd'
          NEG: '#/components/schemas/boxes-v2-RulePredicateNeg'
          ID: '#/components/schemas/boxes-v2-RulePredicateId'
    boxes-v2-RulePredicateOr:
      type: object
      required:
      - type
      - left
      - right
      properties:
        type:
          type: string
          enum:
          - OR
        left:
          $ref: '#/components/schemas/boxes-v2-RulePredicate'
        right:
          $ref: '#/components/schemas/boxes-v2-RulePredicate'
    boxes-v2-RulePredicateAnd:
      type: object
      required:
      - type
      - left
      - right
      properties:
        type:
          type: string
          enum:
          - AND
        left:
          $ref: '#/components/schemas/boxes-v2-RulePredicate'
        right:
          $ref: '#/components/schemas/boxes-v2-RulePredicate'
    boxes-v2-RulePredicateNeg:
      type: object
      required:
      - type
      - pred
      properties:
        type:
          type: string
          enum:
          - NEG
        pred:
          $ref: '#/components/schemas/boxes-v2-RulePredicate'
    boxes-v2-RulePredicateId:
      type: object
      required:
      - type
      - pred
      properties:
        type:
          type: string
          enum:
          - ID
        pred:
          $ref: '#/components/schemas/boxes-v2-RuleSinglePredicate'
    boxes-v2-RuleSinglePredicate:
      oneOf:
      - $ref: '#/components/schemas/boxes-v2-RuleSchemaPredicate'
      - $ref: '#/components/schemas/boxes-v2-RuleRecordPredicate'
      discriminator:
        propertyName: resourceType
        mapping:
          schema: '#/components/schemas/boxes-v2-RuleSchemaPredicate'
          record: '#/components/schemas/boxes-v2-RuleRecordPredicate'
    boxes-v2-RuleSchemaPredicate:
      type: object
      required:
      - resourceType
      - fieldName
      - propertyPath
      - expression
      properties:
        resourceType:
          type: string
          enum:
          - schema
        fieldName:
          type: string
        propertyPath:
          type: array
          items:
            type: string
        expression:
          type: object
    boxes-v2-RuleRecordPredicate:
      type: object
      required:
      - resourceType
      - fieldName
      - propertyPath
      - expression
      properties:
        resourceType:
          type: string
          enum:
          - record
        fieldName:
          type: string
        propertyPath:
          type: array
          items:
            type: string
        expression:
          type: object
    boxes-v2-RecordInput:
      type: object
      required:
      - fields
      properties:
        fields:
          $ref: '#/components/schemas/boxes-v2-RecordFields'
    boxes-v2-RelativeUpdateInput:
      type: object
      required:
      - actions
      properties:
        actions:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/boxes-v2-NumberValueRelativeUpdate'
    boxes-v2-NumberValueRelativeUpdate:
      type: object
      properties:
        changeBy:
          type: number
          description: The value is the number to add/subtract.
      required:
      - changeBy
    boxes-v2-RecordFields:
      type: object
      description: Fields and their values. Each field is an array of value objects (even if the field type requires only a single value).
      additionalProperties:
        $ref: '#/components/schemas/boxes-v2-Value'
    boxes-v2-RecordId:
      type: string
      example: 10c681d9-5afc-4ea1-ac97-dd1d22c7b045
      description: UUID of the record
    boxes-v2-Record:
      type: object
      description: Details of a record
      required:
      - schemaId
      - recordId
      - fields
      - relations
      - createdAt
      - createdBy
      - modifiedAt
      - modifiedBy
      - businessProfileId
      - permissionStatus
      properties:
        schemaId:
          type: string
          format: uuid
          example: 10c681d9-5afc-4ea1-ac97-dd1d22c7b045
          description: Id of the schema that was used to create this record
        recordId:
          $ref: '#/components/schemas/boxes-v2-RecordId'
        businessProfileId:
          type: integer
          example: '48'
          description: Workspace ID
        createdAt:
          type: string
          example: '2020-07-07T09:03:13.390101Z'
          description: Time of record creation
        createdBy:
          type: number
          example: '1234'
          description: ID of the user who created the record
        modifiedAt:
          type: string
          example: '2020-07-07T09:03:13.390101Z'
          description: Time of record last modification
        modifiedBy:
          type: number
          example: '1234'
          description: ID of the user who modified the record
        deletedAt:
          type: string
          example: '2020-07-07T09:03:13.390101Z'
          description: Time of record deletion
        deletedBy:
          type: number
          example: '1234'
          description: ID of the user who deleted the record
        fields:
          $ref: '#/components/schemas/boxes-v2-RecordFields'
        relations:
          $ref: '#/components/schemas/boxes-v2-RecordRelations'
        permissionStatus:
          $ref: '#/components/schemas/boxes-v2-PermissionStatus'
    boxes-v2-PermissionStatus:
      type: string
      enum:
      - private
      - restricted
      - public
      - read_only
      example: private
      description: Permission status of a record
    boxes-v2-PaginatedRecord:
      type: object
      required:
      - data
      - pagination
      properties:
        data:
          type: array
          description: A list of records
          items:
            $ref: '#/components/schemas/boxes-v2-Record'
        pagination:
          $ref: '#/components/schemas/boxes-v2-Pagination'
    boxes-v2-PaginatedDocumentation:
      type: object
      required:
      - data
      - pagination
      properties:
        data:
          type: array
          description: An array of paths that can be used to retrieve schema specifications.
          items:
            type: string
        pagination:
          $ref: '#/components/schemas/boxes-v2-Pagination'
    boxes-v2-Pagination:
      type: object
      description: Pagination metadata
      required:
      - limit
      - page
      - pages
      - total
      properties:
        limit:
          type: number
          example: 3
          description: The number of entries per page
        page:
          type: number
          example: 1
          description: The current page
        pages:
          type: number
          example: '10'
          description: The total number of pages
        total:
          type: number
          example: '29'
          description: The total number of entries on all pages
    brickworks-service-SchemaPagingResult:
      type: object
      x-class-name: SchemaPagingResult
      x-interface-name-ts: SchemaPagingResult
      required:
      - meta
      - data
      properties:
        meta:
          $ref: '#/components/schemas/brickworks-service-Meta'
        data:
          type: array
          description: Array of schemas
          items:
            $ref: '#/components/schemas/brickworks-service-Schema'
    brickworks-service-Schema:
      type: object
      x-class-name: Schema
      x-interface-name-ts: Schema
      description: Schema object
      required:
      - id
      - appId
      - displayName
      - createdBy
      - updatedBy
      - createdAt
      - updatedAt
      - audience
      properties:
        id:
          $ref: '#/components/schemas/brickworks-service-SchemaId'
        appId:
          $ref: '#/components/schemas/brickworks-service-SchemaAppId'
        displayName:
          $ref: '#/components/schemas/brickworks-service-SchemaDisplayName'
        description:
          $ref: '#/components/schemas/brickworks-service-SchemaDescription'
        fields:
          $ref: '#/components/schemas/brickworks-service-FieldsObject'
        displayConfiguration:
          $ref: '#/components/schemas/brickworks-service-SchemaDisplayConfiguration'
        createdBy:
          $ref: '#/components/schemas/brickworks-service-CreatedBy'
        updatedBy:
          $ref: '#/components/schemas/brickworks-service-UpdatedBy'
        publishedBy:
          $ref: '#/components/schemas/brickworks-service-PublishedBy'
        deletedBy:
          $ref: '#/components/schemas/brickworks-service-DeletedBy'
        createdAt:
          $ref: '#/components/schemas/brickworks-service-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/brickworks-service-UpdatedAt'
        publishedAt:
          $ref: '#/components/schemas/brickworks-service-PublishedAt'
        deletedAt:
          $ref: '#/components/schemas/brickworks-service-DeletedAt'
        version:
          $ref: '#/components/schemas/brickworks-service-SchemaVersion'
        audience:
          $ref: '#/components/schemas/brickworks-service-Audience'
        schemaType:
          $ref: '#/components/schemas/brickworks-service-SchemaType'
        fieldContextConfig:
          $ref: '#/components/schemas/brickworks-service-FieldContextConfig'
        lambdaId:
          $ref: '#/components/schemas/brickworks-service-LambdaFunctionId'
    brickworks-service-SchemaPreviewData:
      type: object
      x-class-name: SchemaPreviewData
      x-interface-name-ts: SchemaPreviewData
      description: Schema preview data
      required:
      - schemaType
      properties:
        fields:
          $ref: '#/components/schemas/brickworks-service-FieldsObject'
        audience:
          $ref: '#/components/schemas/brickworks-service-Audience'
        schemaType:
          $ref: '#/components/schemas/brickworks-service-SchemaType'
        lambdaId:
          $ref: '#/components/schemas/brickworks-service-LambdaFunctionId'
        id:
          $ref: '#/components/schemas/brickworks-service-SchemaId'
    brickworks-service-SchemaId:
      type: string
      format: uuid
      description: Unique ID of the schema, generated automatically.
    brickworks-service-SchemaAppId:
      type: string
      description: "App ID of the schema. This is used as the identifier of the schema and must be unique. This ID cannot be changed after the schema is created.  \nIn the Synerise Portal, this parameter is called **API name**. \n"
    brickworks-service-SchemaDisplayName:
      type: string
      description: Schema name shown to users in the Synerise Portal
    brickworks-service-SchemaDescription:
      type: string
      description: Schema description
    brickworks-service-FieldsObject:
      type: object
      x-class-name: FieldsObject
      x-interface-name-ts: FieldsObject
      description: The content of the schema.
      properties:
        type:
          type: string
          description: The root field of the schema is always an object, and it includes all the other fields.
          enum:
          - object
        properties:
          $ref: '#/components/schemas/brickworks-service-FieldFormMap'
        required:
          type: array
          description: A list of fields (field key names) that must have a value in the record.
          items:
            type: string
        allOf:
          type: array
          description: "\nAdditional validation for the fields. To learn more about conditionals, see the [JSON Schema documentation](https://json-schema.org/understanding-json-schema/reference/conditionals#ifthenelse).\n\nThe Synerise Web Portal only supports making a field available and required when another field meets a condition. Using other configurations works in the API, but may cause issues when trying to use the Synerise Web Portal.  \n\nThe following example is a condition supported by the Portal: the `accountNumber` field becomes available (and must be filled) when `paymentType` is `transfer`.\n```\n\"fields\": {\n    \"allOf\": [\n        {\n            \"if\": {\n                \"required\": [\n                    \"paymentType\"\n                ],\n                \"properties\": {\n                    \"paymentType\": {\n                        \"const\": \"transfer\"\n                    }\n                }\n            },\n            \"then\": {\n                \"required\": [\n                    \"accountNumber\"\n                ],\n                \"properties\": {}\n            }\n        }\n    ],\n...\n}\n```\nFor Portal compatibility, you can only change the field condition (`const` in the above example) to a different one. The `pattern` condition and `else` statements are currently not supported by the Portal.  \n"
          items:
            $ref: '#/components/schemas/brickworks-service-ValidationConditions'
        additionalProperties:
          type: boolean
          description: System parameter, generated automatically. Don't send this in requests.
      required:
      - type
      - properties
      - required
    brickworks-service-SchemaDisplayConfiguration:
      type: object
      x-class-name: SchemaDisplayConfiguration
      x-interface-name-ts: SchemaDisplayConfiguration
      description: The layout details of the schema
      properties:
        ordering:
          type: object
          description: Order of the fields. If not included, the backend creates the ordering in alphabetical order.
          additionalProperties:
            description: The name of the field is the key in this object and the value is its position in the schema (`0` is displayed first in the Synerise Portal).
            type: integer
            minimum: 0
            format: int32
        metadata:
          type: object
          description: Configuration of displaying the fields in the editor
          additionalProperties:
            $ref: '#/components/schemas/brickworks-service-FieldMetadata'
      required:
      - ordering
      - metadata
    brickworks-service-CreatedBy:
      type: integer
      format: int64
      description: ID of the user who created the resource. If created by a workspace, the value is `0`.
    brickworks-service-UpdatedBy:
      type: integer
      format: int64
      description: ID of the user who last updated the resource. If last updated by a workspace, the value is `0`.
    brickworks-service-PublishedBy:
      type: integer
      format: int64
      nullable: true
      description: ID of the user who published the resource. If published by a workspace, the value is `0`.
    brickworks-service-DeletedBy:
      type: integer
      format: int64
      nullable: true
      description: ID of the user who deleted the resource. If deleted by a workspace, the value is `0`.
    brickworks-service-CreatedAt:
      type: string
      format: date-time
      description: Time when the resource was created
    brickworks-service-UpdatedAt:
      type: string
      format: date-time
      description: Time when the resource was last updated
    brickworks-service-PublishedAt:
      type: string
      format: date-time
      nullable: true
      description: Time when the resource was published
    brickworks-service-DeletedAt:
      type: string
      format: date-time
      nullable: true
      description: Time when the resource was deleted
    brickworks-service-SchemaVersion:
      type: integer
      format: int32
      description: Schema version ID. For simple schemas, this is always `1`. When a schema is updated, the ID increases by 1.
    brickworks-service-Audience:
      type: object
      x-class-name: Audience
      x-interface-name-ts: Audience
      description: Definition of the profiles which can access content created from this schema.
      properties:
        targetType:
          type: string
          enum:
          - SEGMENT
          - QUERY
          - ALL
          description: |
            - ALL: Available to all profiles
            - SEGMENT: Available to a segmentation or segmentations of profiles, listed in `segments`
            - QUERY: Available to a segmentation of profiles defined with `query`
        segments:
          type: array
          description: Used when `targetType` is `SEGMENT`. This is a list of existing segmentations (identified by UUID) which define the audience.
          items:
            type: string
            format: uuid
            description: Segmentation UUID
        query:
          type: string
          description: Used when `targetType` is `QUERY`. This is a raw `analysis` object sent to the Analytics service, converted into a string. For details on how to create the analysis object, see the [API reference for creating segmentations](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#tag/Segmentations/operation/analytics2-segmentations-create).
          example: '{\"analysis\":{\"title\":\"notempty\",\"segments\":[{\"title\":\"notempty\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"exampleBool\"}}]}}]}}]}}'
    brickworks-service-SchemaType:
      type: string
      x-class-name: SchemaType
      x-interface-name-ts: SchemaType
      enum:
      - SIMPLE
      - VERSIONED
      - SINGLETON
      description: |
        - SIMPLE: a schema in which records can only have the PUBLISHED status.
        - VERSIONED: a schema in which records can be saved as drafts; and you can also access the version history.
        - SINGLETON: a schema which has no records. All fields must have default values. Values can still be inserted dynamically with Jinjava.
    brickworks-service-FieldForm:
      type: object
      x-class-name: FieldForm
      x-interface-name-ts: FieldForm
      description: Each key is the name of a field (called "API name" in the Synerise Portal).
      oneOf:
      - $ref: '#/components/schemas/brickworks-service-NumberForm'
      - $ref: '#/components/schemas/brickworks-service-BooleanForm'
      - $ref: '#/components/schemas/brickworks-service-StringForm'
      - $ref: '#/components/schemas/brickworks-service-IntegerForm'
      - $ref: '#/components/schemas/brickworks-service-EnumForm'
      - $ref: '#/components/schemas/brickworks-service-DateForm'
      - $ref: '#/components/schemas/brickworks-service-DateTimeForm'
      - $ref: '#/components/schemas/brickworks-service-ArrayForm'
      - $ref: '#/components/schemas/brickworks-service-UUIDForm'
      - $ref: '#/components/schemas/brickworks-service-JinJavaForm'
      - $ref: '#/components/schemas/brickworks-service-CatalogItemField'
      - $ref: '#/components/schemas/brickworks-service-KeyValueObject'
      - $ref: '#/components/schemas/brickworks-service-ExternalHttpSource'
      - $ref: '#/components/schemas/brickworks-service-ReferenceForm'
      - $ref: '#/components/schemas/brickworks-service-OneToManyForm'
      - $ref: '#/components/schemas/brickworks-service-MetricField'
      - $ref: '#/components/schemas/brickworks-service-AggregateField'
      - $ref: '#/components/schemas/brickworks-service-ExpressionField'
      - $ref: '#/components/schemas/brickworks-service-PromotionField'
      - $ref: '#/components/schemas/brickworks-service-FileField'
      - $ref: '#/components/schemas/brickworks-service-ImageField'
      - $ref: '#/components/schemas/brickworks-service-RecommendationField'
      - $ref: '#/components/schemas/brickworks-service-AiSearchField'
      - $ref: '#/components/schemas/brickworks-service-AiSearchListingField'
      - $ref: '#/components/schemas/brickworks-service-VoucherField'
      - $ref: '#/components/schemas/brickworks-service-UntypedJson'
      - $ref: '#/components/schemas/brickworks-service-UntypedArray'
      - $ref: '#/components/schemas/brickworks-service-UntypedForm'
      - $ref: '#/components/schemas/brickworks-service-ProfileAttributeField'
      - $ref: '#/components/schemas/brickworks-service-OneToManyFilterForm'
      discriminator:
        propertyName: subtype
        mapping:
          boolean: '#/components/schemas/brickworks-service-BooleanForm'
          string: '#/components/schemas/brickworks-service-StringForm'
          integer: '#/components/schemas/brickworks-service-IntegerForm'
          number: '#/components/schemas/brickworks-service-NumberForm'
          enum: '#/components/schemas/brickworks-service-EnumForm'
          date: '#/components/schemas/brickworks-service-DateForm'
          date-time: '#/components/schemas/brickworks-service-DateTimeForm'
          typed_array: '#/components/schemas/brickworks-service-ArrayForm'
          uuid: '#/components/schemas/brickworks-service-UUIDForm'
          jinjava: '#/components/schemas/brickworks-service-JinJavaForm'
          one_to_one: '#/components/schemas/brickworks-service-ReferenceForm'
          catalog_item: '#/components/schemas/brickworks-service-CatalogItemField'
          key_value: '#/components/schemas/brickworks-service-KeyValueObject'
          external_source: '#/components/schemas/brickworks-service-ExternalHttpSource'
          one_to_many: '#/components/schemas/brickworks-service-OneToManyForm'
          metric: '#/components/schemas/brickworks-service-MetricField'
          expression: '#/components/schemas/brickworks-service-ExpressionField'
          aggregate: '#/components/schemas/brickworks-service-AggregateField'
          promotion: '#/components/schemas/brickworks-service-PromotionField'
          file: '#/components/schemas/brickworks-service-FileField'
          image: '#/components/schemas/brickworks-service-ImageField'
          recommendation: '#/components/schemas/brickworks-service-RecommendationField'
          ai_search: '#/components/schemas/brickworks-service-AiSearchField'
          ai_search_listing: '#/components/schemas/brickworks-service-AiSearchListingField'
          voucher: '#/components/schemas/brickworks-service-VoucherField'
          untyped_object: '#/components/schemas/brickworks-service-UntypedJson'
          untyped_array: '#/components/schemas/brickworks-service-UntypedArray'
          json: '#/components/schemas/brickworks-service-UntypedForm'
          client_attribute: '#/components/schemas/brickworks-service-ProfileAttributeField'
          filter: '#/components/schemas/brickworks-service-OneToManyFilterForm'
    brickworks-service-NumberForm:
      type: object
      title: Number
      x-class-name: NumberForm
      x-interface-name-ts: NumberForm
      description: This field type accepts static numeric values. `number` is used for floating-point values.
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-NumberType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-NumberSubtype'
        minimum:
          type: number
          format: float
          description: Minimum value
        maximum:
          type: number
          format: float
          description: Maximum value
        unique:
          $ref: '#/components/schemas/brickworks-service-FieldUnique'
        searchable:
          $ref: '#/components/schemas/brickworks-service-FieldSearchable'
        default:
          type: number
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-BooleanForm:
      type: object
      title: Boolean
      x-class-name: BooleanForm
      x-interface-name-ts: BooleanForm
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-BooleanType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-BooleanSubtype'
        unique:
          $ref: '#/components/schemas/brickworks-service-FieldUnique'
        searchable:
          $ref: '#/components/schemas/brickworks-service-FieldSearchable'
        default:
          nullable: true
          type: boolean
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-StringForm:
      type: object
      title: String
      x-class-name: StringForm
      x-interface-name-ts: StringForm
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-StringType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-StringSubtype'
        minLength:
          type: number
          format: int32
          description: Minimum number of characters in the string
        maxLength:
          type: number
          format: int32
          description: Maximum number of characters in the string
        pattern:
          type: string
          description: Regular expression that the string must match
        unique:
          $ref: '#/components/schemas/brickworks-service-FieldUnique'
        searchable:
          $ref: '#/components/schemas/brickworks-service-FieldSearchable'
        default:
          type: string
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-IntegerForm:
      type: object
      title: Integer
      x-class-name: IntegerForm
      x-interface-name-ts: IntegerForm
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-IntegerType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-IntegerSubtype'
        minimum:
          type: number
          format: int32
          description: Minimum value
        maximum:
          type: number
          format: int32
          description: Maximum value
        unique:
          $ref: '#/components/schemas/brickworks-service-FieldUnique'
        searchable:
          $ref: '#/components/schemas/brickworks-service-FieldSearchable'
        default:
          type: number
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-EnumForm:
      type: object
      title: Enumeration
      x-class-name: EnumForm
      x-interface-name-ts: EnumForm
      description: This type of field defines a list of strings which can be used as the value. Only one of the allowed values can be saved in the record.
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-StringType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-EnumSubtype'
        enum:
          type: array
          description: A list of strings which can be selected as the value
          items:
            type: string
        names:
          type: object
          description: |
            A mapping of the field values and their names displayed in the record.

            For example, if `enum` contains the value `exampleValue` and you want the UI to show `Example Value` on the list, set:
            ```
            "names": {
              "exampleValue": "Example Value"
            }
            ```
          additionalProperties:
            type: string
        default:
          type: string
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - enum
      - names
    brickworks-service-DateForm:
      type: object
      title: Date
      x-class-name: DateForm
      x-interface-name-ts: DateForm
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-StringType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-DateSubtype'
        default:
          type: string
          format: date
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-DateTimeForm:
      type: object
      title: Date and time
      x-class-name: DateTimeForm
      x-interface-name-ts: DateTimeForm
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-StringType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-DateTimeSubtype'
        default:
          type: string
          format: date-time
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-ArrayForm:
      type: object
      title: Array
      x-class-name: ArrayForm
      x-interface-name-ts: ArrayForm
      description: This type of field accepts an array of values. The type of values is defined in `items`
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ArrayType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-TypedArraySubtype'
        items:
          type: object
          description: The definition of the type of value allowed in the array. All values must be of the same type.
          oneOf:
          - $ref: '#/components/schemas/brickworks-service-NumberForm'
          - $ref: '#/components/schemas/brickworks-service-IntegerForm'
          - $ref: '#/components/schemas/brickworks-service-BooleanForm'
          - $ref: '#/components/schemas/brickworks-service-StringForm'
          - $ref: '#/components/schemas/brickworks-service-EnumForm'
          discriminator:
            propertyName: subtype
            mapping:
              number: '#/components/schemas/brickworks-service-NumberForm'
              integer: '#/components/schemas/brickworks-service-IntegerForm'
              boolean: '#/components/schemas/brickworks-service-BooleanForm'
              string: '#/components/schemas/brickworks-service-StringForm'
              enum: '#/components/schemas/brickworks-service-EnumForm'
        maxItems:
          type: number
          format: int32
          description: The maximum number of items allowed in the array
        uniqueItems:
          type: boolean
          description: When `true`, the values in the array must be unique
        default:
          type: array
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
          items: {}
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - items
      - subtype
    brickworks-service-UUIDForm:
      type: object
      title: UUID
      x-class-name: UUIDForm
      x-interface-name-ts: UUIDForm
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-StringType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-UuidSubtype'
        default:
          type: string
          format: uuid
          title: UUID default
          x-class-name: UUIDFormDefault
          x-interface-name-ts: UUIDFormDefault
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-JinJavaForm:
      type: object
      title: Jinjava
      x-class-name: JinJavaForm
      x-interface-name-ts: JinJavaForm
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-StringType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-JinJavaSubtype'
        default:
          type: string
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
        settings:
          $ref: '#/components/schemas/brickworks-service-JinJavaSettings'
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-CatalogItemField:
      type: object
      title: Catalog
      x-class-name: CatalogItemField
      x-interface-name-ts: CatalogItemField
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-CatalogItemSubtype'
        properties:
          type: object
          title: CatalogItemFieldProperties
          description: |
            The data of the catalog. `id` is the default catalogId and `itemKey` is the default unique identifier of an item. You can override both when creating/updating a record.
          properties:
            id:
              $ref: '#/components/schemas/brickworks-service-StringForm'
            itemKey:
              oneOf:
              - $ref: '#/components/schemas/brickworks-service-StringForm'
              - $ref: '#/components/schemas/brickworks-service-JinJavaForm'
              discriminator:
                propertyName: subtype
                mapping:
                  jinjava: '#/components/schemas/brickworks-service-JinJavaForm'
                  string: '#/components/schemas/brickworks-service-StringForm'
            nullOnFail:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
          required:
          - id
          - itemKey
        default:
          type: object
          title: Catalog default
          x-class-name: CatalogFieldDefault
          x-interface-name-ts: CatalogFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: Unique ID of a catalog
            itemKey:
              type: string
              description: Static string or Jinjava that inserts the unique ID of an item in the catalog
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-KeyValueObject:
      type: object
      title: Key and value
      x-class-name: KeyValueObject
      x-interface-name-ts: KeyValueObject
      description: A key/value map.
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-KeyValueSubtype'
        properties:
          $ref: '#/components/schemas/brickworks-service-FieldFormMap'
        default:
          type: object
          title: Key and value default
          x-class-name: KeyValueObjectDefault
          x-interface-name-ts: KeyValueObjectDefault
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
        additionalProperties:
          type: boolean
      required:
      - type
      - subtype
    brickworks-service-ExternalHttpSource:
      type: object
      title: External source
      x-class-name: ExternalSourceField
      x-interface-name-ts: ExternalSourceField
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceSubtype'
        sourceType:
          type: string
          enum:
          - http
        sourceId:
          type: string
          description: Unique ID of the external source definition
          format: uuid
        headers:
          $ref: '#/components/schemas/brickworks-service-KeyValueObject'
        params:
          $ref: '#/components/schemas/brickworks-service-KeyValueObject'
        body:
          $ref: '#/components/schemas/brickworks-service-FieldForm'
        properties:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceFieldProperties'
        default:
          type: object
          title: External source default
          x-class-name: ExternalHttpSourceDefault
          x-interface-name-ts: ExternalHttpSourceDefault
          nullable: true
          properties:
            headers:
              type: object
              description: Request headers
              additionalProperties: true
            params:
              type: object
              description: The url parameters
              additionalProperties: true
            body:
              type: object
              description: Request body
              additionalProperties: true
            properties:
              type: object
              title: External source properties
              x-class-name: ExternalHttpSourcePropertiesValues
              x-interface-name-ts: ExternalHttpSourcePropertiesValues
              properties:
                nullOnFail:
                  type: boolean
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - sourceType
      - sourceId
    brickworks-service-ReferenceForm:
      type: object
      title: Record reference
      x-class-name: ReferenceForm
      x-interface-name-ts: ReferenceForm
      description: Definition of a reference to another schema
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-StringType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-OneToOneSubtype'
        referenceId:
          type: string
          description: Unique identifier of the schema you want to access a record from. When creating a record with this field, you will provide the UUID of the referenced record from that schema.
        default:
          type: string
          format: uuid
          description: The default record to reference. In "one to many" fields, use the `default` array in the parent object instead of this property.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-OneToManyForm:
      type: object
      title: Multiple record reference
      x-class-name: OneToManyForm
      x-interface-name-ts: OneToManyForm
      description: This type of field allows you to reference multiple records from another schema. `items` defines the target schema.
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ArrayType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-OneToManySubtype'
        items:
          $ref: '#/components/schemas/brickworks-service-ReferenceForm'
        maxItems:
          type: number
          minimum: 1
          maximum: 100
          default: 20
          description: The maximum number of records that can be referenced.
        default:
          type: array
          description: An array of default record references (record UUIDs)
          items:
            type: string
            format: uuid
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - items
      - subtype
    brickworks-service-MetricField:
      type: object
      description: Reference to a Synerise analysis
      title: Metric
      x-class-name: MetricField
      x-interface-name-ts: MetricField
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-MetricSubtype'
        properties:
          type: object
          description: |
            - `id` is the default ID of an metric.
            - `variables` is a set of variables to pass when the analysis has dynamic fields.
            - `includeDetails` defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
          properties:
            id:
              $ref: '#/components/schemas/brickworks-service-StringForm'
            variables:
              $ref: '#/components/schemas/brickworks-service-KeyValueObject'
            includeDetails:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
            nullOnFail:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
          required:
          - id
        default:
          type: object
          title: Metric default
          x-class-name: MetricFieldDefault
          x-interface-name-ts: MetricFieldDefault
          nullable: true
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: UUID of an analysis
            variables:
              type: object
              additionalProperties:
                description: Values of dynamic keys in the analysis
            includeDetails:
              type: boolean
              description: Defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-AggregateField:
      type: object
      description: Reference to a Synerise analysis
      title: Aggregate
      x-class-name: AggregateField
      x-interface-name-ts: AggregateField
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-AggregateSubtype'
        properties:
          type: object
          description: |
            - `id` is the default ID of an analysis.
            - `variables` is a set of variables to pass when the analysis has dynamic fields.
            - `includeDetails` defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
          properties:
            id:
              $ref: '#/components/schemas/brickworks-service-StringForm'
            variables:
              $ref: '#/components/schemas/brickworks-service-KeyValueObject'
            includeDetails:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
            nullOnFail:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
          required:
          - id
        default:
          type: object
          title: Aggregate default
          x-class-name: AggregateFieldDefault
          x-interface-name-ts: AggregateFieldDefault
          nullable: true
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: UUID of an analysis
            variables:
              type: object
              additionalProperties:
                description: Values of dynamic keys in the analysis
            includeDetails:
              type: boolean
              description: Defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-ExpressionField:
      type: object
      description: Reference to a Synerise analysis
      title: Expression
      x-class-name: ExpressionField
      x-interface-name-ts: ExpressionField
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-ExpressionSubtype'
        properties:
          type: object
          description: |
            - `id` is the default ID of an expression.
            - `variables` is a set of variables to pass when the analysis has dynamic fields.
            - `includeDetails` defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
          properties:
            id:
              $ref: '#/components/schemas/brickworks-service-StringForm'
            variables:
              $ref: '#/components/schemas/brickworks-service-KeyValueObject'
            includeDetails:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
            nullOnFail:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
          required:
          - id
        default:
          type: object
          x-class-name: ExpressionFieldDefault
          x-interface-name-ts: ExpressionFieldDefault
          title: Expression default
          nullable: true
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: UUID of an analysis
            variables:
              type: object
              additionalProperties:
                description: Values of dynamic keys in the analysis
            includeDetails:
              type: boolean
              description: Defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-PromotionField:
      type: object
      title: Promotion
      x-class-name: PromotionField
      x-interface-name-ts: PromotionField
      description: Reference to a promotion
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-PromotionSubtype'
        properties:
          $ref: '#/components/schemas/brickworks-service-PromotionFieldProperties'
        default:
          type: object
          title: Promotion default
          x-class-name: PromotionFieldDefault
          x-interface-name-ts: PromotionFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: ID of a promotion campaign
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-FileField:
      type: object
      title: File
      x-class-name: FileField
      x-interface-name-ts: FileField
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-FileSubtype'
        properties:
          $ref: '#/components/schemas/brickworks-service-FileFieldProperties'
        default:
          type: object
          title: File default
          x-class-name: FileFieldDefault
          x-interface-name-ts: FileFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: Unique identifier of an image/file in the File Explorer
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-ImageField:
      type: object
      title: Image
      x-class-name: ImageField
      x-interface-name-ts: ImageField
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-ImageSubtype'
        properties:
          $ref: '#/components/schemas/brickworks-service-FileFieldProperties'
        default:
          type: object
          title: Image default
          x-class-name: ImageFieldDefault
          x-interface-name-ts: ImageFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: Unique identifier of an image/file in the File Explorer
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-RecommendationField:
      type: object
      title: Recommendation
      x-class-name: RecommendationField
      x-interface-name-ts: RecommendationField
      description: Reference to a recommendation campaign
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-RecommendationSubtype'
        properties:
          type: object
          title: Recommendation properties
          x-class-name: RecommendationFieldProperties
          x-interface-name-ts: RecommendationFieldProperties
          description: "- `id.default` defines the default recommendation campaign to generate a recommendation from.  \n- In `params.itemId`, you can add a default item context (required by some recommendation types):\n  ```\n  \"itemId\": {\n    \"type\": \"string\",\n    \"subtype\": \"string\"\n    \"default\": \"defaultItemIdForItemContext\"\n    }\n  ```\n"
          properties:
            id:
              $ref: '#/components/schemas/brickworks-service-StringForm'
            params:
              $ref: '#/components/schemas/brickworks-service-KeyValueObject'
            nullOnFail:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
          required:
          - id
        default:
          type: object
          title: Recommendation default
          x-class-name: RecommendationFieldDefault
          x-interface-name-ts: RecommendationFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: UUID of a recommendation campaign
            params:
              type: object
              title: Recommendation default params
              x-class-name: RecommendationFieldDefaultParams
              x-interface-name-ts: RecommendationFieldDefaultParams
              description: Item context
              properties:
                itemId:
                  type: string
                  description: Unique ID of an item context (required for some recommendation types)
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-AiSearchField:
      type: object
      title: AI Search
      x-class-name: AiSearchField
      x-interface-name-ts: AiSearchField
      description: Reference to an AI Search index used to perform a search query
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-AiSearchSubtype'
        properties:
          type: object
          title: AI Search properties
          x-class-name: AiSearchFieldProperties
          x-interface-name-ts: AiSearchFieldProperties
          description: |
            - `id.default` defines the default AI Search index used to perform the search.
            - `query.default` defines the default search phrase (accepts a string or a Jinjava expression).
            - In `params`, you can declare additional query parameters supported by the AI Search API
              (e.g. `filters`, `facets`, `displayAttributes`, `personalize`).
          properties:
            id:
              $ref: '#/components/schemas/brickworks-service-StringForm'
            query:
              $ref: '#/components/schemas/brickworks-service-StringForm'
            params:
              $ref: '#/components/schemas/brickworks-service-KeyValueObject'
            nullOnFail:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
          required:
          - id
          - query
        default:
          type: object
          title: AI Search default
          x-class-name: AiSearchFieldDefault
          x-interface-name-ts: AiSearchFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - Set to `null` (or omit) to declare no default at all.
              - Send an empty object `{}` to declare an empty default — it is merged with the record value, or applied directly when the record does not provide one.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: ID of the AI Search index
            query:
              type: string
              description: Default search query phrase
            params:
              type: object
              title: AI Search default params
              x-class-name: AiSearchFieldDefaultParams
              x-interface-name-ts: AiSearchFieldDefaultParams
              description: Additional default query parameters
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-AiSearchListingField:
      type: object
      title: AI Listing
      x-class-name: AiSearchListingField
      x-interface-name-ts: AiSearchListingField
      description: Reference to an AI Search index used to retrieve a listing (no query phrase)
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-AiSearchListingSubtype'
        properties:
          type: object
          title: AI Listing properties
          x-class-name: AiSearchListingFieldProperties
          x-interface-name-ts: AiSearchListingFieldProperties
          description: |
            - `id.default` defines the default AI Search index used to fetch the listing.
            - In `params`, you can declare additional query parameters supported by the AI Search listing API
              (e.g. `filters`, `facets`, `displayAttributes`, `personalize`).
          properties:
            id:
              $ref: '#/components/schemas/brickworks-service-StringForm'
            params:
              $ref: '#/components/schemas/brickworks-service-KeyValueObject'
            nullOnFail:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
          required:
          - id
        default:
          type: object
          title: AI Listing default
          x-class-name: AiSearchListingFieldDefault
          x-interface-name-ts: AiSearchListingFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - Set to `null` (or omit) to declare no default at all.
              - Send an empty object `{}` to declare an empty default — it is merged with the record value, or applied directly when the record does not provide one.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: ID of the AI Search index
            params:
              type: object
              title: AI Listing default params
              x-class-name: AiSearchListingFieldDefaultParams
              x-interface-name-ts: AiSearchListingFieldDefaultParams
              description: Additional default query parameters
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-VoucherField:
      type: object
      title: Voucher
      x-class-name: VoucherField
      x-interface-name-ts: VoucherField
      description: Reference to a voucher
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-VoucherSubtype'
        properties:
          type: object
          title: Voucher properties
          x-class-name: VoucherFieldProperties
          x-interface-name-ts: VoucherFieldProperties
          description: |
            - in `id.default`, enter the UUID of the voucher pool. It can be changed per record.
            - in `assign.default`:
                - `false` means that once a code from a given pool is retrieved to a profile, it becomes assigned to the profile and is always returned in subsequent requests.
                - `true` means that a different code is retrieved for a profile with every request. This can't be changed per record.
          properties:
            id:
              $ref: '#/components/schemas/brickworks-service-StringForm'
            assign:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
            nullOnFail:
              $ref: '#/components/schemas/brickworks-service-BooleanForm'
          required:
          - id
          - assign
        default:
          type: object
          title: Voucher default
          x-class-name: VoucherFieldDefault
          x-interface-name-ts: VoucherFieldDefault
          nullable: true
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            id:
              type: string
              description: ID of the voucher
            assign:
              type: boolean
              description: |
                - `false` means that once a code from a given pool is retrieved to a profile, it becomes assigned to the profile and is always returned in subsequent requests.
                - `true` means that a different code is retrieved for a profile with every request. This can't be changed per record.
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
      - properties
    brickworks-service-UntypedJson:
      type: object
      title: Untyped JSON
      x-class-name: UntypedJson
      x-interface-name-ts: UntypedJson
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-UntypedObjectSubtype'
        default:
          type: object
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
          additionalProperties: true
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-UntypedArray:
      type: object
      title: Untyped array
      x-class-name: UntypedArray
      x-interface-name-ts: UntypedArray
      description: This type of field accepts an array of values. The values can be of any data type.
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ArrayType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-UntypedArraySubtype'
        default:
          type: array
          nullable: true
          description: The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.
          items: {}
        maxItems:
          type: number
          format: int32
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - type
      - subtype
    brickworks-service-UntypedForm:
      type: object
      x-class-name: UntypedForm
      x-interface-name-ts: UntypedForm
      description: Field without typed structure
      properties:
        anyOf:
          type: array
          minItems: 2
          maxItems: 2
          items:
            oneOf:
            - $ref: '#/components/schemas/brickworks-service-UntypedJson'
            - $ref: '#/components/schemas/brickworks-service-UntypedArray'
        subtype:
          $ref: '#/components/schemas/brickworks-service-UntypedFormSubtype'
        default:
          type: object
          additionalProperties: true
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
      required:
      - anyOf
      - subtype
    brickworks-service-ProfileAttributeField:
      type: object
      title: Profile attribute field
      x-class-name: ProfileAttributeField
      x-interface-name-ts: ProfileAttributeField
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-ProfileAttributeSubtype'
        settings:
          $ref: '#/components/schemas/brickworks-service-ProfileAttributeSettings'
        properties:
          $ref: '#/components/schemas/brickworks-service-ProfileAttributeProperties'
        default:
          type: object
          title: ProfileAttributeFieldDefault
          x-class-name: ProfileAttributeFieldDefault
          x-interface-name-ts: ProfileAttributeFieldDefault
          description: |
            The default value of the field.
              - This object overrides the defaults from the `properties` object.
              - **To set no default, send this object empty**. `"default": null` overrides `properties` with a null value.
              - This object is required when `isConstantField = true`
          properties:
            attributeName:
              type: string
              description: The name of the profile attribute to retrieve a value from when generating content from a record
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
        additionalProperties:
          type: boolean
          description: Always false, don't send in requests
      required:
      - type
      - subtype
      - properties
    brickworks-service-OneToManyFilterForm:
      type: object
      title: Record reference filter
      x-class-name: OneToManyFilterForm
      x-interface-name-ts: OneToManyFilterForm
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-ObjectType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-OneToManyFilterSubtype'
        schemaId:
          $ref: '#/components/schemas/brickworks-service-SchemaId'
        properties:
          $ref: '#/components/schemas/brickworks-service-OneToManyFilterProperties'
        default:
          type: object
          title: One to many filter form default
          description: Default filter settings
          x-class-name: OneToManyFilterFormDefault
          x-interface-name-ts: OneToManyFilterFormDefault
          properties:
            query:
              type: string
              description: RSQL query to filter the records
            sortBy:
              type: string
              description: The property to sort by
              enum:
              - id
              - createdAt
              - updatedAt
            sortDirection:
              type: string
              description: Sorting direction
              enum:
              - asc
              - desc
        isConstantField:
          $ref: '#/components/schemas/brickworks-service-IsConstantField'
        additionalProperties:
          type: boolean
          description: Field generated automatically, don't send in requests.
      required:
      - type
      - subtype
      - schemaId
      - properties
    brickworks-service-OneToManyFilterProperties:
      type: object
      title: One to many filter properties
      description: "Definitions of the values allowed in the filter settings. If your integration flow involves using the Synerise Web Portal, you shouldn't use this object.  \n\nYou can sort by these parameters:\n- `id`\n- `createdAt`\n- `updatedAt`\n"
      x-class-name: OneToManyFilterProperties
      x-interface-name-ts: OneToManyFilterProperties
      properties:
        query:
          $ref: '#/components/schemas/brickworks-service-StringForm'
        sortBy:
          $ref: '#/components/schemas/brickworks-service-StringForm'
        sortDirection:
          $ref: '#/components/schemas/brickworks-service-StringForm'
      required:
      - query
      - sortBy
      - sortDirection
    brickworks-service-FieldUnique:
      type: boolean
      description: When true, the value in this field must be unique between all records created from this schema. This parameter can't be set on a field when more than 5 records exist for the schema.
    brickworks-service-FieldSearchable:
      type: boolean
      description: When true, the value in this field can be used to search and sort records.
    brickworks-service-IsConstantField:
      type: boolean
      default: false
      description: |
        When true:
        - you must set a default value.
        - that default value applies to all records and can't be overwritten in record create/update requests.
    brickworks-service-JinJavaSettings:
      type: object
      x-class-name: JinJavaSettings
      x-interface-name-ts: JinJavaSettings
      nullable: true
      description: Settings for casting the Jinjava result to a data type. Casting may not be successful - set the `strict` setting to decide how to proceed in that case.
      properties:
        castType:
          type: string
          description: The data type to try casting the Jinjava result to
          x-class-name: JinJavaCastType
          x-interface-name-ts: JinJavaCastType
          enum:
          - boolean
          - integer
          - number
          - json
        strict:
          type: boolean
          description: |
            Defines what happens when casting is not successful:
            - `true` throws an error in generating an object from a record
            - `false` sets the value to null
        removeWhitespaces:
          type: boolean
          description: |
            When `true`, all whitespace characters (e.g. `\r`, `\n`, spaces, tabs) are removed from the Jinjava render result before casting.
      required:
      - strict
      - castType
    brickworks-service-ExternalSourceFieldProperties:
      type: object
      x-class-name: ExternalSourceFieldProperties
      x-interface-name-ts: ExternalSourceFieldProperties
      description: Behavior of the external source field when the source call fails. `returnErrorBodyOnFail` takes precedence over `nullOnFail` for received error responses.
      properties:
        nullOnFail:
          $ref: '#/components/schemas/brickworks-service-BooleanForm'
        returnErrorBodyOnFail:
          type: boolean
          nullable: true
          description: |
            Defines what happens when the external source responds with an error (non-2xx) status:
            - `true` — instead of failing the generate request (or returning null when `nullOnFail` is enabled), the field resolves to a JSON object with the error details: `response.status`, `response.body`, `request.url`, `request.method`, `request.body`. Useful for debugging and for building a custom flow based on errors.
            - `false` (default, also when absent or null) — standard behavior applies: `nullOnFail` decides between failing the request and a null field value.

            Covers only received HTTP responses. Connection-level failures (e.g. timeouts) and a missing external source definition still fail the request.
      required:
      - nullOnFail
    brickworks-service-PromotionFieldProperties:
      type: object
      x-class-name: PromotionFieldProperties
      x-interface-name-ts: PromotionFieldProperties
      description: '`id` defines the promotion to access. In `default`, enter the default promotion UUID.'
      properties:
        id:
          $ref: '#/components/schemas/brickworks-service-StringForm'
        nullOnFail:
          $ref: '#/components/schemas/brickworks-service-BooleanForm'
      required:
      - id
    brickworks-service-FileFieldProperties:
      type: object
      x-class-name: FileFieldProperties
      x-interface-name-ts: FileFieldProperties
      description: '`id` defines the unique ID of a [file uploaded to Synerise](https://hub.synerise.com/docs/assets/files-explorer/). In `default`, enter the default file ID.'
      properties:
        id:
          $ref: '#/components/schemas/brickworks-service-StringForm'
    brickworks-service-ProfileAttributeSettings:
      type: object
      x-class-name: ProfileAttributeSettings
      x-interface-name-ts: ProfileAttributeSettings
      description: Additional settings of the field
      properties:
        id:
          $ref: '#/components/schemas/brickworks-service-StringForm'
        castType:
          type: string
          description: The data type to try casting the attribute to
          enum:
          - none
          - boolean
          - number
          - integer
          - string
        strict:
          description: |
            Defines what happens when casting is not successful:
            - `true` throws an error in generating an object from a record
            - `false` sets the value to null
      required:
      - castType
      - strict
    brickworks-service-ProfileAttributeProperties:
      type: object
      x-class-name: ProfileAttributeProperties
      x-interface-name-ts: ProfileAttributeProperties
      description: In `attributeName.default`, enter the default name of the profile attribute to retrieve a value from when generating content from a record
      properties:
        attributeName:
          $ref: '#/components/schemas/brickworks-service-StringForm'
        nullOnFail:
          $ref: '#/components/schemas/brickworks-service-BooleanForm'
      required:
      - attributeName
    brickworks-service-FieldMetadata:
      type: object
      x-class-name: FieldMetadata
      x-interface-name-ts: FieldMetadata
      description: The object name is the name of a field in the schema
      properties:
        title:
          type: string
          description: Display name of the field, shown in the editor
          default: empty title
        description:
          type: string
          nullable: true
          description: Description of the field, shown in the editor
        useAsRecordName:
          type: boolean
          nullable: true
          default: false
          description: When `true`, the value of this field can be used as the record name. This only happens when the record name is not explicitly defined in its `name` parameter.If multiple fields can be used as the record name, they are checked starting with the highest `ordering` and the first non-empty field is used.
    brickworks-service-CreateSchemaRequest:
      type: object
      x-class-name: CreateSchemaRequest
      x-interface-name-ts: CreateSchemaRequest
      description: Create schema request body
      required:
      - appId
      - displayName
      properties:
        appId:
          $ref: '#/components/schemas/brickworks-service-SchemaAppId'
        displayName:
          $ref: '#/components/schemas/brickworks-service-SchemaDisplayName'
        description:
          $ref: '#/components/schemas/brickworks-service-SchemaDescription'
        fields:
          $ref: '#/components/schemas/brickworks-service-FieldsObject'
        displayConfiguration:
          $ref: '#/components/schemas/brickworks-service-SchemaDisplayConfiguration'
        audience:
          $ref: '#/components/schemas/brickworks-service-Audience'
        schemaType:
          $ref: '#/components/schemas/brickworks-service-SchemaType'
        lambdaId:
          $ref: '#/components/schemas/brickworks-service-LambdaFunctionId'
    brickworks-service-NumberSubtype:
      type: string
      x-class-name: NumberSubtype
      x-interface-name-ts: NumberSubtype
      enum:
      - number
    brickworks-service-BooleanSubtype:
      type: string
      x-class-name: BooleanSubtype
      x-interface-name-ts: BooleanSubtype
      enum:
      - boolean
    brickworks-service-StringSubtype:
      type: string
      title: String subtype
      x-class-name: StringSubtype
      x-interface-name-ts: StringSubtype
      enum:
      - string
    brickworks-service-IntegerSubtype:
      type: string
      x-class-name: IntegerSubtype
      x-interface-name-ts: IntegerSubtype
      enum:
      - integer
    brickworks-service-EnumSubtype:
      type: string
      x-class-name: EnumSubtype
      x-interface-name-ts: EnumSubtype
      enum:
      - enum
    brickworks-service-DateSubtype:
      type: string
      x-class-name: DateSubtype
      x-interface-name-ts: DateSubtype
      enum:
      - date
    brickworks-service-DateTimeSubtype:
      type: string
      x-class-name: DateTimeSubtype
      x-interface-name-ts: DateTimeSubtype
      enum:
      - date-time
    brickworks-service-TypedArraySubtype:
      type: string
      x-class-name: TypedArraySubtype
      x-interface-name-ts: TypedArraySubtype
      enum:
      - typed_array
    brickworks-service-UuidSubtype:
      type: string
      x-class-name: UUIDSubtype
      x-interface-name-ts: UUIDSubtype
      enum:
      - uuid
    brickworks-service-JinJavaSubtype:
      type: string
      x-class-name: JinJavaSubtype
      x-interface-name-ts: JinJavaSubtype
      enum:
      - jinjava
    brickworks-service-CatalogItemSubtype:
      type: string
      x-class-name: CatalogItemSubtype
      x-interface-name-ts: CatalogItemSubtype
      enum:
      - catalog_item
    brickworks-service-KeyValueSubtype:
      type: string
      x-class-name: KeyValueSubtype
      x-interface-name-ts: KeyValueSubtype
      description: |
        This type of field is a reference to an external source. The request to an external source is made when you generate content from a record.

        **NOTE**: The `headers`, `params`, and `body` properties are not currently supported by the Synerise Portal.
      enum:
      - key_value
    brickworks-service-ExternalSourceSubtype:
      type: string
      x-class-name: ExternalSourceSubtype
      x-interface-name-ts: ExternalSourceSubtype
      enum:
      - external_source
    brickworks-service-OneToOneSubtype:
      type: string
      x-class-name: OneToOneSubtype
      x-interface-name-ts: OneToOneSubtype
      description: |
        This field type lets you include references to a record from another schema. To generate an object, the referenced record must be published. Its content (for example, an expression field in the referenced record) will be processed when generating an object.
      enum:
      - one_to_one
    brickworks-service-OneToManySubtype:
      type: string
      x-class-name: OneToManySubtype
      x-interface-name-ts: OneToManySubtype
      enum:
      - one_to_many
    brickworks-service-MetricSubtype:
      type: string
      x-class-name: MetricSubtype
      x-interface-name-ts: MetricSubtype
      enum:
      - metric
    brickworks-service-AggregateSubtype:
      type: string
      x-class-name: AggregateSubtype
      x-interface-name-ts: AggregateSubtype
      enum:
      - aggregate
    brickworks-service-ExpressionSubtype:
      type: string
      x-class-name: ExpressionSubtype
      x-interface-name-ts: ExpressionSubtype
      enum:
      - expression
    brickworks-service-PromotionSubtype:
      type: string
      x-class-name: PromotionSubtype
      x-interface-name-ts: PromotionSubtype
      enum:
      - promotion
    brickworks-service-FileSubtype:
      type: string
      x-class-name: FileSubtype
      x-interface-name-ts: FileSubtype
      description: This type of field lets you store links to [files uploaded to Synerise](https://hub.synerise.com/docs/assets/files-explorer/).
      enum:
      - file
    brickworks-service-ImageSubtype:
      type: string
      description: This type of field lets you store links to images.
      enum:
      - image
    brickworks-service-RecommendationSubtype:
      type: string
      x-class-name: RecommendationSubtype
      x-interface-name-ts: RecommendationSubtype
      description: This type of field lets you retrieve the result of a recommendation campaign.
      enum:
      - recommendation
    brickworks-service-AiSearchSubtype:
      type: string
      x-class-name: AiSearchSubtype
      x-interface-name-ts: AiSearchSubtype
      description: This type of field lets you retrieve results of an AI Search query against a chosen index.
      enum:
      - ai_search
    brickworks-service-AiSearchListingSubtype:
      type: string
      x-class-name: AiSearchListingSubtype
      x-interface-name-ts: AiSearchListingSubtype
      description: This type of field lets you retrieve listing results from an AI Search index (without a query phrase).
      enum:
      - ai_search_listing
    brickworks-service-VoucherSubtype:
      type: string
      x-class-name: VoucherSubtype
      x-interface-name-ts: VoucherSubtype
      description: This type of fields lets you retrieve a voucher from a pool. The voucher is retrieved when you generate an object from the record.
      enum:
      - voucher
    brickworks-service-UntypedObjectSubtype:
      type: string
      x-class-name: UntypedObjectSubtype
      x-interface-name-ts: UntypedObjectSubtype
      description: This type of field lets you save any JSON data in the record, without validating it against any schema
      enum:
      - untyped_object
    brickworks-service-UntypedArraySubtype:
      type: string
      x-class-name: UntypedArraySubtype
      x-interface-name-ts: UntypedArraySubtype
      enum:
      - untyped_array
    brickworks-service-UntypedFormSubtype:
      type: string
      x-class-name: UntypedFormSubtype
      x-interface-name-ts: UntypedFormSubtype
      enum:
      - json
    brickworks-service-ProfileAttributeSubtype:
      type: string
      x-class-name: ProfileAttributeSubtype
      x-interface-name-ts: ProfileAttributeSubtype
      description: This type of field references an attribute by name and retrieves its value.
      enum:
      - client_attribute
    brickworks-service-OneToManyFilterSubtype:
      type: string
      x-class-name: OneToManyFilterSubtype
      x-interface-name-ts: OneToManyFilterSubtype
      enum:
      - filter
      description: This field type allows you to retrieve records from another schema and filter/sort them
    brickworks-service-FieldFormMap:
      type: object
      x-class-name: FieldFormMap
      x-interface-name-ts: FieldFormMap
      description: Fields in the schema
      additionalProperties:
        $ref: '#/components/schemas/brickworks-service-FieldForm'
      x-typescript-type: '{ [key: string]: FieldForm }'
    brickworks-service-UpdateSchemaRequest:
      type: object
      x-class-name: UpdateSchemaRequest
      x-interface-name-ts: UpdateSchemaRequest
      description: Schema update request body
      required:
      - displayName
      properties:
        displayName:
          $ref: '#/components/schemas/brickworks-service-SchemaDisplayName'
        description:
          $ref: '#/components/schemas/brickworks-service-SchemaDescription'
        fields:
          $ref: '#/components/schemas/brickworks-service-FieldsObject'
        displayConfiguration:
          $ref: '#/components/schemas/brickworks-service-SchemaDisplayConfiguration'
        audience:
          $ref: '#/components/schemas/brickworks-service-Audience'
        lambdaId:
          $ref: '#/components/schemas/brickworks-service-LambdaFunctionId'
    brickworks-service-Meta:
      type: object
      description: Pagination metadata
      x-class-name: Meta
      x-interface-name-ts: Meta
      properties:
        links:
          type: array
          description: Links to the neighboring pages and the first page
          items:
            $ref: '#/components/schemas/brickworks-service-Link'
        limit:
          type: integer
          format: int32
          description: Limit of items per page
        count:
          type: integer
          nullable: true
          description: Currently unused
    brickworks-service-Link:
      type: object
      x-class-name: Link
      x-interface-name-ts: Link
      required:
      - url
      - rel
      properties:
        url:
          type: string
          description: URL of the page, used for navigation
        rel:
          type: string
          description: The type of relation to the current page. `first` is always the first page.
          enum:
          - first
          - prev
          - next
    brickworks-service-ObjectsError:
      type: object
      x-class-name: ObjectsError
      x-interface-name-ts: ObjectsError
      required:
      - httpStatus
      - errorCode
      - timestamp
      - message
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        errorCode:
          type: string
          description: |
            Code of the error, needed for troubleshooting

            See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
        httpStatus:
          type: integer
          description: Error's HTTP status code
        message:
          type: string
          description: Description of the problem
        traceId:
          type: string
          description: Unique identifier of the request, useful for tracing logs
        errors:
          type: array
          items:
            $ref: '#/components/schemas/brickworks-service-ObjectsError'
        source:
          type: object
          x-class-name: ObjectErrorSource
          x-interface-name-ts: ObjectErrorSource
          required:
          - pointer
          properties:
            pointer:
              type: string
              description: JSON Pointer for invalid body path
            value:
              type: string
              description: Value that caused the validation error
        details:
          type: object
          x-class-name: ObjectsErrorDetails
          x-interface-name-ts: ObjectsErrorDetails
          additionalProperties:
            type: object
          description: Additional structured error information
        field:
          type: string
          description: Name of the field that caused the error
    brickworks-service-RecordPagingResult:
      type: object
      x-class-name: RecordPagingResult
      x-interface-name-ts: RecordPagingResult
      required:
      - meta
      - data
      properties:
        meta:
          $ref: '#/components/schemas/brickworks-service-Meta'
        data:
          type: array
          description: Array of records
          items:
            $ref: '#/components/schemas/brickworks-service-ListRecordView'
    brickworks-service-ListRecordView:
      type: object
      x-class-name: ListRecordView
      x-interface-name-ts: RecordWithoutFields
      description: Record object
      required:
      - id
      - schemaId
      - createdBy
      - updatedBy
      - createdAt
      - updatedAt
      - status
      - recordVersion
      properties:
        id:
          $ref: '#/components/schemas/brickworks-service-RecordId'
        name:
          $ref: '#/components/schemas/brickworks-service-RecordName'
        schemaId:
          $ref: '#/components/schemas/brickworks-service-SchemaId'
        createdBy:
          $ref: '#/components/schemas/brickworks-service-CreatedBy'
        updatedBy:
          $ref: '#/components/schemas/brickworks-service-UpdatedBy'
        publishedBy:
          $ref: '#/components/schemas/brickworks-service-PublishedBy'
        deletedBy:
          $ref: '#/components/schemas/brickworks-service-DeletedBy'
        createdAt:
          $ref: '#/components/schemas/brickworks-service-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/brickworks-service-UpdatedAt'
        publishedAt:
          $ref: '#/components/schemas/brickworks-service-PublishedAt'
        deletedAt:
          $ref: '#/components/schemas/brickworks-service-DeletedAt'
        slug:
          $ref: '#/components/schemas/brickworks-service-RecordSlug'
        status:
          $ref: '#/components/schemas/brickworks-service-RecordStatus'
        values:
          $ref: '#/components/schemas/brickworks-service-RecordValues'
        schemaVersion:
          type: integer
          format: int32
          description: The ID of the schema version that was used when this record was last updated. For simple schemas, this is always `1`.
        recordVersion:
          $ref: '#/components/schemas/brickworks-service-RecordVersionNumber'
        schedule:
          $ref: '#/components/schemas/brickworks-service-ScheduleEntry'
    brickworks-service-RecordId:
      type: string
      format: uuid
      description: |
        Unique identifier of a record, generated by the system. Can't be changed.

        This identifier is common to all versions of the record, even when the slug changes.

        In singleton-type schemas, use the schema's `appId` or `id` in place of record identifiers for generating content.
    brickworks-service-RecordSlug:
      type: string
      minLength: 6
      maxLength: 40
      pattern: ^([a-zA-Z0-9\-]|_[a-zA-Z0-9\-])[\w\-]*
      description: |
        Unique (within a schema) identifier of a record. Can't be a UUID.

        In singleton-type schemas, use the schema's `appId` or `id` in place of record identifiers for generating content.
    brickworks-service-RecordName:
      type: string
      maxLength: 255
      minLength: 1
      nullable: true
      description: The name of the record. If not defined and there are no fields with `useAsRecordName = true`, GET requests return `Unnamed`.
    brickworks-service-RecordStatus:
      type: string
      x-class-name: RecordStatus
      x-interface-name-ts: RecordStatus
      description: "Status of the record. When generating an object from a record, the last published version is used.  \n- In simple schemas, a record can only be published. Updates overwrite the record without changing the version number.\n- In versioned schemas:\n    - A published record can't be edited directly. You need to send an update which changes to the draft status (this increases the version number, and the existing published version isn't modified), and then publish again.\n    - An unpublished record can't be published immediately. It must receive the draft status first.\n    - When unpublishing a record, you can't edit any data in the record.\n"
      enum:
      - DRAFT
      - SCHEDULED
      - PUBLISHED
      - UNPUBLISHED
    brickworks-service-ScheduleType:
      type: string
      x-class-name: ScheduleType
      x-interface-name-ts: ScheduleType
      enum:
      - PUBLISH
    brickworks-service-ScheduleEntry:
      type: object
      x-class-name: ScheduleEntry
      x-interface-name-ts: ScheduleEntry
      description: Time when the record is published - for example, every Monday, from 12:00 to 14:00
      properties:
        timezone:
          type: string
          description: Timezone of the schedule, as `UTC+offset` or according to the [tz database](https://en.wikipedia.org/wiki/Tz_database).
          example: UTC+01:00
        startType:
          type: string
          description: If `NOW`, the record is published immediately upon saving.
          enum:
          - NOW
          - SCHEDULED
        startDate:
          type: string
          description: Time when the schedule becomes active. If `startType` is NOW, this field is null.
          format: date-time
        endType:
          type: string
          description: Mode of inactivating the schedule
          enum:
          - NEVER
          - DATE
        endDate:
          type: string
          description: Time when the schedule becomes inactive, if `endType = DATE`
          format: date-time
        periodType:
          type: string
          description: |
            Defines when the schedule applies within its activity period.

            - ENTIRE: schedule is applied at all time since it becomes active until it becomes inactive.
            - DAILY: schedule is active every day, at specific times
            - WEEKLY: schedule is applied at specified days of the week (and optionally at specific times during those days)
            - MONTHLY: schedule is applied at specified days of the month (and optionally at specific times during those days)
            - WEEKDAY: schedule is applied on specified weekdays of a month; for example on the second Tuesday of each month
          enum:
          - ENTIRE
          - DAILY
          - WEEKLY
          - MONTHLY
          - WEEKDAY
        parts:
          type: array
          description: |
            An array of time rules that allow more granularity. All objects must match the period type set in `periodType` (for example, you cannot mix weekly and monthly conditions).

            If `periodType` is `ENTIRE`, this array is empty.
          items:
            $ref: '#/components/schemas/brickworks-service-EntryScheduleRepeatPart'
        enabled:
          type: boolean
          description: Defines if the schedule configuration is enabled. A schedule must be enabled in order to become active at the selected time.
      required:
      - timezone
      - startType
      - startDate
      - endType
      - enabled
    brickworks-service-EntryScheduleRepeatPart:
      type: object
      x-class-name: EntryScheduleRepeatPart
      x-interface-name-ts: EntryScheduleRepeatPart
      properties:
        startDay:
          type: integer
          format: int32
          example: 1
          description: "If `periodType` is:\n\n- DAILY, the value is always 1.\n\n- WEEKLY or WEEKDAY, the values are 1-7 (1 is Monday).\n\n- MONTHLY, the values are 1-31 (days of the month).\n\n**Note:**  \nIf you want to define two time rules for a day (for example, the schedule is active on Monday at 06:00-07:00 and 15:00-16:00), create a separate `part` object for each time period.\n"
        startTime:
          type: string
          example: 08:18:03
          description: The hour when the schedule becomes active.
        endDay:
          type: integer
          format: int32
          example: 1
          description: Must be identical to `startDay`.
        endTime:
          type: string
          example: '12:18:03'
          description: The hour when the schedule becomes inactive.
        ordinal:
          type: string
          description: "\nApplies only if `periodType` is WEEKDAY.\n\n**Example:**<br/>\nIf you want a schedule to be active on every third Tuesday of the month, set `ordinal` to THIRD and `startDay` to 2. \n\n**Note:**<br/>\nIf you want a schedule to be active on every second and third Tuesday, you must create two separate `part` objects.\n"
          enum:
          - FIRST
          - SECOND
          - THIRD
          - FOURTH
          - FIFTH
          - LAST
      required:
      - startDay
      - startTime
      - endDay
      - endTime
    brickworks-service-RecordVersionNumber:
      type: number
      format: int32
      description: "Identifier of the record version. \n- In simple schemas, this is always `1`\n- In versioned schemas, the versions start with `1` on creation and are increased by 1 when you create a new draft. Publishing from a draft does NOT increase the version number.\n"
    brickworks-service-AddRecordToSchemaRequest:
      type: object
      x-class-name: AddRecordToSchemaRequest
      x-interface-name-ts: AddRecordToSchemaRequest
      required:
      - values
      - status
      properties:
        slug:
          $ref: '#/components/schemas/brickworks-service-RecordSlug'
        values:
          $ref: '#/components/schemas/brickworks-service-RecordValues'
        status:
          $ref: '#/components/schemas/brickworks-service-RecordStatus'
        actionOnSchedule:
          $ref: '#/components/schemas/brickworks-service-ScheduleType'
        schedule:
          $ref: '#/components/schemas/brickworks-service-ScheduleEntry'
        name:
          $ref: '#/components/schemas/brickworks-service-RecordName'
    brickworks-service-RecordValues:
      type: object
      x-class-name: RecordValues
      x-interface-name-ts: RecordValues
      description: |
        Values included in the record. Each key is the name of a field. The value must match the configuration of the field in the schema.

        **Default values aren't explicitly saved in the record** or shown in GET requests which retrieve the record, but are returned when an object is generated from the record.

        Supported value types:
        - Float (number)
        - Integer
        - String
        - Boolean
        - Date (string, format: date)
        - Date-time (string, format: date-time)
        - Profile attribute (object with attributeName)
        - Typed array
        - UUID (string, format: uuid)
        - Jinjava (string)
        - Catalog (object with itemKey, id)
        - Object (free-form)
        - External source (empty object)
        - One-to-one reference (string - record ID)
        - One-to-many reference (array of record IDs)
        - Analysis (string, format: uuid)
        - Promotion (string - promotion ID)
        - File/Image (string - file ID)
        - Recommendation (object with id, params)
        - Voucher (object with id)
        - Untyped JSON (object)
        - Untyped array
      additionalProperties: true
      example:
        stringField: example string
        numberField: 123.45
        integerField: 42
        booleanField: true
        dateField: '2024-01-15'
        dateTimeField: '2024-01-15T10:30:00Z'
        uuidField: 550e8400-e29b-41d4-a716-446655440000
        arrayField:
        - item1
        - item2
        objectField:
          key: value
        profileAttribute:
          attributeName: email
        catalog:
          itemKey: SKU123
          id: catalog-id
        recommendation:
          id: recommendation-campaign-id
          params:
            itemId: item-123
    brickworks-service-Record:
      x-class-name: Record
      x-interface-name-ts: Record
      allOf:
      - type: object
        required:
        - id
        - schemaId
        - values
        - createdBy
        - updatedBy
        - createdAt
        - updatedAt
        - status
        - recordVersion
        properties:
          id:
            $ref: '#/components/schemas/brickworks-service-RecordId'
          name:
            $ref: '#/components/schemas/brickworks-service-RecordName'
          schemaId:
            $ref: '#/components/schemas/brickworks-service-SchemaId'
          createdBy:
            $ref: '#/components/schemas/brickworks-service-CreatedBy'
          updatedBy:
            $ref: '#/components/schemas/brickworks-service-UpdatedBy'
          publishedBy:
            $ref: '#/components/schemas/brickworks-service-PublishedBy'
          deletedBy:
            $ref: '#/components/schemas/brickworks-service-DeletedBy'
          createdAt:
            $ref: '#/components/schemas/brickworks-service-CreatedAt'
          updatedAt:
            $ref: '#/components/schemas/brickworks-service-UpdatedAt'
          publishedAt:
            $ref: '#/components/schemas/brickworks-service-PublishedAt'
          deletedAt:
            $ref: '#/components/schemas/brickworks-service-DeletedAt'
          slug:
            $ref: '#/components/schemas/brickworks-service-RecordSlug'
          status:
            $ref: '#/components/schemas/brickworks-service-RecordStatus'
          values:
            $ref: '#/components/schemas/brickworks-service-RecordValues'
          schemaVersion:
            type: integer
            format: int32
            description: The ID of the schema version that was used when this record was last updated. For simple schemas, this is always `1`.
          recordVersion:
            $ref: '#/components/schemas/brickworks-service-RecordVersionNumber'
          schedule:
            $ref: '#/components/schemas/brickworks-service-ScheduleEntry'
    brickworks-service-UpdateRecordRequest:
      type: object
      x-class-name: UpdateRecordRequest
      x-interface-name-ts: UpdateRecordRequest
      properties:
        status:
          $ref: '#/components/schemas/brickworks-service-RecordStatus'
        values:
          $ref: '#/components/schemas/brickworks-service-RecordValues'
        actionOnSchedule:
          $ref: '#/components/schemas/brickworks-service-ScheduleType'
        schedule:
          $ref: '#/components/schemas/brickworks-service-ScheduleEntry'
        slug:
          $ref: '#/components/schemas/brickworks-service-RecordSlug'
        lastUpdatedAt:
          type: string
          description: |
            If updating a draft keeping the draft status, you can check if it was updated by another request in the meantime:
              1. Fetch a draft record.
              2. Copy the `updatedAt` property into your update request.
              3. Make other changes in the record.
              4. Send the update.
              5. If the update time you sent is different than the one in the database, it means that the record was updated since you last fetched it. Your update is ignored and error BKW-029 (HTTP 409) is returned.
          format: date-time
        name:
          $ref: '#/components/schemas/brickworks-service-RecordName'
        fromState:
          $ref: '#/components/schemas/brickworks-service-RecordStatus'
    brickworks-service-GenerateRequest:
      type: object
      x-class-name: GenerateRequest
      x-interface-name-ts: GenerateRequest
      required:
      - identifierValue
      properties:
        identifierValue:
          type: string
          description: Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)
        context:
          $ref: '#/components/schemas/brickworks-service-Context'
        fieldContext:
          $ref: '#/components/schemas/brickworks-service-FieldContext'
    brickworks-service-GenerateRequestWithoutIdentifier:
      type: object
      x-class-name: GenerateRequestWithoutIdentifier
      x-interface-name-ts: GenerateRequestWithoutIdentifier
      properties:
        context:
          $ref: '#/components/schemas/brickworks-service-Context'
        fieldContext:
          $ref: '#/components/schemas/brickworks-service-FieldContext'
    brickworks-service-GeneratedObject:
      type: object
      x-class-name: GeneratedObject
      x-interface-name-ts: GeneratedObject
      description: Processed content of a record
      properties:
        __slug:
          $ref: '#/components/schemas/brickworks-service-RecordSlug'
        __recordVersion:
          $ref: '#/components/schemas/brickworks-service-RecordVersionNumber'
        __publishedAt:
          type: string
          format: date-time
          description: Record publishing time
        __updatedAt:
          type: string
          format: date-time
          description: Last record update time
        __schemaId:
          $ref: '#/components/schemas/brickworks-service-SchemaId'
        __id:
          $ref: '#/components/schemas/brickworks-service-RecordId'
        __schemaVersion:
          $ref: '#/components/schemas/brickworks-service-SchemaVersion'
        __createdAt:
          type: string
          format: date-time
          description: Record creation time
        __matchedAudience:
          type: boolean
          description: |
            Indicates whether the client matched the audience defined on the schema. `true` when the client belongs to the target audience (or when no audience is defined), `false` when the client does not match the top-level schema audience.
        __unmatchedAudienceRelations:
          type: array
          description: |
            List of relation field names whose referenced schemas have an audience that the client did not match. These fields are returned as `null` in the response. Only present when at least one relation is audience-restricted for the given client.
          items:
            type: string
        __logs:
          description: |
            Lambdas transformer user logs content, available only in preview mode
          type: array
          items:
            $ref: '#/components/schemas/brickworks-service-LogEntry'
      additionalProperties: true
      example:
        __slug: my-record-slug
        __recordVersion: 1
        __publishedAt: '2024-01-15T10:30:00Z'
        __updatedAt: '2024-01-15T10:30:00Z'
        __schemaId: 550e8400-e29b-41d4-a716-446655440000
        __id: 550e8400-e29b-41d4-a716-446655440001
        __schemaVersion: 1
        __createdAt: '2024-01-15T10:30:00Z'
        customStringField: string value
        customNumberField: 123.45
        customBooleanField: true
        customDateField: '2024-01-15'
        customArrayField:
        - item1
        - item2
        customObjectField:
          nestedKey: nestedValue
        __matchedAudience: true
        __unmatchedAudienceRelations:
        - deniedRefField
    brickworks-service-Context:
      type: object
      x-class-name: Context
      x-interface-name-ts: Context
      description: Additional context parameters. You can use these parameters in Jinjava fields by calling `{{ context.keyName }}`. The value will be printed as a string.
      additionalProperties:
        description: In Jinjava, you can retrieve the value of a key from this object by `{{ context.keyName }}`
    brickworks-service-FieldContext:
      type: object
      x-class-name: FieldContext
      x-interface-name-ts: FieldContext
      description: Additional context parameters used in recommendation and relation fields.
      additionalProperties:
        $ref: '#/components/schemas/brickworks-service-FieldContextItem'
    brickworks-service-FieldContextItem:
      type: object
      x-class-name: FieldContextItem
      x-interface-name-ts: FieldContextItem
      description: The names of the objects correspond to the names of the fields where the object's data is used
      additionalProperties: true
      example:
        page: 1
        limit: 10
        itemId: item-123
        additionalFilters: custom filter value
    brickworks-service-FieldContextConfig:
      type: object
      x-class-name: FieldContextConfig
      x-interface-name-ts: FieldContextConfig
      required:
      - fields
      properties:
        fields:
          type: array
          items:
            $ref: '#/components/schemas/brickworks-service-FieldContextConfigField'
    brickworks-service-FieldContextConfigField:
      type: object
      x-class-name: FieldContextConfigField
      x-interface-name-ts: FieldContextConfigField
      required:
      - fieldName
      - descriptors
      properties:
        fieldName:
          type: string
        descriptors:
          type: array
          items:
            $ref: '#/components/schemas/brickworks-service-FieldContextDescriptor'
    brickworks-service-FieldContextDescriptor:
      type: object
      x-class-name: FieldContextDescriptor
      x-interface-name-ts: FieldContextDescriptor
      required:
      - name
      - type
      properties:
        name:
          type: string
        type:
          x-class-name: FieldContextDescriptorType
          type: string
          enum:
          - string
          - integer
          - number
          - boolean
          - unknown
    brickworks-service-PreviewRequest:
      type: object
      x-class-name: PreviewRequest
      x-interface-name-ts: PreviewRequest
      required:
      - identifierValue
      - schema
      properties:
        identifierValue:
          type: string
          description: Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)
        context:
          $ref: '#/components/schemas/brickworks-service-Context'
        fieldContext:
          $ref: '#/components/schemas/brickworks-service-FieldContext'
        values:
          $ref: '#/components/schemas/brickworks-service-PreviewValues'
        schema:
          $ref: '#/components/schemas/brickworks-service-SchemaPreviewData'
    brickworks-service-PreviewValues:
      type: object
      x-class-name: PreviewValues
      x-interface-name-ts: PreviewValues
      description: The values for fields in the record, to be used when generating the preview.
      additionalProperties:
        description: Each key in this object corresponds to a field name.
    brickworks-service-PreviewRequestWithoutIdentifier:
      type: object
      x-class-name: PreviewRequestWithoutIdentifier
      x-interface-name-ts: PreviewRequestWithoutIdentifier
      required:
      - schema
      properties:
        context:
          $ref: '#/components/schemas/brickworks-service-Context'
        fieldContext:
          $ref: '#/components/schemas/brickworks-service-FieldContext'
        values:
          $ref: '#/components/schemas/brickworks-service-PreviewValues'
        schema:
          $ref: '#/components/schemas/brickworks-service-SchemaPreviewData'
        lambdaId:
          $ref: '#/components/schemas/brickworks-service-LambdaFunctionId'
    brickworks-service-CreateExternalSourceRequest:
      type: object
      x-class-name: CreateExternalSourceRequest
      x-interface-name-ts: CreateExternalSourceRequest
      properties:
        name:
          type: string
        description:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceDescription'
        properties:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceProperties'
        ttl:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceTtl'
      required:
      - name
      - properties
    brickworks-service-ExternalSourceTtl:
      type: number
      format: int32
      description: Cache TTL for connection response, in seconds
    brickworks-service-ExternalSourceName:
      type: string
      description: Human-readable name of the external resource
      maxLength: 255
    brickworks-service-ExternalSourceId:
      type: string
      description: Unique ID of the external source definition
      format: uuid
    brickworks-service-ExternalSourceDescription:
      type: string
      maxLength: 255
      description: Description of the external source
    brickworks-service-ExternalSourceProperties:
      type: object
      x-class-name: ExternalSourceProperties
      x-interface-name-ts: ExternalSourceProperties
      description: The details of the external source configuration
      properties:
        sourceType:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceSourceType'
        url:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceUrl'
        method:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceMethod'
        headers:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceHeaders'
        params:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceParams'
        authType:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceAuthType'
        authId:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceAuthId'
        body:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceBody'
        bodySchema:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceBodySchema'
      required:
      - sourceType
      - url
      - method
    brickworks-service-ExternalSourceSourceType:
      type: string
      x-class-name: ExternalSourceType
      x-interface-name-ts: ExternalSourceType
      enum:
      - http_source
    brickworks-service-ExternalSourceMethod:
      type: string
      description: The HTTP method used in the external request. The `body` and `bodySchema` properties can only be used in POST requests.
      enum:
      - post
      - get
    brickworks-service-ExternalSourceUrl:
      type: string
      description: URL address of the resource, including the `https` protocol. May include Jinjava inserts.
      example: https://example.com/clients/{% customer email %}
    brickworks-service-ExternalSourceHeaders:
      type: object
      x-class-name: ExternalSourceHeaders
      x-interface-name-ts: ExternalSourceHeaders
      description: Headers added to the request
      additionalProperties:
        type: string
        description: Each key is the name of the header, and the value is the header's value.
    brickworks-service-ExternalSourceParams:
      type: object
      x-class-name: ExternalSourceParams
      x-interface-name-ts: ExternalSourceParams
      description: Query parameters added to the URL
      additionalProperties:
        type: string
        description: A key/value pair
    brickworks-service-ExternalSourceAuthType:
      type: string
      x-class-name: ExternalSourceAuthType
      x-interface-name-ts: ExternalSourceAuthType
      enum:
      - basic
      - api_key
      - custom
      description: The mode of authentication used by this external source
    brickworks-service-ExternalSourceAuthId:
      type: string
      format: uuid
      description: Unique identifier of a [connection](https://hub.synerise.com/docs/settings/tool/connections/) used by this external source.
    brickworks-service-ExternalSourceBody:
      type: object
      x-class-name: ExternalSourceBody
      x-interface-name-ts: ExternalSourceBody
      description: The request body sent to the external source
      additionalProperties:
        description: JSON content. If you want to use JinJava in a value, use `bodySchema` to define which fields accept Jinjava.
      example:
        someString: string
        someObject:
          key: '{% customer email %}'
        dynamicField: '{% customer id %}'
    brickworks-service-ExternalSourceBodySchema:
      type: object
      title: External source body schema
      x-class-name: ExternalSourceBodySchema
      x-interface-name-ts: ExternalSourceBodySchema
      description: A schema which defines which fields in the request body have dynamic values inserted with Jinjava. Static parameters don't need to be listed in this schema.
      properties:
        properties:
          description: |
            The properties in the request body. You only need to define dynamic values (jinjava strings), and if they are nested in an object, use the `object` schema to define that structure.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/brickworks-service-BodySchemaEntity'
        type:
          type: string
          description: Objects can include or other objects (recursive schema)
          enum:
          - object
        subtype:
          $ref: '#/components/schemas/brickworks-service-KeyValueSubtype'
        additionalProperties:
          type: boolean
          description: Defines if the object can include other properties than the one listed in the schema
          enum:
          - true
      example:
        type: object
        subtype: key_value
        properties:
          someObject:
            type: object
            subtype: key_value
            properties:
              key:
                type: string
                subtype: jinjava
            additionalProperties: true
          dynamicField:
            type: string
            subtype: jinjava
        additionalProperties: true
    brickworks-service-BodySchemaEntity:
      type: object
      x-class-name: BodySchemaEntity
      x-interface-name-ts: BodySchemaEntity
      description: The object name corresponds to a key name in the request body.
      additionalProperties:
        oneOf:
        - $ref: '#/components/schemas/brickworks-service-ExternalSourceBodySchema'
        - $ref: '#/components/schemas/brickworks-service-BodySchemaString'
        discriminator:
          propertyName: subtype
          mapping:
            jinjava: '#/components/schemas/brickworks-service-BodySchemaString'
            key_value: '#/components/schemas/brickworks-service-ExternalSourceBodySchema'
      x-typescript-type: '{ [key: string]: BodySchemaEntity }'
    brickworks-service-BodySchemaString:
      type: object
      title: String
      x-class-name: BodySchemaString
      x-interface-name-ts: BodySchemaString
      properties:
        type:
          $ref: '#/components/schemas/brickworks-service-StringType'
        subtype:
          $ref: '#/components/schemas/brickworks-service-JinJavaSubtype'
        settings:
          $ref: '#/components/schemas/brickworks-service-JinJavaSettings'
    brickworks-service-ExternalSourceModel:
      type: object
      x-class-name: ExternalSourceModel
      x-interface-name-ts: ExternalSourceModel
      properties:
        id:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceId'
        name:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceName'
        description:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceDescription'
        properties:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceProperties'
        createdBy:
          $ref: '#/components/schemas/brickworks-service-CreatedBy'
        createdAt:
          $ref: '#/components/schemas/brickworks-service-CreatedAt'
        updatedBy:
          $ref: '#/components/schemas/brickworks-service-UpdatedBy'
        updatedAt:
          $ref: '#/components/schemas/brickworks-service-UpdatedAt'
        ttl:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceTtl'
      required:
      - id
      - name
      - properties
      - createdBy
      - createdAt
      - updatedAt
    brickworks-service-UpdateExternalSourceRequest:
      type: object
      x-class-name: UpdateExternalSourceRequest
      x-interface-name-ts: UpdateExternalSourceRequest
      properties:
        name:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceName'
        description:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceDescription'
        properties:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceProperties'
        ttl:
          type: number
          format: int32
    brickworks-service-RecordVersionPagingResult:
      type: object
      x-class-name: RecordVersionPagingResult
      x-interface-name-ts: RecordVersionPagingResult
      required:
      - meta
      - data
      properties:
        meta:
          $ref: '#/components/schemas/brickworks-service-Meta'
        data:
          type: array
          description: Array of record versions
          items:
            $ref: '#/components/schemas/brickworks-service-RecordVersion'
    brickworks-service-RecordVersion:
      x-class-name: RecordVersion
      x-interface-name-ts: RecordVersion
      allOf:
      - type: object
        properties:
          versionId:
            format: uuid
            type: string
            description: Unique identifier of a record version
      - $ref: '#/components/schemas/brickworks-service-Record'
    brickworks-service-ExternalSourcePagingResult:
      type: object
      x-class-name: ExternalSourcePagingResult
      x-interface-name-ts: ExternalSourcePagingResult
      required:
      - meta
      - data
      properties:
        meta:
          $ref: '#/components/schemas/brickworks-service-Meta'
        data:
          type: array
          description: Array of external sources
          items:
            $ref: '#/components/schemas/brickworks-service-ExternalSourceSimplifiedView'
    brickworks-service-ExternalSourceSimplifiedView:
      type: object
      x-class-name: ExternalSourceSimplifiedView
      x-interface-name-ts: ExternalSourceSimplifiedView
      properties:
        id:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceId'
        name:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceName'
        method:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceMethod'
        description:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceDescription'
        sourceType:
          $ref: '#/components/schemas/brickworks-service-ExternalSourceSourceType'
        createdBy:
          $ref: '#/components/schemas/brickworks-service-CreatedBy'
        createdAt:
          $ref: '#/components/schemas/brickworks-service-CreatedAt'
        updatedBy:
          $ref: '#/components/schemas/brickworks-service-UpdatedBy'
        updatedAt:
          $ref: '#/components/schemas/brickworks-service-UpdatedAt'
      required:
      - id
      - name
      - createdBy
      - createdAt
      - updatedAt
    brickworks-service-AsyncRecordRequest:
      type: object
      x-class-name: AsyncRecordRequest
      x-interface-name-ts: AsyncRecordRequest
      description: Async record request
      required:
      - identifier
      - values
      properties:
        identifier:
          type: object
          description: Definition of a unique identifier of a record
          properties:
            name:
              type: string
              description: |
                The name of the identifier. By default, `slug` and `id` are always available. You can also use a field that was configured as `unique`.

                In this field, provide the current identifier. If you want to change the identifier with the request, send it in `values` (for unique fields) or `slug`.
            value:
              description: The value of the selected identifier (slug or a field that was configured as unique)
              oneOf:
              - type: string
              - type: number
              - type: boolean
        values:
          $ref: '#/components/schemas/brickworks-service-RecordValues'
        slug:
          $ref: '#/components/schemas/brickworks-service-RecordSlug'
        name:
          $ref: '#/components/schemas/brickworks-service-RecordName'
    brickworks-service-207ResponseBody:
      type: array
      x-class-name: ResponseBody207
      x-interface-name-ts: ResponseBody207
      items:
        type: object
        properties:
          identifier:
            type: object
            properties:
              name:
                type: string
                description: The name of the identifier you used
              value:
                type: string
                description: The value of the identifier
          errors:
            type: array
            description: Errors that occurred for this record
            items:
              $ref: '#/components/schemas/brickworks-service-ObjectsError'
    brickworks-service-ValidationConditions:
      type: object
      description: Additional validation for the fields. To learn how to use them, see the [JSON Schema documentation](https://json-schema.org/understanding-json-schema/reference/conditionals#ifthenelse).
      x-class-name: ValidationConditions
      x-interface-name-ts: ValidationConditions
      properties:
        if:
          $ref: '#/components/schemas/brickworks-service-ValidationStatement'
        then:
          $ref: '#/components/schemas/brickworks-service-ValidationStatement'
        else:
          $ref: '#/components/schemas/brickworks-service-ValidationStatement'
      required:
      - if
      - then
    brickworks-service-ValidationStatement:
      type: object
      x-class-name: ValidationStatement
      x-interface-name-ts: ValidationStatement
      properties:
        required:
          type: array
          items:
            type: string
        properties:
          additionalProperties:
            $ref: '#/components/schemas/brickworks-service-FieldCondition'
      required:
      - required
      - properties
    brickworks-service-FieldCondition:
      type: object
      x-class-name: FieldCondition
      x-interface-name-ts: FieldCondition
      properties:
        minItems:
          type: number
          format: int32
        maxItems:
          type: number
          format: int32
        uniqueItems:
          type: boolean
        minimum:
          type: number
          format: int32
        maximum:
          type: number
          format: int32
        pattern:
          type: string
        const:
          title: FieldConditionConstant
          x-class-name: FieldConditionConstant
          x-interface-name-ts: FieldConditionConstant
          nullable: true
        enum:
          type: array
          items:
            type: string
        not:
          $ref: '#/components/schemas/brickworks-service-FieldCondition'
    brickworks-service-StringType:
      type: string
      title: String type
      x-class-name: StringType
      x-interface-name-ts: StringType
      enum:
      - string
    brickworks-service-IntegerType:
      type: string
      title: IntegerType
      x-class-name: IntegerType
      x-interface-name-ts: IntegerType
      enum:
      - integer
    brickworks-service-BooleanType:
      type: string
      title: Boolean
      x-class-name: BooleanType
      x-interface-name-ts: BooleanType
      enum:
      - boolean
    brickworks-service-NumberType:
      type: string
      title: Number type
      x-class-name: NumberType
      x-interface-name-ts: NumberType
      enum:
      - number
    brickworks-service-ObjectType:
      type: string
      title: Object type
      x-class-name: ObjectType
      x-interface-name-ts: ObjectType
      enum:
      - object
    brickworks-service-ArrayType:
      type: string
      title: ArrayType
      x-class-name: ArrayType
      x-interface-name-ts: ArrayType
      enum:
      - array
    brickworks-service-LambdaFunctionId:
      type: string
      format: uuid
      description: |
        Unique identifier of the lambda function, generated by the system. Can't be changed.

        This identifier is common to all versions of the function and is used to reference the function in every endpoint.
    brickworks-service-LogEntry:
      type: object
      properties:
        level:
          type: string
        message:
          type: string
      required:
      - level
      - message
    brickworks-service-GatewayError:
      type: object
      x-class-name: GatewayError
      x-interface-name-ts: GatewayError
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        message:
          type: string
          description: Description of the problem
    business-profile-service-OrganizationDailyUsageReportRequest:
      type: object
      properties:
        from:
          type: string
          example: '2025-05-29'
          description: First day to retrieve, in `YYYY-MM-DD` format
        to:
          type: string
          example: '2025-05-30'
          description: Last day to retrieve, in `YYYY-MM-DD` format
        actions:
          type: array
          description: You can limit the events added to the report. Without this parameter, all events are included.
          items:
            type: string
            example: page.visit
        bpGuids:
          type: array
          description: You can limit the workspaces added to the report. Without this parameter, all workspaces in the organization are included.
          items:
            type: string
            format: uuid
            example: 34eea35e-3ac4-44f4-95b5-fd00a3b45eff
      required:
      - from
      - to
    business-profile-service-UserId:
      type: integer
      description: Unique ID of a Synerise user
    business-profile-service-WorkspaceName:
      type: string
      description: Name of the workspace
    business-profile-service-WorkspaceSubdomain:
      type: string
      description: Subdomain of the workspace
    business-profile-service-WorkspaceLogo:
      type: string
      description: Logo of the workspace
    business-profile-service-WorkspaceHash:
      type: string
      description: Hash ID of the workspace
    business-profile-service-WorkspaceGuid:
      type: string
      format: uuid
      description: GUID of the workspace
    business-profile-service-CreationDate:
      type: integer
      format: int64
      description: Creation date
    business-profile-service-LastUpdateTime:
      type: integer
      format: int64
      description: Last update time
    business-profile-service-OrganizationWorkspacesResponse:
      type: object
      properties:
        organizationGuid:
          $ref: '#/components/schemas/business-profile-service-WorkspaceGuid'
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/business-profile-service-BusinessProfileResponse'
    business-profile-service-BusinessProfileResponse:
      type: object
      description: List of workspaces
      properties:
        name:
          $ref: '#/components/schemas/business-profile-service-WorkspaceName'
        subdomain:
          $ref: '#/components/schemas/business-profile-service-WorkspaceSubdomain'
        logo:
          $ref: '#/components/schemas/business-profile-service-WorkspaceLogo'
        hash:
          $ref: '#/components/schemas/business-profile-service-WorkspaceHash'
        guid:
          $ref: '#/components/schemas/business-profile-service-WorkspaceGuid'
        created:
          $ref: '#/components/schemas/business-profile-service-CreationDate'
        updated:
          $ref: '#/components/schemas/business-profile-service-LastUpdateTime'
    business-profile-service-BusinessProfileExtendedResponse:
      type: object
      properties:
        id:
          type: number
          format: int64
          description: ID of the workspace
        guid:
          $ref: '#/components/schemas/business-profile-service-WorkspaceGuid'
        organizationId:
          type: number
          format: int64
          description: ID of the organization
        organizationGuid:
          type: string
          format: uuid
          description: GUID of the organization
        name:
          $ref: '#/components/schemas/business-profile-service-WorkspaceName'
        subdomain:
          $ref: '#/components/schemas/business-profile-service-WorkspaceSubdomain'
        logo:
          $ref: '#/components/schemas/business-profile-service-WorkspaceLogo'
        hash:
          $ref: '#/components/schemas/business-profile-service-WorkspaceHash'
        created:
          $ref: '#/components/schemas/business-profile-service-CreationDate'
        updated:
          $ref: '#/components/schemas/business-profile-service-LastUpdateTime'
        ipRestriction:
          type: string
          enum:
          - 'OFF'
          - PASSB
          - FAIL
          - ENFORCED
        mfaRestriction:
          type: string
          enum:
          - 'OFF'
          - PASS
          - FAIL
          - ENFORCED
        tags:
          type: array
          items:
            type: string
        favorite:
          type: boolean
    business-profile-service-BusinessProfileGroupSimpleResponse:
      type: object
      description: The group that this workspace belongs to (if applicable)
      properties:
        id:
          type: string
          format: uuid
          description: ID of the group
        name:
          type: string
          description: Name of the group
        profileIdentifier:
          type: string
          description: Profile identifier (key) used in the group
        createdAt:
          type: string
          format: date-time
          description: Creation time
        updatedAt:
          type: string
          format: date-time
          description: Last update time
    business-profile-service-BusinessProfileForOrganizationUserResponse:
      type: object
      properties:
        author:
          $ref: '#/components/schemas/business-profile-service-UserId'
        name:
          $ref: '#/components/schemas/business-profile-service-WorkspaceName'
        subdomain:
          $ref: '#/components/schemas/business-profile-service-WorkspaceSubdomain'
        logo:
          $ref: '#/components/schemas/business-profile-service-WorkspaceLogo'
        hash:
          $ref: '#/components/schemas/business-profile-service-WorkspaceHash'
        guid:
          $ref: '#/components/schemas/business-profile-service-WorkspaceGuid'
        activeUsersCount:
          type: integer
          format: int64
          description: The number of active users
        created:
          $ref: '#/components/schemas/business-profile-service-CreationDate'
        updated:
          $ref: '#/components/schemas/business-profile-service-LastUpdateTime'
        canAccessWorkspace:
          type: boolean
          description: '`true` when the current user can access this workspace'
        businessProfileGroup:
          $ref: '#/components/schemas/business-profile-service-BusinessProfileGroupSimpleResponse'
    business-profile-service-BusinessProfileWithIdentifiersForOrganizationUserResponse:
      type: object
      properties:
        author:
          $ref: '#/components/schemas/business-profile-service-UserId'
        name:
          $ref: '#/components/schemas/business-profile-service-WorkspaceName'
        subdomain:
          $ref: '#/components/schemas/business-profile-service-WorkspaceSubdomain'
        logo:
          $ref: '#/components/schemas/business-profile-service-WorkspaceLogo'
        hash:
          $ref: '#/components/schemas/business-profile-service-WorkspaceHash'
        guid:
          $ref: '#/components/schemas/business-profile-service-WorkspaceGuid'
        created:
          $ref: '#/components/schemas/business-profile-service-CreationDate'
        updated:
          $ref: '#/components/schemas/business-profile-service-LastUpdateTime'
        businessProfileGroup:
          $ref: '#/components/schemas/business-profile-service-BusinessProfileGroupSimpleResponse'
        identifiers:
          type: array
          description: Identifiers (keys) used in the workspace
          items:
            type: string
    business-profile-service-StepStructure:
      type: object
      properties:
        state:
          type: string
          enum:
          - NEW,
          - SKIP
          - DONE
        steps:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/business-profile-service-StepStructure'
    business-profile-service-UniversalListResponseMeta:
      type: object
      description: Pagination data
      properties:
        count:
          type: integer
          format: int32
          description: Total number of items
        limit:
          type: integer
          format: int32
          description: Number of items per page
        links:
          type: array
          description: Links to other pages
          items:
            $ref: '#/components/schemas/business-profile-service-UniversalListResponseMetaLink'
    business-profile-service-UniversalListResponseMetaLink:
      type: object
      properties:
        rel:
          type: string
          description: Type of page relation
          enum:
          - first
          - next
          - prev
        url:
          type: string
          description: URL of the page
    business-profile-service-UniversalListBusinessProfilesResponse:
      type: object
      properties:
        data:
          type: array
          description: List of workspaces
          items:
            $ref: '#/components/schemas/business-profile-service-BusinessProfileExtendedResponse'
        meta:
          $ref: '#/components/schemas/business-profile-service-UniversalListResponseMeta'
    business-profile-service-UniversalListBusinessProfilesForOrganizationUserResponse:
      type: object
      properties:
        data:
          type: array
          description: A list of workspaces
          items:
            $ref: '#/components/schemas/business-profile-service-BusinessProfileForOrganizationUserResponse'
        meta:
          $ref: '#/components/schemas/business-profile-service-UniversalListResponseMeta'
    business-profile-service-UniversalListBusinessProfilesForOrganizationWithIdentifiersUserResponse:
      type: object
      properties:
        data:
          type: array
          description: A list of workspaces
          items:
            $ref: '#/components/schemas/business-profile-service-BusinessProfileWithIdentifiersForOrganizationUserResponse'
        meta:
          $ref: '#/components/schemas/business-profile-service-UniversalListResponseMeta'
    business-profile-service-DailyUsageStats:
      type: object
      properties:
        dailyUsageStatistics:
          $ref: '#/components/schemas/business-profile-service-UsageStatsByDay'
        eventsTotal:
          $ref: '#/components/schemas/business-profile-service-EventsStats'
        totalAll:
          type: integer
          description: The total number of all events in all requested days
        totalOther:
          type: integer
          description: The total number of all events in all requested days which were no included in the top 5 from `eventsTotal`
        totalWeight:
          type: number
          format: double
          nullable: true
          description: The total weight generated by weight-eligible actions across all requested days (fractional). Present only when the request's `actions` include at least one weight-eligible action; otherwise omitted.
        averageWeight:
          type: number
          format: double
          nullable: true
          description: The average weight per weight-bearing event across the period (total weight divided by the total weight-event count, rounded to 2 decimal places). Present only when the request's `actions` include at least one weight-eligible action; otherwise omitted.
    business-profile-service-UsageStatsByDay:
      type: object
      description: Statistics for individual days
      properties:
        day:
          type: string
          format: date
          description: Date of the data in this object
        events:
          $ref: '#/components/schemas/business-profile-service-EventsStats'
        other:
          type: integer
          description: The number of events which were not included in the top 5 from `events`
        total:
          type: integer
          description: The total number of events
        totalWeight:
          type: number
          format: double
          nullable: true
          description: The total weight generated by weight-eligible actions on this day (fractional). Present only when the request's `actions` include at least one weight-eligible action; otherwise omitted.
        weights:
          $ref: '#/components/schemas/business-profile-service-WeightsStats'
    business-profile-service-RetentionUsageStats:
      type: object
      properties:
        dailyUsageStatistics:
          $ref: '#/components/schemas/business-profile-service-UsageStatsByDay'
        eventsAverage:
          type: object
          description: The average number of top 5 most popular events kept in the database, calculated from all the requested days.
          additionalProperties:
            type: integer
            description: The average number of events
        averageAll:
          type: integer
          description: The average number of all events kept in the database on all the requested days.
        averageOther:
          type: integer
          description: The average number of events kept in the databse on all the requested days, other than the top 5 events from `eventsAverage`
    business-profile-service-EventsStats:
      type: object
      description: The top 5 most popular event types. The keys in the object are action names.
      additionalProperties:
        type: integer
        description: The number of events
    business-profile-service-WeightsStats:
      type: object
      nullable: true
      description: The weight generated per weight-eligible action (fractional). The keys in the object are action names. Present only when the request's `actions` include at least one weight-eligible action; otherwise omitted.
      additionalProperties:
        type: number
        format: double
        description: The weight generated by this action
    business-profile-service-AuthError:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/business-profile-service-ErrorStatus'
        error:
          $ref: '#/components/schemas/business-profile-service-ErrorCode'
        message:
          $ref: '#/components/schemas/business-profile-service-ErrorMessage'
        timestamp:
          $ref: '#/components/schemas/business-profile-service-ErrorTimestamp'
    business-profile-service-ErrorMessage:
      type: string
      description: Description of the problem
    business-profile-service-ErrorTimestamp:
      type: string
      format: date-time
      description: Time when the error occurred
    business-profile-service-ErrorStatus:
      type: integer
      description: HTTP status of the response
    business-profile-service-ErrorCode:
      type: string
      description: Synerise error code. See [error reference](https://developers.synerise.com/errors.html).
    business-profile-service-ErrorErrorsArray:
      type: array
      description: Details of the problems
      items:
        type: object
        properties:
          errorCode:
            $ref: '#/components/schemas/business-profile-service-ErrorCode'
          message:
            $ref: '#/components/schemas/business-profile-service-ErrorMessage'
          details:
            type: object
            description: Details of the problem, if applicable.
          source:
            type: object
            description: Properties that caused a problem, if applicable.
            properties:
              parameter:
                type: string
                description: The name of the property that caused an error
    catalogs-itemKey:
      type: string
      description: |
        The value of the unique key of the item.

        Slashes (`/`) are not allowed in the value.

        In the Synerise Portal, this value is saved under **Primary key**.
      example: sku1357
    catalogs-enrichmentUpdateRequest:
      type: object
      properties:
        action:
          type: string
        paramKey:
          type: string
        enrichmentFields:
          type: array
          items:
            type: string
    catalogs-enableFilteringRequest:
      type: object
      properties:
        fields:
          type: array
          items:
            type: string
    catalogs-disableFilteringRequest:
      type: object
      properties:
        removeFilters:
          type: boolean
    catalogs-addItem:
      type: object
      required:
      - itemKey
      - value
      properties:
        itemKey:
          $ref: '#/components/schemas/catalogs-itemKey'
        value:
          type: object
          description: Properties of the item. Can be an empty object.
          additionalProperties:
            type: string
            description: Key:value data
          example:
            itemCategory: smartphone
            itemColor: blue
    catalogs-responseMeta:
      type: object
      description: This object holds the metadata of the response.
      properties:
        totalCount:
          type: integer
          description: The total number of matching values (key-value pairs; array items; objects) in the database
        requestTime:
          type: string
          description: The processing time of the request
          example: 0.11 [s]
    catalogs-addBag:
      type: object
      properties:
        name:
          type: string
          description: Catalog name
    catalogs-primaryKey:
      type: object
      required:
      - name
      properties:
        name:
          type: string
        description:
          type: string
    catalogs-bag:
      type: object
      description: This object holds the details of the catalog.
      properties:
        id:
          type: integer
          description: Catalog ID
        name:
          type: string
          description: Catalog name
        businessProfileId:
          type: integer
          description: ID of the Business Profile that contains this catalog
        createdBy:
          $ref: '#/components/schemas/catalogs-Author'
        creationDate:
          format: date-time
          type: string
          description: Creation date
        modifiedBy:
          $ref: '#/components/schemas/catalogs-Author'
        lastModified:
          type: string
          format: date-time
          description: Last modification date
        primaryKey:
          $ref: '#/components/schemas/catalogs-primaryKey'
        mappings:
          type: array
          items:
            $ref: '#/components/schemas/catalogs-mappingResponse'
        beforeFiltering:
          type: boolean
        fields:
          type: array
          items:
            type: string
    catalogs-mappingResponse:
      type: object
      required:
      - bpActionParamKey
      - bagId
      - itemId
      - action
      - paramKey
      - enrichmentFields
      properties:
        bpActionParamKey:
          type: string
        bagId:
          type: integer
          format: int64
        itemId:
          type: integer
          format: int64
        action:
          type: string
        paramKey:
          type: string
        enrichmentFields:
          type: array
          items:
            type: string
    catalogs-deleteResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the catalog
        result:
          type: boolean
          description: '`true` if the catalog was deleted successfully'
    catalogs-item:
      type: object
      description: Details of the item
      properties:
        bag:
          type: object
          description: Metadata of the catalog that includes the entry
          properties:
            id:
              type: integer
              format: int64
              description: Catalog ID
            name:
              type: string
              description: Catalog name
            businessProfileId:
              type: integer
              description: ID of the Business Profile that contains this catalog
            author:
              type: string
              description: ID of the catalog's creator
            lastModified:
              type: string
              format: date-time
              description: Last modification date
            creationDate:
              format: date-time
              type: string
              description: Creation date
            primaryKey:
              $ref: '#/components/schemas/catalogs-primaryKey'
            mappings:
              type: array
              items:
                $ref: '#/components/schemas/catalogs-mappingResponse'
        itemKey:
          type: string
          description: They unique value of the item key (for example, an SKU) that was used to upload this entry. This is the `key` query parameter used in [this endpoint](#operation/getItemByKey).
        id:
          type: integer
          format: int64
          description: ID of the entry. This is the `itemId` used in [this endpoint](#operation/getItem).
        value:
          type: string
          description: Contents of the entry
          example: '{"Name":"John","Surname":"Doe"}'
        creationDate:
          type: string
          description: Creation date of the entry
        lastModified:
          type: string
          description: Last modified date of the entry
    catalogs-eventData:
      type: object
      properties:
        action:
          type: string
          description: The `action` field of the event
          example: transaction.charge
        paramKey:
          type: string
          description: The parameter in the event that corresponds to the catalog column with the unique identifiers
          example: sku
    catalogs-mapper:
      type: object
      description: Details of the mapping
      properties:
        bpActionParamKey:
          type: string
          description: The unique identifier of this mapping
        bagId:
          type: integer
          description: The catalog associated with this mapping
        action:
          type: string
          description: The `action` field of the event
          example: transaction.charge
        paramKey:
          type: string
          description: The parameter in the event that corresponds to the catalog column with the unique identifiers
          example: sku
        enrichmentFields:
          type: array
          items:
            type: string
          description: enrichment fields
    catalogs-ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Error summary
        message:
          type: string
          description: Error message
        timestamp:
          type: string
          description: Time when the error occurred
    catalogs-Author:
      type: object
      description: Data of user
      properties:
        id:
          type: integer
          description: Id of the user
        name:
          type: string
          description: Name of the user
        iconUrl:
          type: string
          description: URL of the user's avatar icon
    crm-ClientDetails:
      type: object
      properties:
        base:
          type: object
          description: The details of a Profile
          additionalProperties:
            description: The name of a parameter
            type: object
            properties:
              label:
                type: string
                description: A name for the parameter (can be a default parameter created by Synerise or a custom one)
              value:
                description: The value of the parameter
        tags:
          type: array
          description: The Profile's tags
          items:
            type: string
    crm-CustomerCommon:
      type: object
      properties:
        uuid:
          type: string
          description: |
            UUID of the Profile

            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
          example: 07243772-008a-42e1-ba37-c3807cebde8f
        email:
          type: string
          description: |
            Profile's e-mail address

            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
        firstname:
          type: string
          description: Profile's first name
        lastName:
          type: string
          description: Profile's last name
        custom_identify:
          type: string
          description: |
            A custom ID for the Profile

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

            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
        address:
          type: string
          description: Profile's street address
        birthdate:
          type: string
          format: date
          description: Profile's date of birth. Must be a past date.
        city:
          type: string
          description: Profile's city of residence
        zipCode:
          type: string
          description: Profile's zip code
        province:
          type: string
          description: Profile's province of residence
        country_id:
          type: string
          description: ID of the Profile's country of residence
        countryCode:
          type: string
          description: Code of Profile's country of residence
          example: PL
        avatarUrl:
          type: string
          nullable: true
          description: URL of the Profile's avatar picture
        sex:
          type: string
          description: |
            Profile's sex.

            - 0: undefined
            - 1: female
            - 2: male
            - 3: other
          enum:
          - '0'
          - '1'
          - '2'
          - '3'
        tags:
          type: array
          description: Custom tags. They can be used, for example, to group Profiles.
          items:
            type: string
        additionalProperties:
          description: |
            Additional attributes, including custom attributes.

            The following attributes are reserved for system use and can't be modified:
            <details><summary>Click to expand the list of reserved attributes</summary>
            <code>email</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br><code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br><code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br><code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br><code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br><code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br><code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br><code>confirmation_hash</code><br><code>ownerId</code><br><code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_city</code><br><code>geo_loc_country</code><br><code>geo_loc_as</code><br><code>geo_loc_country_code</code><br><code>geo_loc_isp</code><br><code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>geo_loc_org</code><br><code>geo_loc_query</code><br><code>geo_loc_region</code><br><code>geo_loc_region_name</code><br><code>geo_loc_status</code><br><code>geo_loc_timezone</code><br><code>geo_loc_zip</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>status</code>
            </details>
    items-filter-all-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
        requestId:
          type: string
          description: ID of the request which resulted in the error
      required:
      - timestamp
      - status
      - message
    items-filter-all-ParserResult:
      type: object
      description: Result of validating the IQL syntax and only the syntax - this result does not inform if the filter returns any results or if the used attributes are filterable.
      properties:
        valid:
          type: boolean
          description: True if IQL expression syntax is valid.
        message:
          type: string
          description: Error message when IQL expression is not valid
        parsedFilteringString:
          type: string
          description: Parsed filtering string
      required:
      - valid
      - parsedFilteringString
    items-filter-all-EvaluationResult:
      type: object
      description: Evaluation including data from the item catalog, configuration, and context items/profiles.
      properties:
        resultSize:
          type: integer
          description: How many items meet the conditions of the IQL filtering string in total
        modifiedFilteringString:
          type: string
          description: Filtering string after application of the filtering context. For example, `title != context.title` becomes `title != "Synerise API Reference"`
        evaluationErrors:
          type: array
          description: List of IQL evaluation errors
          items:
            type: object
            properties:
              filter:
                type: string
                description: Name of variable on which the filter is based
              message:
                type: string
                description: Error message
            required:
            - filter
            - message
      required:
      - resultSize
    items-filter-all-Extracts:
      type: object
      description: Information about elements that were used anywhere in the filtering string. **Elements are listed only if they were valid.**
      properties:
        clientExtracts:
          type: object
          description: Attributes of the context profile
          properties:
            attributeConstants:
              type: array
              description: Profile attributes used in the query
              items:
                type: string
            segmentationsConstant:
              type: array
              description: Segmentations used in the query
              items:
                type: string
            aggregateConstants:
              type: array
              description: Aggregates used in the query
              items:
                type: string
            expressionConstants:
              type: array
              description: Expressions used in the query
              items:
                type: string
            TagsConstant:
              type: boolean
              description: True if context profile's tags were referenced in the query.
        contextConstants:
          type: array
          description: Context elements used in the query
          items:
            type: string
        variables:
          type: array
          description: Variables used in the query (for example pulled from the context)
          items:
            type: string
    items-filter-all-FilterValidateResponse:
      type: object
      properties:
        filteringString:
          $ref: '#/components/schemas/items-filter-all-FilteringString'
        contextItems:
          $ref: '#/components/schemas/items-filter-all-ContextItems'
        clientUUID:
          $ref: '#/components/schemas/items-filter-all-ClientUUID'
        parserResult:
          $ref: '#/components/schemas/items-filter-all-ParserResult'
        evaluationResult:
          $ref: '#/components/schemas/items-filter-all-EvaluationResult'
        extracts:
          $ref: '#/components/schemas/items-filter-all-Extracts'
        candidateItems:
          type: array
          description: List of validated candidate items
          items:
            type: object
            properties:
              itemId:
                type: string
                description: ID of an item that was tested against the filtering string
                example: '67890'
              valid:
                type: boolean
                description: True if the item meets the conditions of the filtering string
            required:
            - itemId
            - valid
        exampleItems:
          type: array
          items:
            type: string
          description: Array of itemIds that meet the conditions of the filtering string. The size of this array can be controlled by the `exampleItems` query parameter.
      required:
      - filteringString
      - parserResult
    items-filter-all-FilteringString:
      type: string
      description: '[IQL](https://help.synerise.com/developers/iql) filtering expression'
      example: IF("abcd" IN client.tags,discount == 0,discount > 0)
    items-filter-all-ContextItems:
      type: array
      items:
        type: string
        example: '12345'
      description: itemIds of the items which create the item context
    items-filter-all-ClientUUID:
      type: string
      description: UUID of the profile which creates the profile context
      example: 68df2317-0edb-4cc9-8b39-5ab68325f891
    items-filter-all-InventoryContext:
      description: |
        Inventory context used to evaluate inventory-related filters and boosting strategies.
        Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory).
      oneOf:
      - $ref: '#/components/schemas/items-filter-all-SingleInventoryContext'
      - $ref: '#/components/schemas/items-filter-all-MultiInventoryContext'
    items-filter-all-SingleInventoryContext:
      type: object
      description: |
        Single inventory context.
      properties:
        channelIds:
          type: array
          items:
            type: string
          description: |
            List of channel identifiers used to evaluate inventory-related filters and boosting strategies.
      required:
      - channelIds
    items-filter-all-MultiInventoryContext:
      type: object
      description: |
        Multi-inventory context where each inventory can have its own set of channel IDs.
      properties:
        inventoryCatalogs:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/items-filter-all-InventoryContextDefinition'
          description: |
            Map of inventory ID to inventory context definition. Each inventory can have its own set of channel IDs.
      required:
      - inventoryCatalogs
    items-filter-all-InventoryContextDefinition:
      type: object
      description: |
        Context definition for a specific inventory.
      properties:
        channelIds:
          type: array
          items:
            type: string
          description: |
            List of channel identifiers for this specific inventory.
    items-filter-all-CandidateItems:
      type: array
      items:
        type: string
        example: '67890'
      description: Array of itemIds that will be tested against the IQL expression. You can use this with test items to verify that the query matches the items you expected.
    items-filter-all-ValidateItemsFilterRequestBody:
      description: Request for performing IQL validation
      type: object
      properties:
        filteringString:
          $ref: '#/components/schemas/items-filter-all-FilteringString'
        clientUUID:
          $ref: '#/components/schemas/items-filter-all-ClientUUID'
        contextItems:
          $ref: '#/components/schemas/items-filter-all-ContextItems'
        inventoryContext:
          $ref: '#/components/schemas/items-filter-all-InventoryContext'
        candidateItems:
          $ref: '#/components/schemas/items-filter-all-CandidateItems'
      required:
      - filteringString
    items-search-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
      - timestamp
      - status
      - message
    items-search-ResultFacets:
      type: object
      description: Facet value mappings
      example:
        brand:
          X-brand: 1
          Y-brand: 3
        salePrice.value:
          max: 201.99
          min: 14.99
      additionalProperties:
        description: The type of facet, for example `category`
        type: object
        additionalProperties:
          description: 'The values for keys in this facet type, for example `"Home Appliances>Fridges": 12`'
          type: integer
    items-search-AutocompleteResponse:
      type: object
      title: Item search
      properties:
        data:
          $ref: '#/components/schemas/items-search-FoundItems'
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            allFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            customFilteredFacets:
              allOf:
              - type: object
                description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
              - $ref: '#/components/schemas/items-search-ResultFacets'
            correlationId:
              $ref: '#/components/schemas/items-search-CorrelationIdInResponse'
            searchId:
              $ref: '#/components/schemas/items-search-SearchIdInResponse'
            facetsOrdering:
              $ref: '#/components/schemas/items-search-FacetsOrderingResponse'
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: '#/components/schemas/items-search-FullTextSuggestionSchema'
            usedSuggestion:
              $ref: '#/components/schemas/items-search-UsedSuggestion'
        meta:
          $ref: '#/components/schemas/items-search-PaginationMeta'
    items-search-AutocompleteResponseWithExplanation:
      type: object
      title: Item search
      properties:
        data:
          $ref: '#/components/schemas/items-search-FoundItemsWithExplanation'
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            allFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            customFilteredFacets:
              allOf:
              - type: object
                description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
              - $ref: '#/components/schemas/items-search-ResultFacets'
            correlationId:
              $ref: '#/components/schemas/items-search-CorrelationIdInResponse'
            searchId:
              $ref: '#/components/schemas/items-search-SearchIdInResponse'
            facetsOrdering:
              $ref: '#/components/schemas/items-search-FacetsOrderingResponse'
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: '#/components/schemas/items-search-FullTextSuggestionSchema'
            usedSuggestion:
              $ref: '#/components/schemas/items-search-UsedSuggestion'
            explanation:
              $ref: '#/components/schemas/items-search-SearchExplanationWithRerankerExplanation'
        meta:
          $ref: '#/components/schemas/items-search-PaginationMeta'
    items-search-FullTextSearchResponse:
      type: object
      title: Item search
      properties:
        data:
          $ref: '#/components/schemas/items-search-FoundItems'
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            allFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            customFilteredFacets:
              allOf:
              - type: object
                description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
              - $ref: '#/components/schemas/items-search-ResultFacets'
            correlationId:
              $ref: '#/components/schemas/items-search-CorrelationIdInResponse'
            searchId:
              $ref: '#/components/schemas/items-search-SearchIdInResponse'
            facetsOrdering:
              $ref: '#/components/schemas/items-search-FacetsOrderingResponse'
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: '#/components/schemas/items-search-FullTextSuggestionSchema'
            usedSuggestion:
              $ref: '#/components/schemas/items-search-UsedSuggestion'
        meta:
          $ref: '#/components/schemas/items-search-PaginationMeta'
    items-search-FullTextSearchResponseWithExplanation:
      type: object
      title: Item search
      properties:
        data:
          $ref: '#/components/schemas/items-search-FoundItemsWithExplanation'
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            allFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            customFilteredFacets:
              allOf:
              - type: object
                description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
              - $ref: '#/components/schemas/items-search-ResultFacets'
            correlationId:
              $ref: '#/components/schemas/items-search-CorrelationIdInResponse'
            searchId:
              $ref: '#/components/schemas/items-search-SearchIdInResponse'
            facetsOrdering:
              $ref: '#/components/schemas/items-search-FacetsOrderingResponse'
            suggestions:
              type: array
              description: A list of search suggestions
              items:
                $ref: '#/components/schemas/items-search-FullTextSuggestionSchema'
            usedSuggestion:
              $ref: '#/components/schemas/items-search-UsedSuggestion'
            explanation:
              $ref: '#/components/schemas/items-search-SearchExplanationWithRerankerExplanation'
        meta:
          $ref: '#/components/schemas/items-search-PaginationMeta'
    items-search-ListingResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/items-search-FoundItems'
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            allFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            customFilteredFacets:
              allOf:
              - type: object
                description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
              - $ref: '#/components/schemas/items-search-ResultFacets'
            correlationId:
              $ref: '#/components/schemas/items-search-CorrelationIdInResponse'
            searchId:
              $ref: '#/components/schemas/items-search-SearchIdInResponse'
            facetsOrdering:
              $ref: '#/components/schemas/items-search-FacetsOrderingResponse'
        meta:
          $ref: '#/components/schemas/items-search-PaginationMeta'
    items-search-ListingResponseWithExplanation:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/items-search-FoundItemsWithExplanation'
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            allFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            customFilteredFacets:
              allOf:
              - type: object
                description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
              - $ref: '#/components/schemas/items-search-ResultFacets'
            correlationId:
              $ref: '#/components/schemas/items-search-CorrelationIdInResponse'
            searchId:
              $ref: '#/components/schemas/items-search-SearchIdInResponse'
            facetsOrdering:
              $ref: '#/components/schemas/items-search-FacetsOrderingResponse'
            explanation:
              $ref: '#/components/schemas/items-search-Explanation'
        meta:
          $ref: '#/components/schemas/items-search-PaginationMeta'
    items-search-VisualSearchResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/items-search-FoundItems'
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            allFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            customFilteredFacets:
              allOf:
              - type: object
                description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
              - $ref: '#/components/schemas/items-search-ResultFacets'
            correlationId:
              $ref: '#/components/schemas/items-search-CorrelationIdInResponse'
            searchId:
              $ref: '#/components/schemas/items-search-SearchIdInResponse'
            facetsOrdering:
              $ref: '#/components/schemas/items-search-FacetsOrderingResponse'
        meta:
          $ref: '#/components/schemas/items-search-PaginationMeta'
    items-search-VisualSearchResponseWithExplanation:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/items-search-FoundItemsWithExplanation'
        extras:
          type: object
          description: Additional information
          properties:
            filteredFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            allFacets:
              $ref: '#/components/schemas/items-search-ResultFacets'
            customFilteredFacets:
              allOf:
              - type: object
                description: Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests.
              - $ref: '#/components/schemas/items-search-ResultFacets'
            correlationId:
              $ref: '#/components/schemas/items-search-CorrelationIdInResponse'
            searchId:
              $ref: '#/components/schemas/items-search-SearchIdInResponse'
            facetsOrdering:
              $ref: '#/components/schemas/items-search-FacetsOrderingResponse'
            explanation:
              $ref: '#/components/schemas/items-search-Explanation'
        meta:
          $ref: '#/components/schemas/items-search-PaginationMeta'
    items-search-UsedSuggestion:
      type: object
      description: If the query did not return any matches, the AI engine tries to find an alternative similar query and use it for the search instead. If that happens, the `usedSuggestion` object contains information about that alternative query offered by the AI engine and used in the search.
      allOf:
      - $ref: '#/components/schemas/items-search-FullTextSuggestionSchema'
    items-search-SuggestionResponse:
      type: object
      title: Suggestion search
      properties:
        data:
          type: array
          description: A page of search query suggestions
          items:
            type: object
            description: A search suggestion
            properties:
              suggestion:
                type: string
                description: The suggested search phrase
        extras:
          type: object
          description: Additional information
          properties:
            correlationId:
              $ref: '#/components/schemas/items-search-CorrelationIdInResponse'
            searchId:
              $ref: '#/components/schemas/items-search-SearchIdInResponse'
            facetsOrdering:
              $ref: '#/components/schemas/items-search-FacetsOrderingResponse'
        meta:
          $ref: '#/components/schemas/items-search-PaginationMeta'
    items-search-SuggestionResponseWithExplanation:
      type: object
      title: Suggestion search
      properties:
        data:
          type: array
          description: A page of search query suggestions
          items:
            type: object
            description: A search suggestion
            properties:
              _explanation:
                type: object
                description: Explanation of the result
                properties:
                  origin:
                    type: array
                    description: The type of suggestion
                    items:
                      type: string
                      enum:
                      - Manual
                      - Attribute
                      - Event
                  popularityScore:
                    type: number
                    description: Popularity of the suggestion
                  score:
                    type: number
                    description: Score of the suggestion
              suggestion:
                type: string
                description: The suggested search phrase
        extras:
          type: object
          description: Additional information
          properties:
            correlationId:
              $ref: '#/components/schemas/items-search-CorrelationIdInResponse'
            searchId:
              $ref: '#/components/schemas/items-search-SearchIdInResponse'
            facetsOrdering:
              $ref: '#/components/schemas/items-search-FacetsOrderingResponse'
        meta:
          $ref: '#/components/schemas/items-search-PaginationMeta'
    items-search-QueryClassificationResponse:
      type: object
      title: Query classification
      properties:
        predictedCategories:
          $ref: '#/components/schemas/items-search-QueryClassificationCategories'
    items-search-QueryClassificationConfig:
      type: object
      description: Query classification configuration
      properties:
        actions:
          type: array
          description: Search result actions with a minimum reliability level
          items:
            type: object
            properties:
              action:
                $ref: '#/components/schemas/items-search-SearchResultAction'
              minReliabilityLevel:
                $ref: '#/components/schemas/items-search-ReliabilityLevel'
        excludedPhrases:
          type: array
          description: Phrases that will be excluded from query classification
          items:
            type: string
        excludedCategories:
          type: array
          description: Categories that will be excluded from query classification
          items:
            type: string
    items-search-QueryClassificationCategories:
      type: array
      description: A list of predicted categories and their scores
      items:
        type: object
        properties:
          category:
            type: string
            description: The predicted category.
          score:
            type: number
            description: The score of the predicted category.
          ctr:
            type: number
            description: The CTR of the predicted category.
            format: float
          actions:
            type: array
            items:
              $ref: '#/components/schemas/items-search-SearchResultAction'
          reliabilityLevel:
            $ref: '#/components/schemas/items-search-ReliabilityLevel'
    items-search-SearchResultAction:
      type: string
      description: |
        The action to perform when the reliability level from `minReliabilityLevel` is reached.
        - `staticFilter` will apply a static filter to limit the search results to the predicted category.
        - `elasticFilter` will apply an elastic filter - if there are not enough results from the predicted category, the AI engine will pick items from other categories to meet the minimum number of results.
        - `boosting` will increase the scores of items from the predicted category.

        If reliability levels are met for multiple actions, the priority is:
        1. static filter
        2. elastic filter
        3. boosting
      enum:
      - staticFilter
      - elasticFilter
      - boosting
    items-search-ReliabilityLevel:
      type: string
      description: The reliability level indicates how confident we are that a given prediction is the best choice.
      enum:
      - certain
      - veryHigh
      - high
      - medium
      - low
    items-search-SearchableAttributesMatchResponse:
      type: object
      title: Searchable attributes match
      properties:
        query:
          type: object
          description: Search query with tokens
          properties:
            value:
              type: string
              description: Search query
            tokens:
              type: array
              description: A list of search query tokens and their positions
              items:
                $ref: '#/components/schemas/items-search-SearchQueryTokens'
        attributes:
          $ref: '#/components/schemas/items-search-ExplainMatchSearchableAttributes'
    items-search-SearchQueryTokens:
      type: object
      title: Search query tokens
      properties:
        token:
          type: string
          description: Search query token
        positions:
          type: array
          description: A list of query token positions
          items:
            type: object
            properties:
              start:
                type: number
                description: Start position
              end:
                type: number
                description: Start position
    items-search-ExplainMatchSearchableAttributes:
      type: array
      description: A list of searchable attributes with value and matched tokens
      items:
        type: object
        properties:
          attribute:
            type: string
            description: Attribute name
          value:
            description: Attribute value
            type: string
          tokens:
            type: array
            description: A list of matched tokens
            items:
              type: object
              properties:
                queryToken:
                  type: string
                  description: Matched token
                type:
                  description: Token type
                  type: string
                  enum:
                  - word
                  - synonym
                start:
                  type: number
                  description: Start position
                end:
                  type: number
                  description: Start position
    items-search-PaginationMeta:
      type: object
      description: Optional metadata, such as pagination. This is returned if the `includeMeta` parameter was set to true in the request.
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of search results
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                - first
                - next
                - prev
                - last
    items-search-FoundItems:
      type: array
      description: A page of matching items as objects. The parameters of each item's object depend on the configuration of displayable attributes.
      items:
        type: object
        properties:
          _promotedByRules:
            type: array
            items:
              type: integer
              description: Rule id
            description: List of applied rules that had an effect in promoting this item. This field exists if and only if the item was promoted.
        additionalProperties:
          description: The names and value types of the item's properties depend on the configuration.
        example:
          itemName: TV
          itemId: 87257843345
          _promotedByRules:
          - 475
          - 477
    items-search-FoundItemsWithExplanation:
      type: array
      description: A page of matching items as objects with explanation included. The parameters of each item's object depend on the configuration of displayable attributes.
      items:
        type: object
        properties:
          _promotedByRules:
            type: array
            items:
              type: integer
              description: Rule id
            description: List of applied rules that had an effect in promoting this item. This field exists if and only if the item was promoted.
          _explanation:
            $ref: '#/components/schemas/items-search-PerItemExplanation'
        additionalProperties:
          description: The names and value types of the item's properties depend on the configuration.
        example:
          itemName: TV
          itemId: 87257843345
          _promotedByRules:
          - 475
          - 477
    items-search-FullTextSuggestionSchema:
      type: object
      description: If the query from the request doesn't return any matches (for example due to a spelling error in the query), the AI engine may suggest a similar query and use it instead. This object is included in the response only if that mechanism was triggered.
      properties:
        text:
          type: string
          description: The suggested text query
        highlighted:
          type: string
          description: The suggested text query with the HTML emphasis tag added
        score:
          type: number
          description: Estimated accuracy of the suggestion. `1.0` means 100%.
          format: float
          maximum: 1.0
    items-search-PaginationSortBy:
      type: string
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the attribute by which the data will be sorted.
    items-search-PaginationOrdering:
      type: string
      default: asc
      enum:
      - desc
      - asc
      description: Sorting order
    items-search-PaginationPage:
      type: integer
      format: int32
      description: Page number to return for pagination. The first page has the index `1`.
    items-search-PaginationLimit:
      type: integer
      format: int32
      example: 10
      default: 20
      maximum: 500
      minimum: 0
      description: The number of items to return per page
    items-search-PaginationIncludeMeta:
      type: boolean
      description: |2

        When `true`, pagination metadata is included in the response body.

        When `false`, the data is included in the response headers:

        - Link: links to neighbors, first, and last pages in pagination.

        - X-Pagination-Total-Count: total number of items on all pages

        - X-Pagination-Total-Pages: total number of pages

        - X-Pagination-Page: current page

        - X-Pagination-Limit: maximum number of items on a page

        - X-Pagination-Sorted-By: parameter that the items were sorted by

        - X-Pagination-Ordering: sorting direction
    items-search-Context:
      type: array
      description: List of context strings for a search query
      example:
      - mobile
      - listing
      items:
        type: string
    items-search-DisplayAttributes:
      type: array
      description: List of ad hoc attributes that will be returned for each found item
      example:
      - title
      - price
      items:
        type: string
    items-search-SearchQuery:
      type: string
      description: Query text to use in the search
    items-search-ImageUrl:
      type: string
      description: URL of the image to be used in the visual search
    items-search-ClientUUID:
      type: string
      description: UUID of the profile for which the search is performed
    items-search-CorrelationId:
      type: string
      description: |
        Correlation ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
    items-search-SearchId:
      type: string
      deprecated: true
      description: |
        **DEPRECATED - use correlationId instead**

        Search ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.

        Do not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.
    items-search-CorrelationIdInResponse:
      type: string
      description: |
        This ID is used:
        - for search result pagination
        - as `correlationId` of the search event in events such as `items.search.click`

        Search results are cached for 10 minutes.

        The cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.
    items-search-SearchIdInResponse:
      type: string
      deprecated: true
      description: |
        **DEPRECATED - use correlationId instead**

        This ID is used:
        - for search result pagination
        - as `searchId` of the search event in events such as `items.search.click`

        Search results are cached for 10 minutes.

        The cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.
    items-search-SortByMetric:
      type: string
      enum:
      - TransactionsPopularity
      - PageVisitsPopularity
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Name of the metric by which the data will be sorted.
    items-search-SortByGeoPoint:
      type: string
      example: 34.052235,-118.243685
      description: |
        <span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.

        Geo-point (`{latitude},{longitude}`) for data sorting. Results are sorted by distance from this point. `ordering: asc` means "closest first".'
    items-search-FilterGeoPoints:
      type: array
      example:
      - 34.052235,-118.243685
      - 15.0,65.0
      items:
        type: string
      description: |
        The definition of a geographical area to filter by.

        Given one geo-point, the results will be limited to a radius around a point. To override the default radius (1000 meters), provide the `filterAroundRadius` parameter.
        **Example input:** `["34.052235,-118.243685"]`

        Given two geo-points, the results will be limited to a rectangular area.
        **Example input:** `["50,-100", "25,150"]`

        Given three or more geo-points, the results will be limited to a polygonal area.
        **Example input:** `["50,0", "40,20", "-20,10"]`
    items-search-FilterAroundRadius:
      type: integer
      format: int32
      example: 2000
      default: 1000
      description: Radius in meters to be used when filtering using geo-location. Can only be used when filtering by a single geo-point.
    items-search-FilterAnchor:
      type: string
      example: 0.2,0.8
      description: |
        Anchor (`{width},{height}`) by which the visual results data will be filtered.
        `{width},{height}` correspond to normalized image coordinates, i.e. they are in range [0,1].
        Anchor (0,0) corresponds to the top-left pixel of an image.
    items-search-Filters:
      type: string
      description: IQL query string. For details, see the [Help Center](https://help.synerise.com/developers/iql/).
    items-search-Facets:
      type: array
      description: |
        A list of attributes for which facets will be returned.
        - A single `*` value matches all facetable attributes.
        - A single `auto` value enables automatic facet selection based on the result set — the system picks the most relevant facets using the index's `dynamicFacets` configuration.

        To determine which groups of facets should be returned, use the `includeFacets` parameter.
      items:
        type: string
    items-search-CustomFilteredFacets:
      type: object
      description: |
        A key-value map that takes attributes as keys and IQL query strings as values.

        For each key a facet is returned that includes only the items filtered by the provided IQL query string.
      additionalProperties:
        name: value
        $ref: '#/components/schemas/items-search-Filters'
      example:
        brand: price > 100
        price: brand == foo
    items-search-IncludeFacets:
      type: string
      default: filtered
      enum:
      - all
      - filtered
      - unfiltered
      - none
      description: |
        Determines which groups of facets will be returned: both filtered and unfiltered; just filtered; just unfiltered; or no group at at all.

        To determine which attributes should be returned as facets in each group, use the `facets` and `customFilteredFacets` parameters.
    items-search-FacetsOrdering:
      type: string
      enum:
      - coverage
      - name
      description: "Controls the ordering of facets in the response.  \nWhen `facets=auto`, the default ordering is by coverage (most relevant facets first).  \nWhen facets are specified explicitly, the default ordering is by name.  \nWhen two facets have equal coverage, ties are resolved by name.\n"
    items-search-FacetsOrderingResponse:
      type: array
      description: |
        An ordered list of facet attribute names indicating the display order of facets in the response.
        When `facets=auto`, facets are ordered by coverage (most relevant first) unless `facetsOrderBy=name` is specified.
        When facets are specified explicitly, the ordering is by name.
        Empty when no facets are requested.

        Matching query rules can override the resulting set and order via two consequences:
        - `pinFacets` forces specific facets into the response, optionally at a specific 1-based slot.
          Pinned facets bypass the coverage threshold in `facets=auto`.
        - `hideFacets` removes specific facets from the response, also stripping them from
          `customFilteredFacets`. Hide takes precedence over pin and over explicit `facets=[...]`.

        The corresponding facet values appear in `filteredFacets`, `allFacets`, and `customFilteredFacets`
        only for attributes present in this list.
      items:
        type: string
      example:
      - brand
      - color
      - size
      - price
    items-search-FacetsSize:
      type: integer
      default: 2000
      minimum: 1
      maximum: 10000
      description: |
        Determines how many items will be used for facets aggregation.
    items-search-MaxValuesPerFacet:
      type: integer
      default: 50
      minimum: 1
      maximum: 1000
      description: |
        Determines how many values will be retrieved per facet.
    items-search-CaseSensitiveFacetValues:
      type: boolean
      default: false
      description: |
        Specifies whether facets aggregation should be case sensitive.
    items-search-FilterableAttributesValues:
      type: object
      additionalProperties:
        type: array
        description: The name of the array is the attribute name. The values in the array are the possible values of that attribute.
        items:
          type: string
      example:
        brand:
        - foo
        - bar
        color:
        - red
        - green
        - blue
    items-search-DistinctFilterSearch:
      type: object
      description: Distinct filters regulate how many items with the same value of a particular attribute can be returned.
      properties:
        attribute:
          type: string
          description: Name of the attribute to be used for distinct filter
        maxNumItems:
          type: integer
          description: Maximum number of items to be returned per each distinct attribute value
          minimum: 1
        levelRangeModifier:
          type: integer
          description: Level of the category, if the category attribute was used for distinct filter
          minimum: 0
      required:
      - attribute
      - maxNumItems
    items-search-Personalize:
      type: boolean
      description: If set to `false`, the search result is not personalized.
      default: true
    items-search-IgnoreQueryRules:
      type: boolean
      description: If set to `true`, query rules are not applied.
      default: false
    items-search-ExcludeQueryRules:
      type: array
      example:
      - 2
      - 5
      items:
        type: integer
      description: List of query rules that will not be applied.
    items-search-DisableQueryClassification:
      type: boolean
      description: If set to `true`, query classification is not applied.
      default: false
    items-search-DisableDynamicReranker:
      type: boolean
      description: If set to `true`, q dynamic reranker is not applied.
      default: false
    items-search-CrossWorkspaceMode:
      type: object
      description: Cross-workspace personalization mode. When provided, overrides the index configuration setting.
      properties:
        enabled:
          type: boolean
          description: Whether cross-workspace personalization is enabled.
      required:
      - enabled
    items-search-ListingRequest:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/items-search-PaginationPage'
        limit:
          $ref: '#/components/schemas/items-search-PaginationLimit'
        sortBy:
          $ref: '#/components/schemas/items-search-PaginationSortBy'
        ordering:
          $ref: '#/components/schemas/items-search-PaginationOrdering'
        includeMeta:
          $ref: '#/components/schemas/items-search-PaginationIncludeMeta'
        clientUUID:
          $ref: '#/components/schemas/items-search-ClientUUID'
        personalize:
          $ref: '#/components/schemas/items-search-Personalize'
        correlationId:
          $ref: '#/components/schemas/items-search-CorrelationId'
        searchId:
          $ref: '#/components/schemas/items-search-SearchId'
        sortByMetric:
          $ref: '#/components/schemas/items-search-SortByMetric'
        sortByGeoPoints:
          $ref: '#/components/schemas/items-search-SortByGeoPoint'
        filterGeoPoints:
          $ref: '#/components/schemas/items-search-FilterGeoPoints'
        filterAroundRadius:
          $ref: '#/components/schemas/items-search-FilterAroundRadius'
        filters:
          $ref: '#/components/schemas/items-search-Filters'
        facets:
          $ref: '#/components/schemas/items-search-Facets'
        customFilteredFacets:
          $ref: '#/components/schemas/items-search-CustomFilteredFacets'
        facetsSize:
          $ref: '#/components/schemas/items-search-FacetsSize'
        maxValuesPerFacet:
          $ref: '#/components/schemas/items-search-MaxValuesPerFacet'
        caseSensitiveFacetValues:
          $ref: '#/components/schemas/items-search-CaseSensitiveFacetValues'
        includeFacets:
          $ref: '#/components/schemas/items-search-IncludeFacets'
        facetsOrderBy:
          $ref: '#/components/schemas/items-search-FacetsOrdering'
        context:
          $ref: '#/components/schemas/items-search-Context'
        displayAttributes:
          $ref: '#/components/schemas/items-search-DisplayAttributes'
        distinctFilter:
          $ref: '#/components/schemas/items-search-DistinctFilterSearch'
        ignoreQueryRules:
          $ref: '#/components/schemas/items-search-IgnoreQueryRules'
        excludeQueryRules:
          $ref: '#/components/schemas/items-search-ExcludeQueryRules'
        params:
          $ref: '#/components/schemas/items-search-Params'
    items-search-FullTextSearchRequest:
      type: object
      properties:
        query:
          $ref: '#/components/schemas/items-search-SearchQuery'
        page:
          $ref: '#/components/schemas/items-search-PaginationPage'
        limit:
          $ref: '#/components/schemas/items-search-PaginationLimit'
        sortBy:
          $ref: '#/components/schemas/items-search-PaginationSortBy'
        ordering:
          $ref: '#/components/schemas/items-search-PaginationOrdering'
        includeMeta:
          $ref: '#/components/schemas/items-search-PaginationIncludeMeta'
        clientUUID:
          $ref: '#/components/schemas/items-search-ClientUUID'
        personalize:
          $ref: '#/components/schemas/items-search-Personalize'
        correlationId:
          $ref: '#/components/schemas/items-search-CorrelationId'
        searchId:
          $ref: '#/components/schemas/items-search-SearchId'
        sortByMetric:
          $ref: '#/components/schemas/items-search-SortByMetric'
        sortByGeoPoints:
          $ref: '#/components/schemas/items-search-SortByGeoPoint'
        filterGeoPoints:
          $ref: '#/components/schemas/items-search-FilterGeoPoints'
        filterAroundRadius:
          $ref: '#/components/schemas/items-search-FilterAroundRadius'
        filters:
          $ref: '#/components/schemas/items-search-Filters'
        facets:
          $ref: '#/components/schemas/items-search-Facets'
        customFilteredFacets:
          $ref: '#/components/schemas/items-search-CustomFilteredFacets'
        facetsSize:
          $ref: '#/components/schemas/items-search-FacetsSize'
        maxValuesPerFacet:
          $ref: '#/components/schemas/items-search-MaxValuesPerFacet'
        caseSensitiveFacetValues:
          $ref: '#/components/schemas/items-search-CaseSensitiveFacetValues'
        includeFacets:
          $ref: '#/components/schemas/items-search-IncludeFacets'
        facetsOrderBy:
          $ref: '#/components/schemas/items-search-FacetsOrdering'
        context:
          $ref: '#/components/schemas/items-search-Context'
        displayAttributes:
          $ref: '#/components/schemas/items-search-DisplayAttributes'
        distinctFilter:
          $ref: '#/components/schemas/items-search-DistinctFilterSearch'
        ignoreQueryRules:
          $ref: '#/components/schemas/items-search-IgnoreQueryRules'
        excludeQueryRules:
          $ref: '#/components/schemas/items-search-ExcludeQueryRules'
        params:
          $ref: '#/components/schemas/items-search-Params'
        disableQueryClassification:
          $ref: '#/components/schemas/items-search-DisableQueryClassification'
        disableDynamicReranker:
          $ref: '#/components/schemas/items-search-DisableDynamicReranker'
      required:
      - query
    items-search-AutocompleteRequest:
      type: object
      properties:
        query:
          $ref: '#/components/schemas/items-search-SearchQuery'
        page:
          $ref: '#/components/schemas/items-search-PaginationPage'
        limit:
          $ref: '#/components/schemas/items-search-PaginationLimit'
        sortBy:
          $ref: '#/components/schemas/items-search-PaginationSortBy'
        ordering:
          $ref: '#/components/schemas/items-search-PaginationOrdering'
        includeMeta:
          $ref: '#/components/schemas/items-search-PaginationIncludeMeta'
        clientUUID:
          $ref: '#/components/schemas/items-search-ClientUUID'
        sortByMetric:
          $ref: '#/components/schemas/items-search-SortByMetric'
        sortByGeoPoints:
          $ref: '#/components/schemas/items-search-SortByGeoPoint'
        filterGeoPoints:
          $ref: '#/components/schemas/items-search-FilterGeoPoints'
        filterAroundRadius:
          $ref: '#/components/schemas/items-search-FilterAroundRadius'
        filters:
          $ref: '#/components/schemas/items-search-Filters'
        facets:
          $ref: '#/components/schemas/items-search-Facets'
        customFilteredFacets:
          $ref: '#/components/schemas/items-search-CustomFilteredFacets'
        facetsSize:
          $ref: '#/components/schemas/items-search-FacetsSize'
        maxValuesPerFacet:
          $ref: '#/components/schemas/items-search-MaxValuesPerFacet'
        caseSensitiveFacetValues:
          $ref: '#/components/schemas/items-search-CaseSensitiveFacetValues'
        includeFacets:
          $ref: '#/components/schemas/items-search-IncludeFacets'
        facetsOrderBy:
          $ref: '#/components/schemas/items-search-FacetsOrdering'
        context:
          $ref: '#/components/schemas/items-search-Context'
        displayAttributes:
          $ref: '#/components/schemas/items-search-DisplayAttributes'
        distinctFilter:
          $ref: '#/components/schemas/items-search-DistinctFilterSearch'
        ignoreQueryRules:
          $ref: '#/components/schemas/items-search-IgnoreQueryRules'
        excludeQueryRules:
          $ref: '#/components/schemas/items-search-ExcludeQueryRules'
        params:
          $ref: '#/components/schemas/items-search-Params'
        disableQueryClassification:
          $ref: '#/components/schemas/items-search-DisableQueryClassification'
        disableDynamicReranker:
          $ref: '#/components/schemas/items-search-DisableDynamicReranker'
      required:
      - query
    items-search-VisualSearchRequest:
      type: object
      properties:
        url:
          $ref: '#/components/schemas/items-search-ImageUrl'
        page:
          $ref: '#/components/schemas/items-search-PaginationPage'
        limit:
          $ref: '#/components/schemas/items-search-PaginationLimit'
        sortBy:
          $ref: '#/components/schemas/items-search-PaginationSortBy'
        ordering:
          $ref: '#/components/schemas/items-search-PaginationOrdering'
        includeMeta:
          $ref: '#/components/schemas/items-search-PaginationIncludeMeta'
        clientUUID:
          $ref: '#/components/schemas/items-search-ClientUUID'
        personalize:
          $ref: '#/components/schemas/items-search-Personalize'
        correlationId:
          $ref: '#/components/schemas/items-search-CorrelationId'
        searchId:
          $ref: '#/components/schemas/items-search-SearchId'
        sortByMetric:
          $ref: '#/components/schemas/items-search-SortByMetric'
        sortByGeoPoints:
          $ref: '#/components/schemas/items-search-SortByGeoPoint'
        filterGeoPoints:
          $ref: '#/components/schemas/items-search-FilterGeoPoints'
        filterAroundRadius:
          $ref: '#/components/schemas/items-search-FilterAroundRadius'
        filterAnchor:
          $ref: '#/components/schemas/items-search-FilterAnchor'
        filters:
          $ref: '#/components/schemas/items-search-Filters'
        facets:
          $ref: '#/components/schemas/items-search-Facets'
        customFilteredFacets:
          $ref: '#/components/schemas/items-search-CustomFilteredFacets'
        facetsSize:
          $ref: '#/components/schemas/items-search-FacetsSize'
        maxValuesPerFacet:
          $ref: '#/components/schemas/items-search-MaxValuesPerFacet'
        caseSensitiveFacetValues:
          $ref: '#/components/schemas/items-search-CaseSensitiveFacetValues'
        includeFacets:
          $ref: '#/components/schemas/items-search-IncludeFacets'
        facetsOrderBy:
          $ref: '#/components/schemas/items-search-FacetsOrdering'
        context:
          $ref: '#/components/schemas/items-search-Context'
        displayAttributes:
          $ref: '#/components/schemas/items-search-DisplayAttributes'
        ignoreQueryRules:
          $ref: '#/components/schemas/items-search-IgnoreQueryRules'
        excludeQueryRules:
          $ref: '#/components/schemas/items-search-ExcludeQueryRules'
        params:
          $ref: '#/components/schemas/items-search-Params'
      required:
      - url
    items-search-Params:
      type: object
      example:
        source: mobile
      description: Extra parameters that will be added to the `item.search` event. The total size must not exceed 500 bytes.
      additionalProperties: true
    items-search-Explanation:
      type: object
      description: Explanation for performed search.
      properties:
        rulesConsequences:
          $ref: '#/components/schemas/items-search-RulesConsequencesExplanation'
        sortDetails:
          oneOf:
          - $ref: '#/components/schemas/items-search-SortedByMetric'
          - $ref: '#/components/schemas/items-search-SortedByAttribute'
          - $ref: '#/components/schemas/items-search-SortedByGeoPoint'
          description: Applied sorting details.
        query:
          $ref: '#/components/schemas/items-search-FinalQuery'
        personalized:
          type: boolean
          description: Indicates whether the search results were personalized.
        promotedItemsCount:
          type: integer
          description: Promoted items count.
        wasFallbackMatchingUsed:
          type: boolean
          description: '`true` if fallback matching was used.'
        facetSelectionExplanation:
          $ref: '#/components/schemas/items-search-FacetSelectionExplanation'
    items-search-FacetSelectionExplanation:
      type: object
      description: |
        Explanation of automatic facet selection. Only present when `facets=auto` is used on an `/explain` endpoint.
        Contains the raw coverage data from the result set that was used to select and rank facets.
        To compute coverage percentage, divide each value by the response's `total` field.
      properties:
        facetCoverage:
          type: object
          description: |
            Map of facetable attribute names to the number of results that have a value for that attribute.
            Includes all candidate facets (not just the ones that were returned in the item's data), so you can see what was considered and why some were excluded by `maxFacets`.
          additionalProperties:
            type: integer
          example:
            brand: 4800
            color: 4500
            price: 4900
            size: 3200
            material: 400
    items-search-SearchExplanationWithRerankerExplanation:
      allOf:
      - $ref: '#/components/schemas/items-search-Explanation'
      - type: object
        properties:
          reranker:
            $ref: '#/components/schemas/items-search-RerankerExplanation'
    items-search-RulesConsequencesExplanation:
      type: object
      description: Applied rules consequences.
      properties:
        query:
          $ref: '#/components/schemas/items-search-TransformedQuery'
        hiddenHits:
          type: array
          items:
            $ref: '#/components/schemas/items-search-HideHit'
        filters:
          type: array
          items:
            $ref: '#/components/schemas/items-search-ExplanationFilters'
        boostFilters:
          type: array
          items:
            $ref: '#/components/schemas/items-search-ExplanationBoostFilters'
        returnNoData:
          $ref: '#/components/schemas/items-search-ReturnNoData'
        pinFacets:
          type: array
          description: |
            Per-rule pin facet consequences contributing to the final `facetsOrdering`.
            Reflects what the rules engine emitted; the contributing rule ids are also present in `appliedRules`.
          items:
            $ref: '#/components/schemas/items-search-ExplanationPinFacet'
        hideFacets:
          type: array
          description: |
            Per-attribute hide facet consequences contributing to the final `facetsOrdering`.
            Each entry lists every rule that hid that attribute.
          items:
            $ref: '#/components/schemas/items-search-ExplanationHideFacet'
    items-search-ExplanationPinFacet:
      type: object
      description: A single pin-facet consequence emitted by a matched query rule.
      properties:
        attribute:
          type: string
          description: Name of the pinned facet attribute.
          example: size
        position:
          type: integer
          minimum: 1
          maximum: 100
          description: |
            1-based slot the rule requested. Omitted when the rule pinned the attribute without a position.
          example: 1
        ruleId:
          type: integer
          description: Id of the query rule that emitted this pin.
    items-search-ExplanationHideFacet:
      type: object
      description: A single hide-facet consequence aggregated across all rules that hid the same attribute.
      properties:
        attribute:
          type: string
          description: Name of the hidden facet attribute.
          example: material
        ruleIds:
          type: array
          description: Ids of every query rule that hid this attribute.
          items:
            type: integer
    items-search-RerankerExplanation:
      type: object
      properties:
        queryClassificationApplied:
          type: boolean
          description: '`true` if query classification was applied.'
        dynamicRerankerApplied:
          type: boolean
          description: '`true` if dynamic reranker was applied.'
        queryClassificationResult:
          $ref: '#/components/schemas/items-search-QueryClassificationCategories'
    items-search-TransformedQuery:
      type: object
      description: Query changes applied due to query rules.
      properties:
        originalQuery:
          type: string
          description: Query before applying query rules.
        finalQuery:
          type: string
          description: Query after applying query rules.
        modifications:
          type: array
          items:
            $ref: '#/components/schemas/items-search-QueryModification'
    items-search-QueryModification:
      type: object
      description: Describes a change in query.
      properties:
        slice:
          description: Query slice that was modified.
          allOf:
          - $ref: '#/components/schemas/items-search-QuerySlice'
        transformedSlice:
          description: Resulting query slice. Not present if the modification only removes words.
          allOf:
          - $ref: '#/components/schemas/items-search-QuerySlice'
        ruleId:
          type: integer
          description: Id of the query rule which caused this change.
    items-search-QuerySlice:
      type: object
      description: Describes a slice of query.
      properties:
        from:
          type: integer
          description: Number of the first word (zero-indexed, inclusive).
        to:
          type: integer
          description: Number of the last word (zero-indexed, inclusive).
    items-search-ExplanationFilters:
      type: object
      description: Used filter.
      properties:
        filters:
          $ref: '#/components/schemas/items-search-QueryRuleFilters'
        ruleId:
          type: integer
          description: Id of the query rule from which the filter come.
    items-search-ExplanationBoostFilters:
      type: object
      description: Used boost filter.
      properties:
        filters:
          $ref: '#/components/schemas/items-search-QueryRuleFilters'
        weight:
          type: number
          description: Weight of the filter.
        ruleId:
          type: integer
          description: Id of the query rule from which the filter come.
    items-search-QueryRuleFilters:
      type: object
      description: Filters from query rules.
      properties:
        textFilters:
          type: array
          description: Text-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
              mode:
                type: string
                description: |
                  Information whether to include or exclude filtered results.

                  - `include`: includes filtered results
                  - `exclude`: excludes filtered results
                enum:
                - include
                - exclude
                example: include
              values:
                type: array
                description: Values to be used during filtering.
                example:
                - A-Brand
                - B-Brand
                items:
                  type: string
        rangeFilters:
          type: array
          description: Range-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: price
              operator:
                type: string
                description: |
                  Operator to be used during filtering.

                  - `gt`: greater than
                  - `gte`: greater or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `eq`/`neq`: equal/not equal
                enum:
                - gt
                - gte
                - lt
                - lte
                - eq
                - neq
              value:
                description: Value to use during filtering
                type: number
                example: 19.99
    items-search-ReturnNoData:
      type: object
      description: Indicates if no data consequence is activated.
      properties:
        enabled:
          type: boolean
          description: Indicates if the consequence is enabled.
        ruleIds:
          type: array
          description: Ids of the query rules which activated the consequence.
          items:
            type: integer
    items-search-HideHit:
      type: object
      properties:
        id:
          type: string
          description: Hidden item item.
        ruleIds:
          type: array
          description: Ids of query rules which caused the item to be hidden.
          items:
            type: integer
    items-search-SortedByMetric:
      type: object
      properties:
        metric:
          type: string
          description: Metric used to sort the items.
          enum:
          - TransactionsPopularity
          - PageVisitsPopularity
        ordering:
          type: string
          description: Applied ordering.
          enum:
          - asc
          - desc
    items-search-SortedByAttribute:
      type: object
      properties:
        attribute:
          type: string
          description: Name of the attribute used to sort the items.
        ordering:
          type: string
          description: Applied ordering.
          enum:
          - asc
          - desc
        ruleId:
          type: integer
          description: Id of a query rule that set the sort, if applicable.
    items-search-SortedByGeoPoint:
      type: object
      properties:
        point:
          type: string
          description: Point used to sort the items.
          example: 34.052235,-118.243685
        ordering:
          type: string
          description: Applied ordering.
          enum:
          - asc
          - desc
    items-search-FinalQuery:
      type: object
      properties:
        finalQuery:
          type: string
          description: Query that was ultimately used to perform the search.
        synonyms:
          type: array
          description: Used synonyms.
          items:
            type: object
            properties:
              word:
                type: string
                description: Phrase that the synonyms relate to.
              synonyms:
                type: array
                description: List of the synonyms.
                items:
                  type: string
    items-search-PerItemExplanation:
      type: object
      description: Explanation of the scoring of this item
      properties:
        extendedScoreFactors:
          $ref: '#/components/schemas/items-search-ExtendedScores'
        scoreFactors:
          $ref: '#/components/schemas/items-search-ScoreFactors'
        score:
          type: number
          description: Final score.
        matchedElasticFilter:
          type: boolean
          description: Indicates if the item was matched by an elastic filter.
        sortValue:
          oneOf:
          - type: string
          - type: number
          description: Value used to sort the items, if applicable.
    items-search-ScoreFactors:
      type: object
      description: Influence of historical data and behavioral analysis.
      properties:
        pageVisitsPopularity:
          type: number
          description: Normalized page views popularity.
        transactionsPopularity:
          type: number
          description: Normalized transactions popularity.
        personalization:
          type: number
          description: Normalized value of personalization coefficient, if applicable.
        pageVisitsInfluence:
          type: number
          description: Page views impact on score.
        transactionsInfluence:
          type: number
          description: Purchases impact on score.
        personalizationInfluence:
          type: number
          description: Personalization impact on score, if applicable.
    items-search-ExtendedScores:
      type: object
      description: Extended score factors. Only included if it is possible to gather them.
      properties:
        attributes:
          type: object
          description: "Attribute values which influenced the score.  \nThis object is separated into low/medium/high importance values (corresponding to attribute importance configuration in the search index configuration).  \nFor each type, `token` is the search query (may be modified by query rules, suggestions, etc.) that matched an attribute or attributes of that importance.  \n"
          properties:
            low:
              description: Low importance attributes score.
              allOf:
              - $ref: '#/components/schemas/items-search-TokenWithScore'
            medium:
              description: Medium importance attributes score.
              allOf:
              - $ref: '#/components/schemas/items-search-TokenWithScore'
            high:
              description: High importance attributes score.
              allOf:
              - $ref: '#/components/schemas/items-search-TokenWithScore'
        boostFilters:
          type: array
          description: Matched boost filters.
          items:
            type: object
            properties:
              filters:
                $ref: '#/components/schemas/items-search-QueryRuleFilters'
              weight:
                type: number
                description: Weight of the filter.
    items-search-TokenWithScore:
      type: object
      description: Token with its corresponding score.
      properties:
        token:
          type: string
          description: Token value.
        score:
          type: number
          description: Score of the token.
    items-search-config-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
      - timestamp
      - status
      - message
    items-search-config-SupportedLanguages:
      type: object
      description: Supported search languages as ISO 639-1 codes
      example:
        pl: Polish
        ro: Romanian
        ru: Russian
      additionalProperties:
        type: string
        description: Human-readable label for the ISO code
    items-search-config-PaginatedSearchConfigsSchema:
      type: object
      properties:
        data:
          type: array
          description: A list of indices' configurations
          items:
            $ref: '#/components/schemas/items-search-config-SearchConfigSchema'
        meta:
          $ref: '#/components/schemas/items-search-config-PaginationMeta'
        extras:
          $ref: '#/components/schemas/items-search-config-IndicesLimitsSchema'
    items-search-config-IndicesLimitsSchema:
      type: object
      description: Search-indices limit info for the requesting business profile
      required:
      - indexLimit
      - indexLimitReached
      properties:
        indexLimit:
          type: integer
          description: Maximum number of search indices allowed for this business profile (capped by hard limit)
        indexLimitReached:
          type: boolean
          description: True if the current number of search indices is at or above indexLimit
    items-search-config-PaginationMeta:
      type: object
      description: 'Optional pagination metadata (sent if `"includeMeta": true`)'
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of campaigns
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                - first
                - next
                - prev
                - last
    items-search-config-SearchConfigSchema:
      type: object
      description: Details of a single index
      properties:
        indexId:
          $ref: '#/components/schemas/items-search-config-IndexIdSchema'
        indexName:
          $ref: '#/components/schemas/items-search-config-IndexNameSchema'
        description:
          $ref: '#/components/schemas/items-search-config-IndexDescriptionSchema'
        itemsCatalogId:
          $ref: '#/components/schemas/items-search-config-ItemsCatalogIdSchema'
        language:
          $ref: '#/components/schemas/items-search-config-LanguageSchema'
        enabled:
          $ref: '#/components/schemas/items-search-config-EnabledSchema'
        ignoreUnavailableItems:
          $ref: '#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema'
        scoring:
          $ref: '#/components/schemas/items-search-config-ScoringSchema'
        suggestions:
          $ref: '#/components/schemas/items-search-config-Suggestions'
        tokenizer:
          $ref: '#/components/schemas/items-search-config-Tokenizer'
        analyzers:
          $ref: '#/components/schemas/items-search-config-Analyzers'
        attributesWithoutPrefixSearch:
          $ref: '#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema'
        attributesWithoutTypoTolerance:
          $ref: '#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema'
        valuesWithoutTypoTolerance:
          $ref: '#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema'
        typoToleranceOnNumericValues:
          $ref: '#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema'
        searchableAttributes:
          $ref: '#/components/schemas/items-search-config-SearchableAttributesSchema'
        displayableAttributes:
          $ref: '#/components/schemas/items-search-config-DisplayableAttributesSchema'
        facetableAttributes:
          $ref: '#/components/schemas/items-search-config-FacetableAttributesSchema'
        filterableAttributes:
          $ref: '#/components/schemas/items-search-config-FilterableAttributesSchema'
        sortableAttributes:
          $ref: '#/components/schemas/items-search-config-SortableAttributesSchema'
        distinctFilterAttributes:
          $ref: '#/components/schemas/items-search-config-DistinctFilterAttributesSchema'
        recentSearches:
          $ref: '#/components/schemas/items-search-config-RecentSearchesConfig'
        reranking:
          $ref: '#/components/schemas/items-search-config-RerankingSchema'
        optimization:
          $ref: '#/components/schemas/items-search-config-OptimizationSchema'
        dynamicSynonyms:
          $ref: '#/components/schemas/items-search-config-DynamicSynonymsConfigurationSchema'
        dynamicFacets:
          $ref: '#/components/schemas/items-search-config-DynamicFacetsSchema'
        geoSearch:
          $ref: '#/components/schemas/items-search-config-GeoSearchSchema'
        queryRules:
          $ref: '#/components/schemas/items-search-config-QueryRulesSchema'
        updatedAt:
          $ref: '#/components/schemas/items-search-config-UpdatedAtSchema'
        createdAt:
          $ref: '#/components/schemas/items-search-config-CreatedAtSchema'
    items-search-config-IndexIdSchema:
      type: string
      description: ID of the index
    items-search-config-IndexNameSchema:
      type: string
      description: Human-friendly name of the index
    items-search-config-IndexDescriptionSchema:
      type: string
      description: Description of the index
    items-search-config-IndexStateSchema:
      type: string
      enum:
      - NotReady
      - ReadyUpToDate
      - ReadyNotUpToDate
      description: State of the index
    items-search-config-ItemsCatalogIdSchema:
      type: string
      description: ID of the item catalog from which the index will be created
    items-search-config-LanguageSchema:
      type: string
      description: Search language as ISO 639-1 code
    items-search-config-EnabledSchema:
      type: boolean
      description: When `true`, the index is enabled and can be queried.
    items-search-config-IgnoreUnavailableItemsSchema:
      type: boolean
      description: When `true`, unavailable items are not indexed, which makes the search run faster.
      default: true
    items-search-config-ScoringSchema:
      description: |
        Item scoring settings that affect the presentation order of the results.

        `0` means the lowest importance of a parameter, `1` is the highest importance.
      type: object
      properties:
        pageVisitsPopularity:
          description: The importance of how often the item page is visited
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        transactionsPopularity:
          description: The importance of how often the item is included in transactions
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        personalized:
          description: The importance of how relevant a item is to a profile according to the AI model
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        tieBreaker:
          description: The importance of lesser phrase matches
          type: number
          format: float
          default: 0
          minimum: 0
          maximum: 1
        matching:
          $ref: '#/components/schemas/items-search-config-Matching'
        fallbackMatching:
          $ref: '#/components/schemas/items-search-config-FallbackMatching'
        similarity:
          $ref: '#/components/schemas/items-search-config-Similarity'
        crossWorkspaceMode:
          $ref: '#/components/schemas/items-search-config-CrossWorkspaceModeSchema'
    items-search-config-CrossWorkspaceModeSchema:
      description: Cross workspace mode configuration
      type: object
      required:
      - enabled
      properties:
        enabled:
          description: When `true`, cross workspace search personalization mode is enabled
          type: boolean
    items-search-config-Matching:
      description: Controls how many clauses should be present in query
      oneOf:
      - $ref: '#/components/schemas/items-search-config-MinimumMatching'
      - $ref: '#/components/schemas/items-search-config-MaximumNotMatching'
      - $ref: '#/components/schemas/items-search-config-AnyMatching'
      - $ref: '#/components/schemas/items-search-config-AllMatching'
      - $ref: '#/components/schemas/items-search-config-AdaptiveMatching'
    items-search-config-FallbackMatching:
      description: |
        Backup matching mode used in cases where the main matching mode
        (specified in `matching` parameter) does not provide enough results (at least 5)
      oneOf:
      - $ref: '#/components/schemas/items-search-config-MinimumMatching'
      - $ref: '#/components/schemas/items-search-config-MaximumNotMatching'
      - $ref: '#/components/schemas/items-search-config-AnyMatching'
      - $ref: '#/components/schemas/items-search-config-AdaptiveMatching'
    items-search-config-MinimumMatching:
      type: object
      description: Indicates number of mandatory clauses
      properties:
        type:
          type: string
          enum:
          - MinimumMatching
        value:
          type: integer
          minimum: 1
    items-search-config-MaximumNotMatching:
      type: object
      description: Indicates number of optional clauses
      properties:
        type:
          type: string
          enum:
          - MaximumNotMatching
        value:
          type: integer
          minimum: 1
    items-search-config-AnyMatching:
      type: object
      description: Any of clauses should match
      properties:
        type:
          type: string
          enum:
          - AnyMatching
    items-search-config-AllMatching:
      type: object
      description: All clauses should match
      properties:
        type:
          type: string
          enum:
          - AllMatching
    items-search-config-AdaptiveMatching:
      type: object
      description: |
        Matching that works differently depending on the number of terms in the search query.
      properties:
        type:
          type: string
          enum:
          - AdaptiveMatching
        termsToMatch:
          type: number
          format: float
          minimum: 0
          exclusiveMinimum: true
          maximum: 1
          exclusiveMaximum: true
          description: |
            Indicates the percentage of all query terms that should be matched.
            This matching is done using MinimumMatching with the value set to:
            `termsToMatch * n`, where n is a number of all terms in the search query.
            **If you define termsToMatch, you can't define termsToSubtract.**
        termsToSubtract:
          type: integer
          minimum: 1
          default: 1
          description: |
            Indicates a fixed number that should be subtracted from
            the number of query terms that should match. This matching is done using
            MinimumMatching with the value set to `n - termsToSubtract`, where n is
            a number of all terms in the search query.
            **If you define termsToSubtract, you can't define termsToMatch.**
        termsToActivate:
          type: integer
          minimum: 1
          default: 3
          description: |
            Indicates how long (number of words) a search query must be to activate this mechanism.
            All queries that are shorter than termsToActivate will use AllMatching.
    items-search-config-Similarity:
      description: Defines how matching documents are scored
      oneOf:
      - $ref: '#/components/schemas/items-search-config-BM25Similarity'
      - $ref: '#/components/schemas/items-search-config-IDFSimilarity'
    items-search-config-BM25Similarity:
      type: object
      description: Enhanced TF-IDF scoring model
      properties:
        type:
          type: string
          enum:
          - BM25
        k1:
          type: number
          description: Controls non-linear term frequency normalization (saturation)
          format: float
          default: 1.2
          minimum: 0
          maximum: 10
        b:
          type: number
          description: Controls to what degree document length normalizes tf values
          format: float
          default: 0.75
          minimum: 0
          maximum: 1
    items-search-config-IDFSimilarity:
      type: object
      description: Term frequency-inverse document frequency scoring model
      properties:
        type:
          type: string
          enum:
          - IDF
    items-search-config-Tokenizer:
      description: Used for tokenizing full text into individual words
      oneOf:
      - $ref: '#/components/schemas/items-search-config-WhitespaceTokenizer'
      - $ref: '#/components/schemas/items-search-config-StandardTokenizer'
      - $ref: '#/components/schemas/items-search-config-PatternTokenizer'
    items-search-config-WhitespaceTokenizer:
      type: object
      description: The whitespace tokenizer divides text into terms whenever it encounters any whitespace character
      properties:
        type:
          type: string
          enum:
          - Whitespace
    items-search-config-StandardTokenizer:
      type: object
      description: The standard tokenizer divides text into terms on word boundaries
      properties:
        type:
          type: string
          enum:
          - Standard
    items-search-config-PatternTokenizer:
      type: object
      description: The pattern tokenizer uses a regular expression to either split text into terms whenever it matches a word separator
      properties:
        type:
          type: string
          enum:
          - Pattern
        pattern:
          type: string
          example: '[.,;]'
    items-search-config-Analyzers:
      type: object
      description: Controls analyzer settings.
      required:
      - autocomplete
      properties:
        autocomplete:
          type: string
          description: The completion method used.
          enum:
          - Ngram
          - EdgeNgram
          - NgramWithSynonyms
          - EdgeNgramWithSynonyms
          - DefaultWithSynonyms
    items-search-config-Suggestions:
      type: object
      description: Controls manner in which suggestions are generated
      properties:
        smoothingModel:
          type: string
          description: Controls balance weight between infrequent grams and frequent grams
          enum:
          - Popularity
          - Accuracy
        gramSize:
          type: integer
          description: Describes max size of the n-grams in the field
          default: 3
          minimum: 1
          maximum: 10
        maxErrors:
          type: integer
          description: Maximum number of errors for terms to be considered as misspelling in order to for a correction
          default: 2
          minimum: 1
          maximum: 5
        minWordLength:
          type: integer
          description: The minimum length a suggest text term must have in order to be included
          default: 4
          minimum: 1
        useAlways:
          type: boolean
          description: Controls is suggestions are used only if no documents match, or always
          default: false
    items-search-config-QueryRulesSchema:
      description: Configuration for custom behavior of query rules at the index level.
      type: object
      properties:
        consequencesJoinOperators:
          type: object
          description: |
            Defines how filter consequences from multiple query rules are logically combined.
            This setting determines whether those filters are joined using the AND or OR operator.
          properties:
            standardFilters:
              type: string
              description: |
                Logical operator used to combine standard filters defined in the consequences of multiple query rules.
                If not specified, the default operator is OR.
              enum:
              - AND
              - OR
              default: OR
            elasticFilters:
              type: string
              description: |
                Logical operator used to combine elastic filters defined in the consequences of multiple query rules.
                If not specified, the default operator is OR.
              enum:
              - AND
              - OR
              default: OR
    items-search-config-SearchableAttributesSchema:
      description: |
        The attributes that are taken into account as full text search terms
      type: object
      properties:
        fullText:
          type: array
          description: The least important parameters
          example:
          - brand
          - color
          - promotion.type
          items:
            type: string
        fullTextBoosted:
          type: array
          description: Medium-importance parameters
          example:
          - brand
          - color
          - promotion.type
          items:
            type: string
        fullTextStronglyBoosted:
          type: array
          description: The most important parameters
          example:
          - brand
          - color
          - promotion.type
          items:
            type: string
    items-search-config-DisplayableAttributesSchema:
      description: Attributes shown in the search results
      example:
      - brand
      - color
      - promotion.type
      type: array
      items:
        type: string
    items-search-config-AttributesWithoutPrefixSearchSchema:
      type: array
      description: Searchable attributes which will not be used in a prefix search
      example:
      - brand
      - color
      - promotion.type
      items:
        type: string
    items-search-config-AttributesWithoutTypoToleranceSchema:
      type: array
      description: Searchable attributes for which typo tolerance is off
      example:
      - itemId
      - link
      items:
        type: string
    items-search-config-ValuesWithoutTypoToleranceSchema:
      type: array
      description: Attributes values for which typo tolerance is off
      example:
      - Nike
      - blue
      - '74997'
      items:
        type: string
    items-search-config-TypoToleranceOnNumericValuesSchema:
      type: boolean
      description: When `true`, typo tolerance is active on numbers
      default: true
    items-search-config-FacetableAttributesSchema:
      description: Attributes for which facets are returned in the search response. By default, all facetable attributes are also filterable and sortable.
      type: object
      properties:
        range:
          $ref: '#/components/schemas/items-search-config-RangeAttributesSchema'
        text:
          $ref: '#/components/schemas/items-search-config-TextAttributesSchema'
        datetime:
          $ref: '#/components/schemas/items-search-config-DatetimeAttributesSchema'
    items-search-config-FilterableAttributesSchema:
      description: Attributes for which filters can be used
      type: object
      properties:
        range:
          $ref: '#/components/schemas/items-search-config-RangeAttributesSchema'
        text:
          $ref: '#/components/schemas/items-search-config-TextAttributesSchema'
        datetime:
          $ref: '#/components/schemas/items-search-config-DatetimeAttributesSchema'
    items-search-config-SortableAttributesSchema:
      description: Attributes using which search results can be sorted
      type: object
      properties:
        range:
          $ref: '#/components/schemas/items-search-config-RangeAttributesSchema'
        text:
          $ref: '#/components/schemas/items-search-config-TextAttributesSchema'
        datetime:
          $ref: '#/components/schemas/items-search-config-DatetimeAttributesSchema'
    items-search-config-DistinctFilterAttributesSchema:
      description: Attributes for which distinct can be used
      type: object
      properties:
        range:
          $ref: '#/components/schemas/items-search-config-RangeAttributesSchema'
        text:
          $ref: '#/components/schemas/items-search-config-TextAttributesSchema'
        datetime:
          $ref: '#/components/schemas/items-search-config-DatetimeAttributesSchema'
    items-search-config-RangeAttributesSchema:
      type: array
      description: Array of range attributes
      example:
      - age
      - customScore.value
      - salePrice.value
      default: []
      items:
        type: string
    items-search-config-TextAttributesSchema:
      type: array
      description: Array of text attributes
      example:
      - brand
      - color
      - promotion.type
      default: []
      items:
        type: string
    items-search-config-DatetimeAttributesSchema:
      type: array
      description: Array of datetime attributes
      example:
      - created
      - attributes.modifiedAt
      default: []
      items:
        type: string
    items-search-config-IndexStateResponseSchema:
      type: object
      description: State of a single index
      properties:
        indexId:
          $ref: '#/components/schemas/items-search-config-IndexIdSchema'
        state:
          $ref: '#/components/schemas/items-search-config-IndexStateSchema'
        lastConfigChange:
          $ref: '#/components/schemas/items-search-config-UpdatedAtSchema'
        errorReason:
          type: string
          description: Reason why index was not rebuild successfully
        log:
          type: string
          description: Error log with additional information
    items-search-config-GetSuggestionIndicesResponseSchema:
      type: object
      properties:
        data:
          type: array
          description: An array of suggestion indices
          items:
            $ref: '#/components/schemas/items-search-config-SuggestionIndexSchema'
        meta:
          $ref: '#/components/schemas/items-search-config-PaginationMeta'
    items-search-config-SuggestionIndexSchema:
      type: object
      properties:
        indexId:
          $ref: '#/components/schemas/items-search-config-IndexIdSchema'
        indexName:
          $ref: '#/components/schemas/items-search-config-SuggestionIndexNameSchema'
        description:
          $ref: '#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema'
        author:
          $ref: '#/components/schemas/items-search-config-SuggestionIndexAuthorSchema'
        enabled:
          $ref: '#/components/schemas/items-search-config-SuggestionIndexEnabledSchema'
        sources:
          $ref: '#/components/schemas/items-search-config-SuggestionIndexSourcesSchema'
        denylist:
          $ref: '#/components/schemas/items-search-config-SuggestionIndexDenylistSchema'
        updatedAt:
          $ref: '#/components/schemas/items-search-config-UpdatedAtSchema'
        createdAt:
          $ref: '#/components/schemas/items-search-config-CreatedAtSchema'
    items-search-config-SuggestionIndexNameSchema:
      type: string
      description: Name of the suggestion index
    items-search-config-SuggestionIndexDescriptionSchema:
      type: string
      description: Description of the suggestion index
    items-search-config-SuggestionIndexAuthorSchema:
      type: integer
      description: ID of the user who created the suggestion index
    items-search-config-SuggestionIndexEnabledSchema:
      type: boolean
      description: When `true`, index is enabled and can be queried.
    items-search-config-UpdatedAtSchema:
      type: string
      format: date-time
      description: Last update time in YYYY-MM-DDThh:mm:ssZ format (ISO 8601, UTC)
    items-search-config-CreatedAtSchema:
      type: string
      format: date-time
      description: Creation time in YYYY-MM-DDThh:mm:ssZ format (ISO 8601, UTC)
    items-search-config-SuggestionIndexSourcesSchema:
      type: object
      description: Sources for the suggestions
      properties:
        indices:
          $ref: '#/components/schemas/items-search-config-SuggestionIndexSourceIndicesSchema'
        external:
          $ref: '#/components/schemas/items-search-config-SuggestionIndexExternalSchema'
        generate:
          $ref: '#/components/schemas/items-search-config-SuggestionIndexGenerateSchema'
    items-search-config-SuggestionIndexSourceIndicesSchema:
      type: array
      description: A list of search indices
      items:
        type: object
        properties:
          indexId:
            $ref: '#/components/schemas/items-search-config-IndexIdSchema'
          minPopularity:
            type: integer
            description: Minimum popularity of a query to be used as a suggestion
            default: 5
          minHits:
            type: integer
            description: Minimum search hits of a query to be used as a suggestion
            default: 1
          minLetters:
            type: integer
            description: Minimum required number of letters for a suggestion to remain
            default: 2
          daysInterval:
            type: integer
            description: Suggestions will be created from search statistics from last `daysInterval` days
            default: 30
          validate:
            type: boolean
            description: When `true`, the suggestions presence in searchable attributes is verified
            default: false
        required:
        - indexId
    items-search-config-SuggestionIndexExternalSchema:
      type: array
      description: An array of external queries that can be used as suggestions
      items:
        type: object
        properties:
          query:
            type: string
            description: External query to be used as a suggestion
          count:
            type: integer
            description: Hits of the external query - used to create the weight of the suggested query.
        required:
        - query
        - count
    items-search-config-SuggestionIndexGenerateSchema:
      type: array
      description: |
        A group of attributes to use for generating suggestions.

        If the group consists of single facet, all values of the facet are used as suggestions.

        If the group consists of more than one facet, all combinations of the facets' values are used.

        **Example 1:**
        - Given the `["brand"]` group, the generated suggestions are: `["apple", "samsung", "nokia"]`

        - Given the `["color"]` group, the generated suggestions are: `["red", "blue"]`

        **Example 2:**

        Given the `["color", "brand"]` group, the generated suggestions are:<br/>
        `["red apple", "red samsung", "red nokia", "blue apple", "blue samsung", "blue nokia"]`
      items:
        type: object
        properties:
          itemsCatalogId:
            type: string
            description: Id of a catalog from which attributes will be taken
          attributes:
            type: array
            items:
              type: string
    items-search-config-SuggestionIndexDenylistSchema:
      type: array
      description: Suggestions that will be ignored and *not* shown
      items:
        type: object
        properties:
          pattern:
            type: string
            description: Pattern (text) to be used while denylisting suggestions. If the suggestion matches the pattern in a way defined by `matchingType`, it's not shown.
          matchingType:
            type: string
            description: |2

              <span style="color:red"><strong>IMPORTANT</strong></span>: All patterns are case-**in**sensitive, including regex.

              - Using Phrase matching, the suggestion must match the whole pattern exactly.

              - Using FullWord matching, any word of the suggestion must exactly match the pattern.

              - Using PartialWord matching, any word of the suggestion must partially match the pattern.

              - Using RegularExpression matching, the pattern is treated as a regular expression and must match the suggestion.
            enum:
            - Phrase
            - FullWord
            - PartialWord
            - RegularExpression
            example: Phrase
    items-search-config-RecentSearchesConfig:
      type: object
      description: Recent searches configuration
      properties:
        windowSize:
          description: Amount of recent searches items to be returned
          type: integer
          example: 100
        timeSpan:
          type: object
          description: Defines period for which recent searches are to be returned
          properties:
            type:
              description: One of the following time units
              type: string
              enum:
              - YEARS
              - MONTHS
              - WEEKS
              - DAYS
              - HOURS
              - MINUTES
              - SECONDS
              example: DAYS
            value:
              description: Value corresponding with the time unit
              type: integer
              example: 30
    items-search-config-DynamicSynonymsConfigurationSchema:
      type: object
      description: Dynamic synonyms configuration
      required:
      - enabled
      - workflowIntervalDays
      properties:
        enabled:
          type: boolean
          description: When `true`, dynamic synonyms are enabled
        workflowIntervalDays:
          type: integer
          description: Interval in days between synonym workflow runs
          minimum: 7
          maximum: 31
          example: 14
        coldStart:
          type: boolean
          description: Enables cold start mode for dynamic synonyms. Once enabled, it cannot be disabled. When enabled for the first time, a cold-start-agent resource is created with NOT READY state.
          default: false
          example: false
        autoAcceptThreshold:
          type: number
          format: float
          description: Threshold for automatic synonym acceptance. Must be in [0, 1] range.
          minimum: 0
          maximum: 1
          example: 0.8
    items-search-config-DynamicFacetsSchema:
      type: object
      description: Dynamic facets configuration
      required:
      - enabled
      - maxFacets
      properties:
        enabled:
          type: boolean
          description: When `true`, dynamic facets are enabled.
        maxFacets:
          type: integer
          description: Maximum number of dynamic facets to return. Must be non-negative.
          minimum: 0
          example: 10
        minCoverageThreshold:
          type: number
          format: float
          description: "Minimum coverage threshold for a facet to be included. Must be in [0, 1] range. \nCoverage is `M/N`, where:\n- `M` is the number of occurrences of a facet in the search results.\n- `N` is the total number of results.\nHigher coverage values mean that a facet is more relevant.\n"
          minimum: 0
          maximum: 1
          example: 0.1
        objective:
          type: string
          description: Objective used to select dynamic facets.
          enum:
          - coverage
          - popularity
          example: coverage
    items-search-config-RerankingSchema:
      type: object
      description: Reranking configuration
      properties:
        dynamicReranker:
          $ref: '#/components/schemas/items-search-config-DynamicRerankerSchema'
        queryClassification:
          $ref: '#/components/schemas/items-search-config-QueryClassificationSchema'
    items-search-config-OptimizationSchema:
      type: object
      description: Configuration for the search weight optimizer
      properties:
        enabled:
          type: boolean
          description: Gate for the optimization feature. items-search applies `optimizedWeights` (via `target` or a query-rule target) only when `true`.
        target:
          $ref: '#/components/schemas/items-search-config-OptimizationTarget'
        optimizedWeights:
          type: object
          description: Per-target optimization weight configuration, keyed by optimization target (ctr, cr, revenue, ndcg, margin)
          additionalProperties:
            $ref: '#/components/schemas/items-search-config-OptimizationWeightsValue'
    items-search-config-GeoSearchSchema:
      type: object
      description: Geo search configuration
      properties:
        geoSearchableAttribute:
          type: string
          description: |
            Attribute that contains the geolocation of the product.
            The attribute's value must be one of the following types:
            - JSON object with `lat` and `lon` properties
            - JSON array of objects containing `lat` and `lon` properties
            - JSON string of format `latitude,longitude`
            - JSON array of strings of format `latitude,longitude`
    items-search-config-DynamicRerankerSchema:
      type: object
      description: Dynamic reranker configuration
      required:
      - enabled
      - numberOfItems
      properties:
        enabled:
          type: boolean
          description: When `true`, the dynamic reranker is enabled
        filter:
          type: string
          description: Only items that meet this filter will be considered by the reranker
        numberOfItems:
          type: integer
          description: Number of items that can be reranked in search results
          minimum: 1
          maximum: 50
        minNumberOfEvents:
          type: integer
          description: If present, items with fewer events than this value will be filtered out from reranking.
    items-search-config-QueryClassificationSchema:
      type: object
      description: Query classification configuration
      properties:
        enabled:
          type: boolean
          description: When `true`, the query classification is enabled.
        actions:
          type: array
          description: Search result actions with a minimum reliability level
          items:
            type: object
            properties:
              action:
                $ref: '#/components/schemas/items-search-config-SearchResultAction'
              minReliabilityLevel:
                $ref: '#/components/schemas/items-search-config-ReliabilityLevel'
        excludedPhrases:
          type: array
          description: Phrases that will be excluded from query classification
          items:
            type: string
        excludedCategories:
          type: array
          description: Categories that will be excluded from query classification
          items:
            type: string
    items-search-config-OptimizationTarget:
      type: string
      description: |
        The optimization target for the weight optimizer. Specifies which metric to optimize for.
        - `ctr` — Click-through rate
        - `cr` — Conversion rate
        - `revenue` — Revenue
        - `ndcg` — Normalized Discounted Cumulative Gain
        - `margin` — Margin
      enum:
      - ctr
      - cr
      - revenue
      - ndcg
      - margin
    items-search-config-BaseWeights:
      type: object
      description: Base weight configuration for optimization
      properties:
        personalized:
          type: number
          format: float
          description: Weight for personalization factor
          minimum: 0
          maximum: 5
        transactionsPopularity:
          type: number
          format: float
          description: Weight for transactions popularity
          minimum: 0
          maximum: 5
        pageVisitsPopularity:
          type: number
          format: float
          description: Weight for page visits popularity
          minimum: 0
          maximum: 5
        transactions7DaysPopularity:
          type: number
          format: float
          description: Weight for transactions popularity in the last 7 days
          minimum: 0
          maximum: 5
        pageVisits7DaysPopularity:
          type: number
          format: float
          description: Weight for page visits popularity in the last 7 days
          minimum: 0
          maximum: 5
        revenueBoost:
          type: number
          format: float
          description: Weight for revenue boost factor
          minimum: 0
          maximum: 5
        conversionRateBoost:
          type: number
          format: float
          description: Weight for conversion rate boost factor
          minimum: 0
          maximum: 5
    items-search-config-DrrWeights:
      type: object
      description: Dynamic Reranker (DRR) weight configuration for optimization
      properties:
        searchDRRWeight:
          type: number
          format: float
          description: Weight for search DRR signal
          minimum: 0
          maximum: 5
        listingDRRWeight:
          type: number
          format: float
          description: Weight for listing DRR signal
          minimum: 0
          maximum: 5
        clickWeight:
          type: number
          format: float
          description: Weight for click signal
          minimum: 0
          maximum: 5
        buyWeight:
          type: number
          format: float
          description: Weight for buy signal
          minimum: 0
          maximum: 5
        revenueWeight:
          type: number
          format: float
          description: Weight for revenue signal
          minimum: 0
          maximum: 5
    items-search-config-OptimizationWeightsValue:
      type: object
      description: Optimization weights for a specific target, containing optional base and DRR weights
      properties:
        baseWeights:
          $ref: '#/components/schemas/items-search-config-BaseWeights'
        drrWeights:
          $ref: '#/components/schemas/items-search-config-DrrWeights'
    items-search-config-SearchResultAction:
      type: string
      description: |
        The action to perform when the reliability level from `minReliabilityLevel` is reached.
        - `staticFilter` will apply a static filter to limit the search results to the predicted category.
        - `elasticFilter` will apply an elastic filter - if there are not enough results from the predicted category, the AI engine will pick items from other categories to meet the minimum number of results.
        - `boosting` will increase the scores of items from the predicted category.

        If reliability levels are met for multiple actions, the priority is:
        1. static filter
        2. elastic filter
        3. boosting
      enum:
      - staticFilter
      - elasticFilter
      - boosting
    items-search-config-ReliabilityLevel:
      type: string
      description: |
        For each type of action, you can specify the minimum level required to trigger that action. A reliability level indicates how confident we are that a given prediction is the best choice.
      enum:
      - certain
      - veryHigh
      - high
      - medium
      - low
    items-search-recent-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
      - timestamp
      - status
      - message
    items-search-recent-DeletedSearch:
      type: object
      properties:
        query:
          type: string
          description: Deleted search query. Required if `match` field is set to `query`.
        match:
          type: string
          description: |
            Tells how to match this deleted search on recent searches.

            - `query`: matches only recent searches with provided query
            - `all`: matches all recent searches
          default: query
        timestamp:
          type: string
          format: date-time
          description: Time when the search was deleted. If not present current time is taken.
    metrics-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
      - timestamp
      - status
      - message
    metrics-AvailableMetrics:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            description: Metric identifier
          description:
            type: string
            description: Metric description
    metrics-AvailableMetricsIds:
      type: array
      items:
        type: string
    morph-RunId:
      type: string
      format: uuid
      description: '`journeyId` of the last Automation run'
    morph-StartTime:
      description: Time when the journey started
      type: string
      format: date-time
      example: 2023-09-05T14:07:44.264Z
    morph-JobStatus:
      type: string
      description: High-level status of the job. If a given type of job doesn't exist in a workflow (for example, `transformData` in a workflow without any Data Transformation nodes), the status is `Pending`.
      enum:
      - Pending
      - InProgress
      - Finished
      - Failed
      - Warning
      example: Pending
    morph-HttpErrorDetails:
      type: object
      required:
      - error
      - status
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the error occurred
        message:
          type: string
          description: Description of the problem. If an error code is included, check the [API Error Reference](https://developers.synerise.com/errors.html) for details.
    morph-SyneriseServiceError:
      type: object
      description: Standard Synerise error format
      required:
      - httpStatus
      - errorCode
      - message
      - timestamp
      properties:
        httpStatus:
          type: integer
          format: int32
          description: HTTP status code of the response
        errorCode:
          type: string
          description: Synerise internal error code. Check the [API Error Reference](https://developers.synerise.com/errors.html) for details.
          example: ERR-001
        message:
          type: string
          description: Description of the problem
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        help:
          type: string
          nullable: true
          description: Link to documentation related to the error
        traceId:
          type: string
          nullable: true
          description: Correlation identifier of the failed request
        errors:
          type: array
          description: Nested errors with details
          items:
            $ref: '#/components/schemas/morph-SyneriseServiceError'
        source:
          type: object
          nullable: true
          description: Source of the error
        details:
          type: object
          nullable: true
          description: Additional error details
        field:
          type: string
          nullable: true
          description: Request field the error relates to
    morph-LogsForStage:
      type: object
      required:
      - status
      - logs
      - logsSize
      properties:
        status:
          $ref: '#/components/schemas/morph-JobStatus'
        runDate:
          type: string
          description: Time when this job started
          example: 2022-01-31T12:37:25.109Z
        logs:
          type: array
          description: An array of log lines
          items:
            type: string
            example: 2022-01-31T12:37:25.109412Z INFO Job finished with success!
        logsSize:
          type: number
          description: The number of returned log lines
        failedRecordsFileId:
          type: string
          format: uuid
          description: UUID of the input file that couldn't be processed
        successCount:
          type: integer
          description: Number of rows successfully processed by the job
        failureCount:
          type: integer
          description: Number of rows that failed during processing by the job
    morph-AutomationLogsResponse:
      description: Logs for each stage in the workflow
      type: object
      properties:
        importData:
          description: Logs for pulling data into the workflow
          allOf:
          - $ref: '#/components/schemas/morph-LogsForStage'
        transformData:
          description: Logs for Data Transformation processing
          allOf:
          - $ref: '#/components/schemas/morph-LogsForStage'
        exportData:
          description: Logs for pushing data from the workflow
          allOf:
          - $ref: '#/components/schemas/morph-LogsForStage'
    morph-DtDiagramLastRunResponse:
      type: object
      required:
      - startTime
      - pipelineResponse
      - overallRunStatus
      properties:
        startTime:
          $ref: '#/components/schemas/morph-StartTime'
        runId:
          $ref: '#/components/schemas/morph-RunId'
        pipelineResponse:
          $ref: '#/components/schemas/morph-AutomationLogsResponse'
        overallRunStatus:
          $ref: '#/components/schemas/morph-JobStatus'
    morph-NewProfileExport:
      type: object
      required:
      - name
      - fields
      - agreementFilter
      - segmentationHash
      - excludedIds
      properties:
        name:
          type: string
          description: Name of the export, visible at [https://app.synerise.com/assets/](https://app.synerise.com/assets/exports)
        fields:
          type: array
          example:
          - id
          - attr1
          - attr2
          minItems: 1
          items:
            type: string
          description: |
            Profile attributes to export.

            **The first attribute in this array MUST BE `id`**
        agreementFilter:
          type: string
          enum:
          - NONE
          - EMAIL
          - WEB_PUSH
          - PUSH
          - SMS
          - RECOGNIZED
          - ANONYMOUS
          description: You can filter the profiles by their marketing agreement. `NONE` means no filter.
        segmentationHash:
          type: string
          format: uuid
          description: UUID of the segmentation which defines the profiles to export. The segmentation conditions are checked at the time of sending the "create and run export" request.
        tags:
          type: array
          description: Profile tags to check for an exported profile. In the results, the tag name is the key and the value is "true" (string) if the tag is assigned to a given profile, otherwise it's "false".
          items:
            type: string
        expressions:
          type: array
          description: UUIDs of expressions to check for an exported profile. In the results, the name of the expression is the key and the value is the result of the expression.
          items:
            type: string
            format: uuid
        aggregates:
          type: array
          description: UUIDs of aggregates to check for an exported profile. In the results, the name of the aggregate is the key and the value is the result of the aggregate.
          items:
            type: string
            format: uuid
        segmentations:
          type: array
          description: UUIDs of segmentations to check for an exported profile. In the results, the name of the segmentation is the key and the value is "true" (string) if the profile belongs to the segmentation, otherwise it's "false".
          items:
            type: string
            format: uuid
        excludedIds:
          type: array
          minItems: 0
          items:
            type: number
          description: List of clientIds to exclude from the exported data
    morph-ExportResponse:
      type: object
      required:
      - taskId
      - columnOrder
      - estimatedCount
      properties:
        taskId:
          type: string
          format: uuid
          description: ID of the submitted task. Save this ID to be able to retrieve the data.
        columnOrder:
          type: array
          description: Fields included in the export
          items:
            type: string
            description: Name of an exported attribute/tag/analysis
        estimatedCount:
          type: number
          description: Estimated number of profiles in the exported segment
    notes-service-NoteRequest:
      type: object
      description: The content of the note
      properties:
        subject:
          type: string
          description: The title of the note
          example: Note 1
        body:
          type: string
          description: Text of the note
          example: <h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n
    notes-service-NoteResponse:
      type: object
      description: The content and metadata of the note
      properties:
        body:
          type: string
          description: Text of the note
          example: <h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n
        created:
          type: string
          format: date-time
          description: Creation time
          example: 2019-08-01T08:03:31.556Z
        createdBy:
          type: string
          description: ID of the Synerise User who created the note
          example: example@example.com
        id:
          type: string
          description: UUID of the note
          example: 69b0e925-086a-4964-b8dc-4c9e58213cf5
        subject:
          type: string
          description: The title of the note
          example: Note 1
        updated:
          type: string
          format: date-time
          description: Last update time
          example: 2019-08-01T08:03:38.556Z
        updatedBy:
          type: string
          description: ID of the last user who updated the note
          example: example@example.com
        userId:
          type: integer
          format: int64
          description: Numerical ID of the last user who updated the note
          example: 11405
    optimizer-manager-ErrorV2:
      type: object
      properties:
        error:
          type: string
          description: Description of the error
        errorCode:
          type: string
          description: Synerise error code. See [Error Code Reference](https://developers.synerise.com/errors.html).
        help:
          type: string
          description: Link to the error reference page for this error
        httpStatus:
          type: integer
          description: HTTP code of the error
        message:
          type: string
          description: Description of the error
        path:
          type: string
          description: Path of the resource which returned the error
        requestId:
          type: string
          description: Unique request ID
        status:
          type: integer
          description: Internal code for troubleshooting
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        traceId:
          type: string
          description: Trace ID for troubleshooting
    optimizer-manager-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
      - timestamp
      - status
      - message
    optimizer-manager-VariantsAllocationMethod:
      type: string
      enum:
      - Manual
      description: The variant allocation method. Currently, only `Manual` is available.
    optimizer-manager-ExperimentStatus:
      type: string
      enum:
      - NotStarted
      - Running
      - Paused
      - Finished
      description: Current status of the experiment. A finished experiment cannot be started again.
    optimizer-manager-ExperimentCreateOrUpdateRequestV2:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/optimizer-manager-ExperimentName'
        description:
          $ref: '#/components/schemas/optimizer-manager-ExperimentDescription'
        experimentKind:
          $ref: '#/components/schemas/optimizer-manager-ExperimentKind'
        variantsAllocationMethod:
          $ref: '#/components/schemas/optimizer-manager-VariantsAllocationMethod'
        variants:
          type: array
          description: An array of experiment variants
          items:
            $ref: '#/components/schemas/optimizer-manager-ExperimentVariantCreateOrUpdateV2'
      required:
      - name
      - experimentKind
      - variantsAllocationMethod
      - variants
    optimizer-manager-ExperimentV2Seq:
      type: array
      items:
        $ref: '#/components/schemas/optimizer-manager-ExperimentDetailsResponseV2'
    optimizer-manager-ExperimentDetailsResponseV2:
      type: object
      properties:
        experimentId:
          $ref: '#/components/schemas/optimizer-manager-ExperimentId'
        name:
          $ref: '#/components/schemas/optimizer-manager-ExperimentName'
        author:
          $ref: '#/components/schemas/optimizer-manager-ExperimentAuthor'
        description:
          $ref: '#/components/schemas/optimizer-manager-ExperimentDescription'
        experimentKind:
          $ref: '#/components/schemas/optimizer-manager-ExperimentKind'
        variantsAllocationMethod:
          $ref: '#/components/schemas/optimizer-manager-VariantsAllocationMethod'
        status:
          $ref: '#/components/schemas/optimizer-manager-ExperimentStatus'
        startedAt:
          $ref: '#/components/schemas/optimizer-manager-ExperimentStartedAt'
        stoppedAt:
          $ref: '#/components/schemas/optimizer-manager-ExperimentStoppedAt'
        createdAt:
          $ref: '#/components/schemas/optimizer-manager-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/optimizer-manager-UpdatedAt'
        variants:
          type: array
          description: An array of variants
          items:
            $ref: '#/components/schemas/optimizer-manager-VariantV2'
      required:
      - experimentId
      - name
      - experimentKind
      - variantsAllocationMethod
      - status
      - createdAt
      - variants
      - goals
    optimizer-manager-ExperimentVariantCreateOrUpdateV2:
      type: object
      properties:
        externalId:
          $ref: '#/components/schemas/optimizer-manager-ExternalId'
        name:
          $ref: '#/components/schemas/optimizer-manager-VariantName'
        weight:
          $ref: '#/components/schemas/optimizer-manager-VariantWeight'
        metadata:
          $ref: '#/components/schemas/optimizer-manager-VariantMetadata'
        isBaseline:
          $ref: '#/components/schemas/optimizer-manager-VariantIsBaseline'
      required:
      - externalId
      - weight
    optimizer-manager-VariantName:
      type: string
      description: Variant name
    optimizer-manager-ExternalId:
      type: string
      description: |
        Identifier of the resource to request with this variant.

        - For recommendations, this is the recommendation campaign ID.
        - For items/suggestion search, this is the search/suggestion index ID.
    optimizer-manager-VariantWeight:
      type: integer
      maximum: 10000
      description: "Importance of the variant. Higher value means higher importance.  \nThe total weight of all variants must be <= 10000.\n"
    optimizer-manager-VariantMetadata:
      type: string
      description: Additional data
    optimizer-manager-VariantIsBaseline:
      type: boolean
      description: '`true` if this is the baseline variant. When making a search/recommendation request, you will use the ID of the baseline index/recommendation and then the system will return a result from one of the variants.'
    optimizer-manager-VariantId:
      type: integer
      description: ID of the variant
    optimizer-manager-VariantV2:
      type: object
      properties:
        variantId:
          $ref: '#/components/schemas/optimizer-manager-VariantId'
        externalId:
          $ref: '#/components/schemas/optimizer-manager-ExternalId'
        name:
          $ref: '#/components/schemas/optimizer-manager-VariantName'
        weight:
          $ref: '#/components/schemas/optimizer-manager-VariantWeight'
        metadata:
          $ref: '#/components/schemas/optimizer-manager-VariantMetadata'
        isBaseline:
          $ref: '#/components/schemas/optimizer-manager-VariantIsBaseline'
      required:
      - variantId
      - externalId
      - weight
    optimizer-manager-ExperimentId:
      type: integer
      description: ID of the experiment
    optimizer-manager-ExperimentName:
      type: string
      description: Experiment name
    optimizer-manager-ExperimentAuthor:
      type: integer
      description: Author of the experiment
    optimizer-manager-ExperimentDescription:
      type: string
      description: Experiment description
    optimizer-manager-ExperimentKind:
      type: string
      description: The type of the experiment
      enum:
      - ITEMS_SEARCH
      - RECOMMENDATION_CAMPAIGN
    optimizer-manager-ExperimentStartedAt:
      type: string
      format: date-time
      description: Time when the experiment was started
    optimizer-manager-ExperimentStoppedAt:
      type: string
      format: date-time
      description: Time when the experiment was stopped
    optimizer-manager-CreatedAt:
      type: string
      format: date-time
      description: Creation time
    optimizer-manager-UpdatedAt:
      type: string
      format: date-time
      description: Last update time
    promotions-SuccessfulBatchDeleteData:
      title: Delete
      type: array
      minLength: 0
      description: Promotions correctly added to queue for deletion.
      items:
        type: object
        properties:
          code:
            $ref: '#/components/schemas/promotions-promotionCode'
    promotions-SuccessfulBatchImportData:
      title: Import
      type: array
      minLength: 0
      description: Promotions with correct data, queued for import. If `discountMode` wasn't included in the request, it's set to `STATIC`. Other properties are only included if they were added to the request.
      items:
        $ref: '#/components/schemas/promotions-promotionImportData'
    promotions-PromotionImportBatchRequest:
      type: object
      required:
      - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/promotions-promotionImportData'
          minItems: 1
          maxItems: 1000
          description: Array of promotion objects to import (upsert)
        extra:
          type: object
          description: Import metadata
          nullable: true
          properties:
            importHash:
              type: string
              description: Import identifier for troubleshooting
              maxLength: 255
              nullable: true
    promotions-PromotionDeleteItem:
      type: object
      description: Item accepted by the batch delete endpoint. The promotion is identified by its code.
      required:
      - code
      properties:
        code:
          $ref: '#/components/schemas/promotions-promotionCode'
    promotions-PromotionDeleteBatchRequest:
      type: object
      required:
      - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/promotions-PromotionDeleteItem'
          minItems: 1
          maxItems: 1000
          description: Array of objects with promotion code to delete
        extra:
          type: object
          nullable: true
          description: Additional metadata
          properties:
            importHash:
              type: string
              description: Import identifier for troubleshooting
              maxLength: 255
              nullable: true
    promotions-PromotionImportBatchDeleteAcceptedResponse:
      type: object
      properties:
        data:
          type: array
          description: Array of promotions queued for deletion
          items:
            type: object
            properties:
              code:
                $ref: '#/components/schemas/promotions-promotionCode'
    promotions-PromotionImportBatchAcceptedResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/promotions-SuccessfulBatchImportData'
    promotions-PromotionImportBatchPartialErrorResponse:
      type: object
      properties:
        httpStatus:
          allOf:
          - $ref: '#/components/schemas/promotions-ErrorV2HttpStatus'
          - example: 207
        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/steps/0/usageThreshold`.
                    errorCode:
                      $ref: '#/components/schemas/promotions-ErrorV2Code'
                    message:
                      type: string
                      description: Original Joi message for the field.
                    help:
                      type: string
                      nullable: true
                      description: Currently unused
                    httpStatus:
                      $ref: '#/components/schemas/promotions-ErrorV2HttpStatus'
    promotions-promotionUuid:
      type: string
      description: Unique UUIDv4.
    promotions-promotionCode:
      type: string
      maxLength: 64
      description: Unique code
    promotions-promotionVisibility:
      type: string
      description: Profile-oriented status of the promotion.
      enum:
      - DRAFT
      - PUBLISH
      - HIDDEN
      default: DRAFT
    promotions-promotionType:
      type: string
      description: Promotion type
      enum:
      - MEMBERS_ONLY
      - HANDBILL
      - CUSTOM
      - GENERAL
      default: GENERAL
    promotions-promotionRedeemLimitPerClient:
      type: integer
      description: Limit how many times a Profile can redeem this promotion.
      default: 0
      minimum: 0
      maximum: 32767
      nullable: true
    promotions-promotionRedeemQuantity:
      type: integer
      nullable: true
      description: How many times per activation a multibuy promotion can be redeemed
      minimum: 0
      maximum: 8388607
    promotions-promotionRedeemLimitGlobal:
      type: integer
      deprecated: true
      format: int32
      description: Limit the total of redemptions by all Profiles
      default: 0
      minimum: 0
      maximum: 2147483647
      nullable: true
    promotions-activationLimitGlobalType:
      type: string
      nullable: true
      default: LIFETIME
      description: |-
        Promotion activation limit type
        * `LIFETIME` – No additional configuration required. The limit applies to the entire lifespan of the promotion. * `RELATIVE` – Requires specifying a relative time window (number of minutes from the current time).
      enum:
      - RELATIVE
      - LIFETIME
    promotions-activationLimitGlobalLimit:
      type: integer
      format: int32
      description: Limit the total of activations by all Profiles within given time unit.
      minimum: 1
      maximum: 2147483647
      nullable: true
    promotions-activationLimitGlobalCounter:
      type: integer
      format: int32
      description: Counter of the total of activations by all Profiles within given time unit.
      nullable: true
    promotions-activationLimitGlobalRelativeMinutes:
      type: integer
      format: int32
      nullable: true
      default: null
      minimum: 1
      maximum: 527040
      description: Used only when `type` is `RELATIVE`. Defines how many minutes back from the current time the limit applies.
    promotions-activationLimitGlobalReached:
      type: boolean
      nullable: true
      default: null
      description: Indicator to inform that limit is reached.
    promotions-promotionRedeemType:
      type: string
      description: Promotion redemption type
      enum:
      - FULL
      - PARTIAL
    promotions-promotionAutoRedeem:
      type: boolean
      nullable: true
      description: If true, the promotion is automatically redeemed on activation.
    promotions-promotionCatalogItemsDetails:
      type: object
      description: Catalog items definition details
      required:
      - catalog
      - catalogItemType
      nullable: true
      properties:
        catalog:
          $ref: '#/components/schemas/promotions-promotionCatalog'
        catalogItemType:
          $ref: '#/components/schemas/promotions-promotionCatalogItemType'
        catalogIndexItems:
          $ref: '#/components/schemas/promotions-promotionCatalogIndexItems'
        catalogFilterIds:
          $ref: '#/components/schemas/promotions-promotionCatalogFilterIds'
        catalogFilterQuery:
          $ref: '#/components/schemas/promotions-promotionCatalogQuery'
    promotions-promotionDetails:
      type: object
      description: Promotion details
      nullable: true
      properties:
        discountType:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetails'
        cashbackSettings:
          $ref: '#/components/schemas/promotions-cashbackSettings'
    promotions-promotionDiscountTypeDetailsOuterScope:
      type: boolean
      description: |
        This defines whether a defined promotion trigger for discount is based on different item scope.
        When set to
          * `false` it means items are from the same scope,
          * `true` it means items are from outer scope and `requiredItems` should be defined.
      default: false
      example: true
    promotions-promotionDiscountTypeDetailsName:
      type: string
      enum:
      - BOGO
      default: BOGO
    promotions-promotionDiscountTypeDetailsRequiredItemsCount:
      description: Number of items that should be purchased to meet the promotion condition.
      type: integer
      format: int32
      example: 2
    promotions-promotionDiscountTypeDetailsDiscountedItemsCount:
      description: Number of items to apply the discount to.
      type: integer
      format: int32
      example: 1
    promotions-promotionDiscountTypeDetails:
      type: object
      description: Details that apply for specific discount type.
      required:
      - name
      - outerScope
      - requiredItemsCount
      - discountedItemsCount
      properties:
        name:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetailsName'
        outerScope:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetailsOuterScope'
        requiredItemsCount:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetailsRequiredItemsCount'
        requiredItems:
          $ref: '#/components/schemas/promotions-promotionCatalogItemsDetails'
        discountedItemsCount:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetailsDiscountedItemsCount'
    promotions-promotionDiscountTypeDetailsShort:
      type: object
      description: Details that apply for specific discount type
      required:
      - name
      - outerScope
      - requiredItemsCount
      - discountedItemsCount
      properties:
        name:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetailsName'
        outerScope:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetailsOuterScope'
        requiredItemsCount:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetailsRequiredItemsCount'
        discountedItemsCount:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetailsDiscountedItemsCount'
    promotions-promotionDetailsShort:
      type: object
      description: Promotion details
      required:
      - discountType
      nullable: true
      properties:
        discountType:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetailsShort'
    promotions-promotionDiscountType:
      type: string
      description: The type of discount
      enum:
      - PERCENT
      - POINTS
      - AMOUNT
      - NONE
      - MULTIBUY
      - 2_FOR_1
      - EXACT_PRICE
      - DIGITAL_CASHBACK
      default: NONE
    promotions-promotionDiscountValue:
      type: number
      description: How much discount to apply
      default: 0
      minimum: 0
      maximum: 100
    promotions-promotionDiscountMode:
      type: string
      description: Promotion discount mode
      enum:
      - STATIC
      - STEP
      default: STATIC
    promotions-promotionDiscountModeDetails:
      type: object
      properties:
        steps:
          type: array
          nullable: false
          minItems: 1
          maxItems: 5
          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": "STEP"`.'
    promotions-promotionPreDiscountValue:
      type: number
      minimum: 0
      nullable: true
      default: 0
      description: In single-item promotions, this is the price of the item before the discount. This is in regular units of currency. For example, if the currency is USD and `preDiscountValue` is set to 1.2, the price before discount is 1 dollar and 20 cents.
    promotions-promotionRequirePoints:
      type: number
      nullable: true
      format: int32
      description: How many loyalty points are needed to activate the promotion
    promotions-promotionHeaderName:
      type: string
      maxLength: 255
      description: Name displayed in Synerise Web UI
    promotions-promotionHeaderDescription:
      type: string
      maxLength: 255
      description: Description displayed in Synerise Web UI
      nullable: true
    promotions-promotionName:
      type: string
      maxLength: 255
      description: Promotion name displayed to viewers
    promotions-promotionHeadline:
      type: string
      nullable: true
      description: Promotion headline displayed to viewers
    promotions-promotionDescription:
      type: string
      maxLength: 2048
      nullable: true
      description: Details of the promotion displayed to viewers
    promotions-promotionImages:
      type: array
      nullable: true
      items:
        required:
        - url
        - type
        type: object
        properties:
          url:
            description: Image or thumbnail source. Must be an absolute HTTP/HTTPS URL.
            type: string
            format: uri
            example: https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png
          type:
            type: string
            enum:
            - image
            - thumbnail
      description: Images and thumbnails for the promotion
    promotions-promotionTags:
      description: |
        An array of tags.

        **IMPORTANT:** To be able to use a tag for promotions, you must first assign the tag to a directory with `"type":"promotion"`. If the directory type does not exist, create it using [this endpoint](https://developers.synerise.com/AssetManagement/AssetManagement.html#operation/createDirectoryType). Then create a directory of that type and assign tags to it.
      type: array
      items:
        type: object
        properties:
          hash:
            type: string
            description: Hash ID of the tag
            example: 6f54671d-157f-4c4e-a577-11fac3111293
      nullable: true
    promotions-promotionStartAt:
      type: string
      nullable: true
      format: date-time
      description: Time when the promotion becomes available. Defaults to current time.
    promotions-promotionExpireAt:
      type: string
      nullable: true
      format: date-time
      description: Time when the promotion ends for all profiles. Defaults to current time. Has to be greater than startAt
    promotions-promotionDisplayFrom:
      type: string
      nullable: true
      description: Time when the promotion becomes displayable. Defaults to null.
    promotions-promotionDisplayTo:
      type: string
      nullable: true
      description: Time when the promotion stops being displayed for users. Defaults to null. Has to be greater than displayFrom.
    promotions-promotionLastingTime:
      type: integer
      format: int32
      nullable: true
      description: Duration of the promotion in seconds. This countdown starts when the profile activates a promotion and is individual for each profile.
      default: 0
    promotions-promotionParams:
      type: object
      description: A JSON object with any custom parameters of type string, object, array.
      nullable: true
      additionalProperties: true
    promotions-promotionItemScope:
      type: string
      description: |-
        The scope of of the promotion.
        * LINE_ITEM is a promotion used for certain items in the basket
        * BASKET is a promotion that applies to the entire basket
      enum:
      - LINE_ITEM
      - BASKET
      default: LINE_ITEM
    promotions-promotionMinBasket:
      type: number
      nullable: true
      default: null
      minimum: 0
      description: "Minimal basket value required to trigger the application of the promotion. This is the basket value after calculating other promotions that apply to the items in the basket. \n\n`minBasketValue` must be lower than `maxBasketValue`.\n"
    promotions-promotionMaxBasket:
      type: number
      nullable: true
      default: null
      minimum: 0
      description: |2

        The maximum basket value to apply the promotion to. Any amount above the maximum is not discounted. This is the basket value after calculating other promotions that apply to the items in the basket.

        `maxBasketValue` must be greater than `minBasketValue`

        **Example:**<br/>
        The maximum basket value is set to 500 USD. The discount is 10%. A basket's total is 700 USD. The discount is 50 USD.
    promotions-voucherCode:
      type: string
      description: Voucher code
      example: 6f54671d-157f-4c4e-a577-11fac3111293
    promotions-voucherStatus:
      type: string
      description: Status of the voucher
      example: ASSIGNED
      enum:
      - ASSIGNED
      - REDEEMED
      - CANCELED
    promotions-voucherAutoGenerated:
      type: boolean
      example: false
      description: '`true` if the voucher was generated by an algorithm'
    promotions-voucherLastingAt:
      type: string
      nullable: true
      example: '2026-01-01'
      format: date-time
      description: Time when the voucher expires.
    promotions-voucherRedeemedAt:
      type: string
      nullable: true
      example: null
      format: date-time
      description: Time when the voucher was redeemed.
    promotions-voucherAssignedAt:
      type: string
      nullable: true
      example: '2025-01-01'
      format: date-time
      description: Time when the voucher was assigned.
    promotions-Voucher:
      type: object
      required:
      - code
      - status
      - autoGenerated
      - lastingAt
      - redeemedAt
      - assignedAt
      properties:
        code:
          $ref: '#/components/schemas/promotions-voucherCode'
        status:
          $ref: '#/components/schemas/promotions-voucherStatus'
        autoGenerated:
          $ref: '#/components/schemas/promotions-voucherAutoGenerated'
        lastingAt:
          $ref: '#/components/schemas/promotions-voucherLastingAt'
        redeemedAt:
          $ref: '#/components/schemas/promotions-voucherRedeemedAt'
        assignedAt:
          $ref: '#/components/schemas/promotions-voucherAssignedAt'
    promotions-VoucherList:
      type: array
      description: Vouchers redeemed succesfully
      items:
        $ref: '#/components/schemas/promotions-Voucher'
    promotions-promotionCatalog:
      type: string
      description: ID of the item catalog that the promotion applies to
      nullable: true
      example: '221'
    promotions-promotionCatalogItemType:
      type: string
      enum:
      - ALL
      - SELECTED
      - FILTERED
      - QUERY
      description: |2

        - 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`.

        - If set to "QUERY", define the catalog in the `catalog` field and provide an inline RSQL expression in `catalogFilterQuery`.
      default: ALL
      example: FILTERED
    promotions-promotionCatalogIndexItems:
      type: array
      items:
        type: string
      description: |2

        'An array of items from the catalog to be included in the promotion if `catalogItemType` is set to `SELECTED`.


        If `catalogItemType` is set to `ALL`, set `catalogIndexItems` to null.'
      nullable: true
      example: []
    promotions-promotionCatalogFilterIds:
      type: array
      items:
        type: string
      description: |2

        '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-promotionCatalogQuery:
      type: string
      maxLength: 1024
      description: |2

        'An inline RSQL expression resolved by Catalogs into the matching catalog items if `catalogItemType` is set to `QUERY`.

        Required (and `catalog` must be defined) when `catalogItemType` is `QUERY`; otherwise set to null.'
      nullable: true
      example: color==green;price=lt=100
    promotions-promotionExcludeCatalog:
      type: string
      description: ID of the item catalog that the promotion should exclude
      nullable: true
      example:
      - '311'
    promotions-promotionExcludeCatalogItemType:
      type: string
      enum:
      - ALL
      - SELECTED
      - FILTERED
      - QUERY
      description: |2

        - 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`.

        - If set to "QUERY", define the catalog in the `excludeCatalog` field and provide an inline RSQL expression in `excludeCatalogFilterQuery`.
      default: ALL
      example: SELECTED
    promotions-promotionExcludeCatalogIndexItems:
      type: array
      items:
        type: string
      description: |2

        'An array of items from the catalog to be excluded in the promotion if `excludeCatalogItemType` is set to `SELECTED`.


        If `excludeCatalogItemType` is set to `ALL`, set `excludeCatalogIndexItems` to null.'
      nullable: true
      example:
      - '29727276'
    promotions-promotionExcludeCatalogFilterIds:
      type: array
      items:
        type: string
      description: |2

        '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-promotionExcludeCatalogQuery:
      type: string
      maxLength: 1024
      description: |2

        'An inline RSQL expression resolved by Catalogs into the catalog items to exclude if `excludeCatalogItemType` is set to `QUERY`.

        Required (and `excludeCatalog` must be defined) when `excludeCatalogItemType` is `QUERY`; otherwise set to null.'
      nullable: true
      example: brand==acme
    promotions-promotionStoreCatalog:
      type: string
      description: ID of the store catalog that the promotion applies to
      nullable: true
      minLength: 1
      maxLength: 255
    promotions-promotionStoreItemType:
      type: string
      enum:
      - ALL
      - SELECTED
      description: Defines if the promotion is available for the entire store catalog or only certain stores (listed in `storeIds`).
      default: ALL
    promotions-promotionStoreIds:
      type: array
      items:
        type: string
      description: An array of stores from the store catalog where the promotion is available if `storeItemType` is set to `SELECTED`
      nullable: true
    promotions-promotionTargetType:
      type: string
      description: If this field is set to "SEGMENT", you must provide a list of segments in `targetSegment`.
      default: ALL
      enum:
      - ALL
      - SEGMENT
    promotions-promotionTargetSegment:
      type: array
      nullable: true
      description: This field applies only when `targetType` is set to "SEGMENT".
      items:
        type: string
        description: ID of the segmentation of profiles that can redeem this promotion
    promotions-promotionPrice:
      description: In single-item promotions, this is the price of the item in the smallest unit of currency. For example, if the currency is USD and `price` is 120, the price is 1 dollar and 20 cents.
      type: integer
      default: 0
      minimum: 0
      maximum: 2147483647
    promotions-promotionPriority:
      description: Defines the promotion's priority, used both for display order and to order candidate promotions when they are selected during handbill and checkout assignment. Values are ordered ascending, so a lower number means a higher priority and `1` is the highest. When the per-slot read limit or the AI request cap truncates the candidate list, the higher-priority (lower-numbered) promotions are the ones kept. Promotions that share the same priority have no further guaranteed ordering between them, so when a truncation boundary falls inside a group of equal priority it is not defined which of them are kept — assign distinct priorities to the promotions that must always win.
      type: integer
      minimum: 1
      maximum: 500
      default: 250
    promotions-promotionMetric:
      nullable: true
      type: string
      maxLength: 64
      description: Currently unused
    promotions-assignmentStatus:
      type: string
      description: Profile-oriented status of the promotion.
      enum:
      - ASSIGNED
      - ACTIVE
      - REDEEMED
    promotions-assignmentCurrentRedeemedQuantity:
      type: integer
      description: Current redeem quantity for the Profile.
    promotions-assignmentCurrentRedeemedLimit:
      type: integer
      description: Current redeem limit for the Profile.
    promotions-assignmentActivationCounter:
      type: integer
      description: Number of promotion activation
    promotions-assignmentPossibleRedeems:
      type: integer
      description: Number of available redeems left
    promotions-assignmentAssignedAt:
      type: string
      nullable: true
      format: date-time
      description: Time when promotion becomes active for the Profile.
    promotions-assignmentLastingAt:
      type: string
      nullable: true
      format: date-time
      description: Time when promotion becomes expire for the Profile.
    promotions-promotionDataDelete:
      type: object
      required:
      - value
      properties:
        value:
          type: string
          description: Code of the promotion to delete
    promotions-promotionDataCreateOrUpdate:
      type: object
      properties:
        uuid:
          $ref: '#/components/schemas/promotions-promotionUuid'
        code:
          $ref: '#/components/schemas/promotions-promotionCode'
        visibilityStatus:
          $ref: '#/components/schemas/promotions-promotionVisibility'
        type:
          $ref: '#/components/schemas/promotions-promotionType'
        redeemLimitPerClient:
          $ref: '#/components/schemas/promotions-promotionRedeemLimitPerClient'
        redeemQuantityPerActivation:
          $ref: '#/components/schemas/promotions-promotionRedeemQuantity'
        redeemLimitGlobal:
          $ref: '#/components/schemas/promotions-promotionRedeemLimitGlobal'
        redeemType:
          $ref: '#/components/schemas/promotions-promotionRedeemType'
        discountType:
          $ref: '#/components/schemas/promotions-promotionDiscountType'
        details:
          $ref: '#/components/schemas/promotions-promotionDetails'
        discountValue:
          $ref: '#/components/schemas/promotions-promotionDiscountValue'
        discountMode:
          $ref: '#/components/schemas/promotions-promotionDiscountMode'
        discountModeDetails:
          $ref: '#/components/schemas/promotions-promotionDiscountModeDetails'
        preDiscountValue:
          $ref: '#/components/schemas/promotions-promotionPreDiscountValue'
        requireRedeemedPoints:
          $ref: '#/components/schemas/promotions-promotionRequirePoints'
        headerName:
          $ref: '#/components/schemas/promotions-promotionHeaderName'
        headerDescription:
          $ref: '#/components/schemas/promotions-promotionHeaderDescription'
        name:
          $ref: '#/components/schemas/promotions-promotionName'
        headline:
          $ref: '#/components/schemas/promotions-promotionHeadline'
        description:
          $ref: '#/components/schemas/promotions-promotionDescription'
        images:
          $ref: '#/components/schemas/promotions-promotionImages'
        tags:
          $ref: '#/components/schemas/promotions-promotionTags'
        startAt:
          $ref: '#/components/schemas/promotions-promotionStartAt'
        expireAt:
          $ref: '#/components/schemas/promotions-promotionExpireAt'
        displayFrom:
          $ref: '#/components/schemas/promotions-promotionDisplayFrom'
        displayTo:
          $ref: '#/components/schemas/promotions-promotionDisplayTo'
        lastingTime:
          $ref: '#/components/schemas/promotions-promotionLastingTime'
        params:
          $ref: '#/components/schemas/promotions-promotionParams'
        itemScope:
          $ref: '#/components/schemas/promotions-promotionItemScope'
        minBasketValue:
          $ref: '#/components/schemas/promotions-promotionMinBasket'
        maxBasketValue:
          $ref: '#/components/schemas/promotions-promotionMaxBasket'
        catalog:
          $ref: '#/components/schemas/promotions-promotionCatalog'
        catalogItemType:
          $ref: '#/components/schemas/promotions-promotionCatalogItemType'
        catalogIndexItems:
          $ref: '#/components/schemas/promotions-promotionCatalogIndexItems'
        catalogFilterIds:
          $ref: '#/components/schemas/promotions-promotionCatalogFilterIds'
        catalogFilterQuery:
          $ref: '#/components/schemas/promotions-promotionCatalogQuery'
        excludeCatalog:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalog'
        excludeCatalogItemType:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalogItemType'
        excludeCatalogIndexItems:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalogIndexItems'
        excludeCatalogFilterIds:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalogFilterIds'
        excludeCatalogFilterQuery:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalogQuery'
        storeCatalog:
          $ref: '#/components/schemas/promotions-promotionStoreCatalog'
        storeItemType:
          $ref: '#/components/schemas/promotions-promotionStoreItemType'
        storeIds:
          $ref: '#/components/schemas/promotions-promotionStoreIds'
        targetType:
          $ref: '#/components/schemas/promotions-promotionTargetType'
        targetSegment:
          $ref: '#/components/schemas/promotions-promotionTargetSegment'
        price:
          $ref: '#/components/schemas/promotions-promotionPrice'
        priority:
          $ref: '#/components/schemas/promotions-promotionPriority'
        voucherPool:
          $ref: '#/components/schemas/promotions-VoucherPool'
        importHash:
          $ref: '#/components/schemas/promotions-promotionImportHash'
    promotions-promotionImportHeadline:
      type: string
      nullable: true
      maxLength: 255
      description: Promotion headline displayed to viewers (import limit — 255 chars).
    promotions-promotionImportCatalog:
      type: string
      nullable: true
      maxLength: 255
      description: ID of the item catalog targeted by the promotion (import limit — 255 chars). Required when `catalogItemType` is `SELECTED` or `FILTERED`.
    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-promotionImportStoreCatalog:
      type: string
      nullable: true
      minLength: 1
      maxLength: 255
      description: ID of the store catalog that the promotion applies to (import limit — 255 chars).
    promotions-promotionImportCatalogIndexItems:
      type: array
      items:
        type: string
      nullable: true
      maxItems: 50
      description: Catalog items included in the promotion (import limit — 50 entries). Requires `catalog` to be defined.
    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-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-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-promotionImportDiscountModeDetails:
      type: object
      nullable: true
      description: Step discount configuration (import limit — up to 5 steps).
      required:
      - discountUsageTrigger
      properties:
        steps:
          type: array
          minItems: 1
          maxItems: 5
          items:
            required:
            - discountValue
            - usageThreshold
            type: object
            properties:
              discountValue:
                type: number
                description: Discount value in given step.
              usageThreshold:
                type: number
                description: Threshold after current step would apply.
        discountUsageTrigger:
          type: string
          enum:
          - TRANSACTION
          - REDEEM
          description: Describe after what action new steps would be applied.
    promotions-promotionImportTags:
      description: |
        An array of tags (import limit — 20 entries).

        **IMPORTANT:** To be able to use a tag for promotions, you must first assign the tag to a directory with `"type":"promotion"`. If the directory type does not exist, create it using [this endpoint](https://developers.synerise.com/AssetManagement/AssetManagement.html#operation/createDirectoryType). Then create a directory of that type and assign tags to it.
      type: array
      maxItems: 20
      items:
        type: object
        properties:
          hash:
            type: string
            description: Hash ID of the tag
            example: 6f54671d-157f-4c4e-a577-11fac3111293
      nullable: true
    promotions-promotionImportStoreIds:
      type: array
      maxItems: 500
      items:
        type: string
      description: An array of stores from the store catalog where the promotion is available if `storeItemType` is set to `SELECTED` (import limit — 500 entries).
      nullable: true
    promotions-promotionImportTargetSegment:
      type: array
      maxItems: 10
      nullable: true
      description: This field applies only when `targetType` is set to "SEGMENT" (import limit — 10 entries).
      items:
        type: string
        description: ID of the segmentation of profiles that can redeem this promotion
    promotions-promotionImportImages:
      type: array
      maxItems: 8
      nullable: true
      items:
        required:
        - url
        - type
        type: object
        properties:
          url:
            description: Image or thumbnail source
            type: string
            example: https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png
          type:
            type: string
            enum:
            - image
            - thumbnail
      description: Images and thumbnails for the promotion (import limit — 8 entries).
    promotions-promotionImportParams:
      type: object
      description: |
        A JSON object with any custom parameters of type string, object, array.

        Import limit — serialized JSON must not exceed 128 KB (131072 bytes).
      nullable: true
      additionalProperties: true
    promotions-promotionImportDetails:
      type: object
      description: |
        Promotion details.

        Import limit — serialized JSON must not exceed 128 KB (131072 bytes).
      nullable: true
      properties:
        discountType:
          $ref: '#/components/schemas/promotions-promotionDiscountTypeDetails'
        cashbackSettings:
          $ref: '#/components/schemas/promotions-cashbackSettings'
    promotions-promotionImportData:
      type: object
      description: |
        Promotion payload accepted by the batch import endpoint. Applies SPD-2026-03 limits.

        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'
        catalogFilterQuery:
          $ref: '#/components/schemas/promotions-promotionCatalogQuery'
        excludeCatalog:
          $ref: '#/components/schemas/promotions-promotionImportExcludeCatalog'
        excludeCatalogItemType:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalogItemType'
        excludeCatalogIndexItems:
          $ref: '#/components/schemas/promotions-promotionImportExcludeCatalogIndexItems'
        excludeCatalogFilterIds:
          $ref: '#/components/schemas/promotions-promotionImportExcludeCatalogFilterIds'
        excludeCatalogFilterQuery:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalogQuery'
        storeCatalog:
          $ref: '#/components/schemas/promotions-promotionImportStoreCatalog'
        storeItemType:
          $ref: '#/components/schemas/promotions-promotionStoreItemType'
        storeIds:
          $ref: '#/components/schemas/promotions-promotionImportStoreIds'
        targetType:
          $ref: '#/components/schemas/promotions-promotionTargetType'
        targetSegment:
          $ref: '#/components/schemas/promotions-promotionImportTargetSegment'
        price:
          $ref: '#/components/schemas/promotions-promotionPrice'
        priority:
          $ref: '#/components/schemas/promotions-promotionPriority'
        voucherPool:
          $ref: '#/components/schemas/promotions-VoucherPool'
    promotions-promotionDataCreate:
      type: object
      description: Details of a promotion
      properties:
        visibilityStatus:
          $ref: '#/components/schemas/promotions-promotionVisibility'
        type:
          $ref: '#/components/schemas/promotions-promotionType'
        redeemLimitPerClient:
          $ref: '#/components/schemas/promotions-promotionRedeemLimitPerClient'
        redeemQuantityPerActivation:
          $ref: '#/components/schemas/promotions-promotionRedeemQuantity'
        redeemLimitGlobal:
          $ref: '#/components/schemas/promotions-promotionRedeemLimitGlobal'
        redeemType:
          $ref: '#/components/schemas/promotions-promotionRedeemType'
        details:
          $ref: '#/components/schemas/promotions-promotionDetails'
        discountType:
          $ref: '#/components/schemas/promotions-promotionDiscountType'
        discountValue:
          $ref: '#/components/schemas/promotions-promotionDiscountValue'
        discountMode:
          $ref: '#/components/schemas/promotions-promotionDiscountMode'
        discountModeDetails:
          $ref: '#/components/schemas/promotions-promotionDiscountModeDetails'
        preDiscountValue:
          $ref: '#/components/schemas/promotions-promotionPreDiscountValue'
        requireRedeemedPoints:
          $ref: '#/components/schemas/promotions-promotionRequirePoints'
        headerName:
          $ref: '#/components/schemas/promotions-promotionHeaderName'
        headerDescription:
          $ref: '#/components/schemas/promotions-promotionHeaderDescription'
        name:
          $ref: '#/components/schemas/promotions-promotionName'
        headline:
          $ref: '#/components/schemas/promotions-promotionHeadline'
        description:
          $ref: '#/components/schemas/promotions-promotionDescription'
        images:
          $ref: '#/components/schemas/promotions-promotionImages'
        tags:
          $ref: '#/components/schemas/promotions-promotionTags'
        startAt:
          $ref: '#/components/schemas/promotions-promotionStartAt'
        expireAt:
          $ref: '#/components/schemas/promotions-promotionExpireAt'
        displayFrom:
          $ref: '#/components/schemas/promotions-promotionDisplayFrom'
        displayTo:
          $ref: '#/components/schemas/promotions-promotionDisplayTo'
        lastingTime:
          $ref: '#/components/schemas/promotions-promotionLastingTime'
        params:
          $ref: '#/components/schemas/promotions-promotionParams'
        itemScope:
          $ref: '#/components/schemas/promotions-promotionItemScope'
        minBasketValue:
          $ref: '#/components/schemas/promotions-promotionMinBasket'
        maxBasketValue:
          $ref: '#/components/schemas/promotions-promotionMaxBasket'
        catalog:
          $ref: '#/components/schemas/promotions-promotionCatalog'
        catalogItemType:
          $ref: '#/components/schemas/promotions-promotionCatalogItemType'
        catalogIndexItems:
          $ref: '#/components/schemas/promotions-promotionCatalogIndexItems'
        catalogFilterIds:
          $ref: '#/components/schemas/promotions-promotionCatalogFilterIds'
        catalogFilterQuery:
          $ref: '#/components/schemas/promotions-promotionCatalogQuery'
        excludeCatalog:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalog'
        excludeCatalogItemType:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalogItemType'
        excludeCatalogIndexItems:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalogIndexItems'
        excludeCatalogFilterIds:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalogFilterIds'
        excludeCatalogFilterQuery:
          $ref: '#/components/schemas/promotions-promotionExcludeCatalogQuery'
        activationLimitGlobalType:
          $ref: '#/components/schemas/promotions-activationLimitGlobalType'
        activationLimitGlobalLimit:
          $ref: '#/components/schemas/promotions-activationLimitGlobalLimit'
        activationLimitGlobalRelativeMinutes:
          $ref: '#/components/schemas/promotions-activationLimitGlobalRelativeMinutes'
        storeCatalog:
          $ref: '#/components/schemas/promotions-promotionStoreCatalog'
        storeItemType:
          $ref: '#/components/schemas/promotions-promotionStoreItemType'
        storeIds:
          $ref: '#/components/schemas/promotions-promotionStoreIds'
        targetType:
          $ref: '#/components/schemas/promotions-promotionTargetType'
        targetSegment:
          $ref: '#/components/schemas/promotions-promotionTargetSegment'
        price:
          $ref: '#/components/schemas/promotions-promotionPrice'
        priority:
          $ref: '#/components/schemas/promotions-promotionPriority'
        voucherPool:
          $ref: '#/components/schemas/promotions-VoucherPool'
        importHash:
          $ref: '#/components/schemas/promotions-promotionImportHash'
    promotions-promotionDataResponse:
      type: object
      description: Details of the promotion
      properties:
        uuid:
          $ref: '#/components/schemas/promotions-promotionUuid'
        code:
          $ref: '#/components/schemas/promotions-promotionCode'
        status:
          $ref: '#/components/schemas/promotions-promotionVisibility'
        type:
          $ref: '#/components/schemas/promotions-promotionType'
        redeemLimitPerClient:
          $ref: '#/components/schemas/promotions-promotionRedeemLimitPerClient'
        redeemQuantityPerActivation:
          $ref: '#/components/schemas/promotions-promotionRedeemQuantity'
        redeemLimitGlobal:
          $ref: '#/components/schemas/promotions-promotionRedeemLimitGlobal'
        activationLimitGlobalType:
          $ref: '#/components/schemas/promotions-activationLimitGlobalType'
        activationLimitGlobalLimit:
          $ref: '#/components/schemas/promotions-activationLimitGlobalLimit'
        activationLimitGlobalCounter:
          $ref: '#/components/schemas/promotions-activationLimitGlobalCounter'
        activationLimitGlobalRelativeMinutes:
          $ref: '#/components/schemas/promotions-activationLimitGlobalRelativeMinutes'
        activationLimitGlobalReached:
          $ref: '#/components/schemas/promotions-activationLimitGlobalReached'
        redeemType:
          $ref: '#/components/schemas/promotions-promotionRedeemType'
        discountType:
          $ref: '#/components/schemas/promotions-promotionDiscountType'
        details:
          $ref: '#/components/schemas/promotions-promotionDetails'
        discountValue:
          $ref: '#/components/schemas/promotions-promotionDiscountValue'
        discountMode:
          $ref: '#/components/schemas/promotions-promotionDiscountMode'
        discountModeDetails:
          $ref: '#/components/schemas/promotions-promotionDiscountModeDetails'
        preDiscountValue:
          $ref: '#/components/schemas/promotions-promotionPreDiscountValue'
        requireRedeemedPoints:
          $ref: '#/components/schemas/promotions-promotionRequirePoints'
        headerName:
          $ref: '#/components/schemas/promotions-promotionHeaderName'
        headerDescription:
          $ref: '#/components/schemas/promotions-promotionHeaderDescription'
        name:
          $ref: '#/components/schemas/promotions-promotionName'
        headline:
          $ref: '#/components/schemas/promotions-promotionHeadline'
        description:
          $ref: '#/components/schemas/promotions-promotionDescription'
        images:
          $ref: '#/components/schemas/promotions-promotionImages'
        tags:
          $ref: '#/components/schemas/promotions-promotionTags'
        createdAt:
          $ref: '#/components/schemas/promotions-objectCreatedAt'
        startAt:
          $ref: '#/components/schemas/promotions-promotionStartAt'
        expireAt:
          $ref: '#/components/schemas/promotions-promotionExpireAt'
        displayFrom:
          $ref: '#/components/schemas/promotions-promotionDisplayFrom'
        displayTo:
          $ref: '#/components/schemas/promotions-promotionDisplayTo'
        lastingTime:
          $ref: '#/components/schemas/promotions-promotionLastingTime'
        params:
          $ref: '#/components/schemas/promotions-promotionParams'
        itemScope:
          $ref: '#/components/schemas/promotions-promotionItemScope'
        minBasketValue:
          $ref: '#/components/schemas/promotions-promotionMinBasket'
        maxBasketValue:
          $ref: '#/components/schemas/promotions-promotionMaxBasket'
        catalog:
          $ref: '#/components/schemas/promotions-promotionCatalog'
        catalogItemType:
          $ref: '#/components/schemas/promotions-promotionCatalogItemType'
        catalogIndexItems:
          $ref: '#/components/schemas/promotions-promotionCatalogIndexItems'
        catalogFilterIds:
          $ref: '#/components/schemas/promotions-promotionCatalogFilterIds'
        catalogFilterQuery:
          $ref: '#/components/schemas/promotions-promotionCatalogQuery'
        storeCatalog:
          $ref: '#/components/schemas/promotions-promotionStoreCatalog'
        storeItemType:
          $ref: '#/components/schemas/promotions-promotionStoreItemType'
        storeIds:
          $ref: '#/components/schemas/promotions-promotionStoreIds'
        targetType:
          $ref: '#/components/schemas/promotions-promotionTargetType'
        targetSegment:
          $ref: '#/components/schemas/promotions-promotionTargetSegment'
        price:
          $ref: '#/components/schemas/promotions-promotionPrice'
        priority:
          $ref: '#/components/schemas/promotions-promotionPriority'
        metric:
          $ref: '#/components/schemas/promotions-promotionMetric'
        importHash:
          $ref: '#/components/schemas/promotions-promotionImportHash'
    promotions-promotionClientPossibleToRedeemResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/promotions-promotionCode'
        possibleRedeems:
          $ref: '#/components/schemas/promotions-assignmentPossibleRedeems'
        lastingAt:
          $ref: '#/components/schemas/promotions-assignmentLastingAt'
    promotions-promotionClientDataResponse:
      type: object
      description: Details of a promotion
      properties:
        uuid:
          $ref: '#/components/schemas/promotions-promotionUuid'
        code:
          $ref: '#/components/schemas/promotions-promotionCode'
        status:
          $ref: '#/components/schemas/promotions-assignmentStatus'
        type:
          $ref: '#/components/schemas/promotions-promotionType'
        redeemLimitPerClient:
          $ref: '#/components/schemas/promotions-promotionRedeemLimitPerClient'
        redeemQuantityPerActivation:
          $ref: '#/components/schemas/promotions-promotionRedeemQuantity'
        currentRedeemedQuantity:
          $ref: '#/components/schemas/promotions-assignmentCurrentRedeemedQuantity'
        currentRedeemedLimit:
          $ref: '#/components/schemas/promotions-assignmentCurrentRedeemedLimit'
        activationCounter:
          $ref: '#/components/schemas/promotions-assignmentActivationCounter'
        possibleRedeems:
          $ref: '#/components/schemas/promotions-assignmentPossibleRedeems'
        details:
          $ref: '#/components/schemas/promotions-promotionDetailsShort'
        discountType:
          $ref: '#/components/schemas/promotions-promotionDiscountType'
        discountValue:
          $ref: '#/components/schemas/promotions-promotionDiscountValue'
        discountMode:
          $ref: '#/components/schemas/promotions-promotionDiscountMode'
        discountModeDetails:
          $ref: '#/components/schemas/promotions-promotionDiscountModeDetails'
        requireRedeemedPoints:
          $ref: '#/components/schemas/promotions-promotionRequirePoints'
        name:
          $ref: '#/components/schemas/promotions-promotionName'
        headline:
          $ref: '#/components/schemas/promotions-promotionHeadline'
        description:
          $ref: '#/components/schemas/promotions-promotionDescription'
        images:
          $ref: '#/components/schemas/promotions-promotionImages'
        tags:
          $ref: '#/components/schemas/promotions-promotionTags'
        startAt:
          $ref: '#/components/schemas/promotions-promotionStartAt'
        expireAt:
          $ref: '#/components/schemas/promotions-promotionExpireAt'
        displayFrom:
          $ref: '#/components/schemas/promotions-promotionDisplayFrom'
        displayTo:
          $ref: '#/components/schemas/promotions-promotionDisplayTo'
        assignedAt:
          $ref: '#/components/schemas/promotions-assignmentAssignedAt'
        lastingTime:
          $ref: '#/components/schemas/promotions-promotionLastingTime'
        lastingAt:
          $ref: '#/components/schemas/promotions-assignmentLastingAt'
        params:
          $ref: '#/components/schemas/promotions-promotionParams'
        catalogIndexItems:
          $ref: '#/components/schemas/promotions-promotionCatalogIndexItems'
        price:
          $ref: '#/components/schemas/promotions-promotionPrice'
        priority:
          $ref: '#/components/schemas/promotions-promotionPriority'
        itemScope:
          $ref: '#/components/schemas/promotions-promotionItemScope'
        minBasketValue:
          $ref: '#/components/schemas/promotions-promotionMinBasket'
        maxBasketValue:
          $ref: '#/components/schemas/promotions-promotionMaxBasket'
        vouchers:
          $ref: '#/components/schemas/promotions-VoucherList'
    promotions-saleSettings:
      type: object
      nullable: true
      description: Settings for sales
      properties:
        discountSourceType:
          $ref: '#/components/schemas/promotions-discountSourceType'
        clientIdCardType:
          $ref: '#/components/schemas/promotions-clientIdCardType'
        handbillCheckout:
          $ref: '#/components/schemas/promotions-handbillCheckout'
        priceValueBaseStrategy:
          $ref: '#/components/schemas/promotions-priceValueBaseStrategy'
        combineBasketDiscounts:
          $ref: '#/components/schemas/promotions-combineBasketDiscounts'
        discountOrder:
          $ref: '#/components/schemas/promotions-discountOrder'
        returnFields:
          $ref: '#/components/schemas/promotions-returnFields'
    promotions-lockSettings:
      type: object
      nullable: true
      description: Settings for locks
      required:
      - lockPromotionRequestByIdentifier
      properties:
        promotionRequestedLockTtl:
          $ref: '#/components/schemas/promotions-promotionRequestedLockTtl'
        processSalePromotionActivationLockWaitTime:
          $ref: '#/components/schemas/promotions-processSalePromotionActivationLockWaitTime'
        lockPromotionRequestByIdentifier:
          $ref: '#/components/schemas/promotions-lockPromotionRequestByIdentifier'
    promotions-promotionLastingOnly:
      description: When set to `true`, filters to promotions that are currently active and those that were not yet activated.
      type: boolean
      nullable: true
      default: true
    promotions-restorePointsOnProfileDeactivation:
      type: boolean
      description: When set to `true` and you use the method which [deactivates all promotions for a profile](#operation/deactivateAllPromotions), the points taken for activation of the promotion will be restored.
      nullable: true
      default: true
    promotions-allowRedeemCompletionWhenBlocked:
      type: boolean
      description: When set to `true`, the profile can complete the redemption of promotions that had been activated before a lock was put on that profile.
      nullable: true
      default: false
    promotions-promotionRequestedLockTtl:
      type: number
      description: The time in seconds for which promotion deactivation will be blocked after a POS request.
      default: 60
    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.
    promotions-lockPromotionRequestByIdentifier:
      type: boolean
      description: Indicates if POS should provide the `lockIdentifier`, which puts a lock on promotion fetching the promotion list. This identifier can be sent when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.
      nullable: false
    promotions-promotionPresentOnly:
      description: When set to `false`, expired promotions are included in the response.
      type: boolean
      nullable: true
      default: true
    promotions-promotionDisplayableOnly:
      description: When set to `true`, filters to promotions that are currently configured to be displayed (by `displayFrom` and `displayTo` dates).
      type: boolean
      nullable: true
      default: true
    promotions-promotionCheckExistsInTarget:
      nullable: true
      type: boolean
      default: true
      description: When set to `true`, the profile must exist within the target segmentation.
    promotions-promotionStatusArray:
      type: array
      description: Promotion filter by assignment status
      nullable: true
      items:
        $ref: '#/components/schemas/promotions-assignmentStatus'
    promotions-promotionTargetArray:
      type: array
      description: Promotion filter by target type
      nullable: true
      items:
        $ref: '#/components/schemas/promotions-promotionTargetType'
    promotions-promotionTagArray:
      type: array
      description: Promotion filter by promotion tags
      nullable: true
      items:
        type: string
    promotions-promotionListWhere:
      type: object
      description: Promotion filter
      properties:
        excludeIds:
          type: array
          description: IDs of promotions to exclude from the list
          nullable: true
          items:
            type: integer
            example: 3
        handbillPromotionIds:
          type: array
          description: Handbill promotion IDs to include
          nullable: true
          items:
            type: integer
            example: 3
        visibilityStatus:
          type: array
          description: Filter by visibility status
          nullable: true
          items:
            $ref: '#/components/schemas/promotions-promotionVisibility'
        status:
          $ref: '#/components/schemas/promotions-promotionStatusArray'
        statusByType:
          type: object
          description: Filter by a combination of promotion type and status
          properties:
            GENERAL:
              $ref: '#/components/schemas/promotions-promotionStatusArray'
            CUSTOM:
              $ref: '#/components/schemas/promotions-promotionStatusArray'
            MEMBERS_ONLY:
              $ref: '#/components/schemas/promotions-promotionStatusArray'
            HANDBILL:
              $ref: '#/components/schemas/promotions-promotionStatusArray'
        target:
          $ref: '#/components/schemas/promotions-promotionTargetArray'
        targetByType:
          type: object
          description: Filter by a combination of promotion type and target
          properties:
            GENERAL:
              $ref: '#/components/schemas/promotions-promotionTargetArray'
            CUSTOM:
              $ref: '#/components/schemas/promotions-promotionTargetArray'
            MEMBERS_ONLY:
              $ref: '#/components/schemas/promotions-promotionTargetArray'
            HANDBILL:
              $ref: '#/components/schemas/promotions-promotionTargetArray'
        type:
          type: array
          description: Filter by promotion type
          nullable: true
          items:
            $ref: '#/components/schemas/promotions-promotionType'
        presentOnly:
          $ref: '#/components/schemas/promotions-promotionPresentOnly'
        lastingOnly:
          $ref: '#/components/schemas/promotions-promotionLastingOnly'
        displayableOnly:
          $ref: '#/components/schemas/promotions-promotionDisplayableOnly'
        checkExistsInTarget:
          $ref: '#/components/schemas/promotions-promotionCheckExistsInTarget'
        tagNames:
          $ref: '#/components/schemas/promotions-promotionTagArray'
    promotions-promotionListSort:
      type: object
      nullable: true
      description: Promotion sorting settings
      properties:
        forDBQuery:
          type: array
          description: Sorting options for database queries (sort all promotions matched by the filter)
          items:
            type: object
            properties:
              field:
                type: string
                description: Field name to sort by
                enum:
                - headerName
                - name
                - code
                - startAt
                - createdAt
                - updatedAt
                - expireAt
                - requireRedeemedPoints
                - type
                - priority
                - status
              direction:
                type: string
                description: Sorting direction
                enum:
                - asc
                - desc
    promotions-promotionListFields:
      type: array
      description: Fields to be returned in the promotion object
      nullable: true
      items:
        type: string
    promotions-promotionListLimit:
      type: number
      description: The number of items to return per page
    promotions-promotionListPage:
      type: number
      description: Page number to return for pagination. The first page has the index `1`.
    promotions-promotionListLimitSetValues:
      type: object
      deprecated: true
      description: Set values on promotions when returning list to profile
    promotions-promotionsListFilter:
      type: object
      properties:
        setFieldsValues:
          $ref: '#/components/schemas/promotions-promotionListLimitSetValues'
        where:
          $ref: '#/components/schemas/promotions-promotionListWhere'
        fields:
          $ref: '#/components/schemas/promotions-promotionListFields'
        sort:
          $ref: '#/components/schemas/promotions-promotionListSort'
        page:
          $ref: '#/components/schemas/promotions-promotionListPage'
        limit:
          $ref: '#/components/schemas/promotions-promotionListLimit'
    promotions-promotionListSettings:
      type: object
      nullable: true
      description: Filter for promotions in [`/promotion/get-for-client-by-custom-settings/{identifierType}/{identifierValue}`](#operation/GetClientPromotionsByACustomFilter) method
      allOf:
      - $ref: '#/components/schemas/promotions-promotionsListFilter'
    promotions-promotionAssignmentSettings:
      type: object
      nullable: true
      description: Filter for promotions in [`/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}`](#operation/getAssignHandbillForClient_GET) method
      allOf:
      - $ref: '#/components/schemas/promotions-promotionsListFilter'
    promotions-expression:
      type: string
      nullable: true
      format: uuid
      description: Expression UUID which will be used to count the balance of loyalty points in the promotion activation endpoint.
    promotions-blockTag:
      type: string
      description: Tag name which marks a profile as blocked. Blocked profiles do not receive promotions in POS methods and are not allowed to activate new promotions.
      nullable: true
      example: BLOCKED
    promotions-codePrefix:
      type: string
      description: Prefix which will be added to promotion code, when `enableCodeGeneration` is set to true
      nullable: true
      example: SYN
    promotions-enableCodeGeneration:
      type: boolean
      description: Flag which indicates if promotion code should be generated as ordinal number prefixed with prefix defined in `codePrefix`
      nullable: true
      example: true
    promotions-handbillUuidsForCheckout:
      type: array
      description: Handbill UUIDs to use for checkout couponing
      nullable: true
      items:
        type: string
        format: uuid
    promotions-codeGeneration:
      type: object
      description: Checkout code generation options
      nullable: true
      properties:
        prefix:
          type: string
          description: Prefix added to each code
        length:
          type: integer
          default: 36
          description: Length of the random code to generate
        crc:
          type: boolean
          description: When `true`, a CRC string is added to the end of the code
    promotions-checkoutSettings:
      type: object
      description: Handbill checkout settings
      nullable: true
      properties:
        handbillUuidsForCheckout:
          $ref: '#/components/schemas/promotions-handbillUuidsForCheckout'
        codeGeneration:
          $ref: '#/components/schemas/promotions-codeGeneration'
    promotions-pointsExpression:
      type: string
      format: uuid
      description: UUID of expression that defines how the points should be calculated when evaluating sender points balance
      example: 2395fc33-f2f0-420c-8e7b-0ac63c3454de
    promotions-pointsSenderSegments:
      type: array
      nullable: true
      description: IDs of the Profile segmentations that can participate in point transfers as senders
      items:
        type: string
    promotions-pointsRecipientSegments:
      type: array
      nullable: true
      description: IDs of the Profile segmentations that can participate in point transfers as recipients
      items:
        type: string
    promotions-pointsRecipient:
      type: object
      description: Point recipient settings
      properties:
        segments:
          $ref: '#/components/schemas/promotions-pointsRecipientSegments'
    promotions-pointsSender:
      type: object
      description: Point sender settings
      properties:
        segments:
          $ref: '#/components/schemas/promotions-pointsSenderSegments'
    promotions-transferSettings:
      type: array
      minItems: 1
      maxItems: 1
      description: Settings for point transfers
      items:
        type: object
        properties:
          expression:
            $ref: '#/components/schemas/promotions-pointsExpression'
          recipient:
            $ref: '#/components/schemas/promotions-pointsRecipient'
          sender:
            $ref: '#/components/schemas/promotions-pointsSender'
    promotions-cashbackSettingsLimit:
      type: object
      nullable: true
      description: Defines the limits on cashback usage
      properties:
        minPoints:
          type: integer
          nullable: true
          minimum: 1
          description: The minimum number of points required to spend for cashback. If null - there is no limit defined.
          example: 10
        maxPoints:
          type: integer
          nullable: true
          minimum: 1
          description: The maximum number of points allowed to spend for cashback. If null - there is no limit defined.
          example: 1000
        maxTransactionAmount:
          type: number
          nullable: true
          minimum: 0.01
          description: Maximum amount in local currency to redeem in a transaction. If null - there is no limit defined.
          example: 20
        maxTransactionPercentage:
          type: number
          nullable: true
          description: Defines how much (in percent) of the total transaction amount can be treated as cashback. If null - there is no limit defined.
          example: 50
          minimum: 0.01
          maximum: 100
    promotions-cashbackSettings:
      type: object
      description: Settings for cashback mechanism
      nullable: true
      required:
      - exchangeRate
      properties:
        exchangeRate:
          type: number
          minimum: 1.0E-4
          description: Defines how much currency corresponds to one point. For example, if the currency is PLN and exchangeRate is 2, then 1 point equals 2 PLN.
        limits:
          $ref: '#/components/schemas/promotions-cashbackSettingsLimit'
    promotions-promotionError:
      type: object
      description: Details of errors that occurred during promotion activation
      properties:
        key:
          type: string
          description: Type of promotion identifier
          enum:
          - uuid
          - code
        value:
          type: string
          description: Value of the selected identifier
        error:
          $ref: '#/components/schemas/promotions-PromotionActivationErrorSchema'
    promotions-discountSourceType:
      type: integer
      nullable: true
      description: The type which is assigned to discounts to differentiate which ones come from Synerise when using the Process Basket/Checkout endpoints.
      example: 0
    promotions-clientIdCardType:
      type: integer
      nullable: true
      description: The type of card which is used for extracting profile identification data
      example: 0
    promotions-handbillCheckout:
      type: string
      format: uuid
      nullable: true
      description: UUID of the Handbill which is used to generate promotions in the Process Checkout endpoints
    promotions-combineBasketDiscounts:
      type: boolean
      description: If `true`, basket discounts are combined.
      default: false
    promotions-discountOrder:
      type: object
      description: Discount order settings
      properties:
        strategy:
          $ref: '#/components/schemas/promotions-discountOrderStrategy'
        direction:
          $ref: '#/components/schemas/promotions-discountOrderDirection'
    promotions-discountOrderStrategy:
      type: string
      description: The strategy defines the order of applying discounts. The direction is set in `direction`.
      default: DISCOUNT_VALUE
      enum:
      - DISCOUNT_VALUE
      - PRIORITY
    promotions-discountOrderDirection:
      type: string
      description: Direction of the discount order within the strategy selected in `strategy`.
      default: desc
      enum:
      - asc
      - desc
    promotions-priceValueBaseStrategy:
      type: string
      default: MUTABLE
      description: |2

        This strategy defines how basket discount values are calculated in the Process Basket endpoints.

        - If the CONSTANT strategy is chosen, the discounts are always calculated based on the evidPrice of the item.
        - If the MUTABLE strategy is chosen, the price of an item is updated after each promotion assignment and it is treated as a base for calculating the discounts that follow.

        **Example:** One basket with two promotions (20%, 30%) and one item with a price of 1.00.

        - When the CONSTANT strategy is chosen, the discounts are always subtracted from evidPrice=1.00, so the effective discounts are 0.20 and 0.30. The final price is 0.50.
        - When the MUTABLE strategy is chosen, the discounts are calculated using the updated item price, so applying them in order (20%, 30%) is done in the following way:
          1. `20% of 1.00 = 0.20, *updated price* = 0.80`
          2. `30% of *updated price* = 30% * 0.80 = 0.24`
          3. The final price is `1.00 - 0.20 - 0.24 = 0.56`

          To define the order of applying promotions, use the `discountOrder` object.
      enum:
      - CONSTANT
      - MUTABLE
    promotions-returnFields:
      type: array
      items:
        type: string
      description: An array of promotion fields which should be returned in the Process Basket endpoints in the `transactionItems.grantedDiscounts` object.
    promotions-discountSource:
      type: object
      description: Source of the discount
      required:
      - type
      - id
      properties:
        type:
          type: integer
          description: |2

            By default:

            - `1` for promotions from your own database

            - `2` for promotions from your Synerise Workspace
        id:
          type: string
          description: ID of the promotion in the source domain, for example a promotion code
    promotions-HTTP200withMessage:
      type: object
      properties:
        message:
          type: string
          description: Short summary of the response
    promotions-PromotionCreateUpdateDeleteRes:
      type: object
      properties:
        message:
          type: string
          description: Short summary of the response
        data:
          $ref: '#/components/schemas/promotions-promotionDataResponse'
    promotions-Viewpromotiondetails-HTTP200:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/promotions-promotionDataResponse'
    promotions-BatchErrorItems:
      type: array
      description: A list of redemption errors
      items:
        $ref: '#/components/schemas/promotions-BatchError'
    promotions-ErrorSchema:
      type: object
      description: Error details
      properties:
        errorCode:
          allOf:
          - $ref: '#/components/schemas/promotions-ErrorV2Code'
          - example: VLD-080
        message:
          allOf:
          - $ref: '#/components/schemas/promotions-ErrorV2Message'
          - example: String fails to match the required pattern
        source:
          type: object
          description: The entity which caused a problem
          properties:
            pointer:
              type: string
              description: Pointer to the wrong element
    promotions-BatchError:
      type: object
      description: Error that occurred and data source index
      properties:
        source:
          type: object
          description: Identifier of the item which caused the error
          properties:
            index:
              type: integer
              example: 1
              description: Index of an item which failed
        errorCode:
          allOf:
          - $ref: '#/components/schemas/promotions-ErrorV2Code'
          - example: ERR-002
        message:
          allOf:
          - $ref: '#/components/schemas/promotions-ErrorV2Message'
          - example: Invalid data
        httpStatus:
          allOf:
          - $ref: '#/components/schemas/promotions-ErrorV2HttpStatus'
          - example: 404
        help:
          type: string
          nullable: true
          description: Currently unused
        details:
          type: object
          nullable: true
          description: Additional error context, for example the identifier of the entity that caused the failure
        errors:
          type: array
          description: Error details
          items:
            $ref: '#/components/schemas/promotions-ErrorSchema'
    promotions-VouchersListWithErrors:
      type: object
      description: List of errors
      properties:
        httpStatus:
          allOf:
          - $ref: '#/components/schemas/promotions-ErrorV2HttpStatus'
          - default: 207
            example: 207
        traceId:
          type: string
          description: Trace ID for troubleshooting
          example: c72d530fd1b813ae
        timestamp:
          type: string
          format: date-timed
          description: Time when the error occurred
          example: '2021-12-28T08:27:54.549Z'
        errorCode:
          allOf:
          - $ref: '#/components/schemas/promotions-ErrorV2Code'
          - default: ERR-003
        message:
          allOf:
          - $ref: '#/components/schemas/promotions-ErrorV2Message'
          - default: Batch operation failed
        errors:
          $ref: '#/components/schemas/promotions-BatchErrorItems'
        data:
          $ref: '#/components/schemas/promotions-VoucherList'
    promotions-Quantity:
      description: Quantity of redeemed items
      type: integer
      example: 2
      default: 1
    promotions-SourceId:
      description: 'The source of redemption. It should be unique to ensure that redemptions are successfully deduplicated when retried. Example: a concatenation of receipt ID and index of the discounted transaction line on the receipt.'
      type: string
      example: 3f0a1670-eb63-43f1-a6b8-895a74621964-3
    promotions-OrderId:
      description: Receipt ID for which the voucher was redeemed.
      type: string
      example: 3f0a1670-eb63-43f1-a6b8-895a74621964
    promotions-VoucherPool:
      type: object
      description: Settings for assigning codes from a voucher pool when the promotion is activated. When this is used, a promotion can only be redeemed once per activation.
      properties:
        enabled:
          type: boolean
          default: false
          description: Enables automatic assignment of codes from the pool when the promotion is activated.
        uuid:
          type: string
          format: uuid
          description: UUID of the voucher pool
        transferable:
          type: boolean
          default: false
          description: When `true`, the voucher can be redeemed by a different user than the one who activated the promotion.
    promotions-VoucherKey:
      type: string
      example: code
      description: Type of voucher identifier
      enum:
      - code
    promotions-VoucherValue:
      description: Value of the selected identifier
      type: string
      example: '434428563'
    promotions-VoucherRedeemOptions:
      type: object
      description: Additional options of the operation
      properties:
        quantity:
          $ref: '#/components/schemas/promotions-Quantity'
        sourceId:
          $ref: '#/components/schemas/promotions-SourceId'
        orderId:
          $ref: '#/components/schemas/promotions-OrderId'
    promotions-RedeemVoucherForProfile:
      type: object
      required:
      - profileKey
      - profileValue
      - voucherKey
      - voucherValue
      properties:
        profileKey:
          $ref: '#/components/schemas/promotions-clientKey'
        profileValue:
          $ref: '#/components/schemas/promotions-clientKeyValue'
        voucherKey:
          $ref: '#/components/schemas/promotions-VoucherKey'
        voucherValue:
          $ref: '#/components/schemas/promotions-VoucherValue'
        options:
          $ref: '#/components/schemas/promotions-VoucherRedeemOptions'
    promotions-RedeemVouchersForProfileRequest:
      type: array
      description: Vouchers to redeem
      minItems: 1
      maxItems: 100
      items:
        $ref: '#/components/schemas/promotions-RedeemVoucherForProfile'
    promotions-RedeemVouchersRequest:
      type: array
      description: Vouchers to redeem
      minItems: 1
      maxItems: 100
      items:
        $ref: '#/components/schemas/promotions-RedeemVoucher'
    promotions-RedeemVoucher:
      required:
      - voucherKey
      - voucherValue
      type: object
      properties:
        options:
          $ref: '#/components/schemas/promotions-VoucherRedeemOptions'
        voucherKey:
          $ref: '#/components/schemas/promotions-VoucherKey'
        voucherValue:
          $ref: '#/components/schemas/promotions-VoucherValue'
      example:
        voucherKey: code
        voucherValue: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
        options:
          quantity: 1
          sourceId: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1
          orderId: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1
          lockIdentifier: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
    promotions-RedeemPromotionsRequest:
      required:
      - code
      - clientKey
      - clientKeyValue
      type: object
      properties:
        code:
          type: string
          example: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
          description: Promotion code
        clientKey:
          $ref: '#/components/schemas/promotions-clientKey'
        clientKeyValue:
          $ref: '#/components/schemas/promotions-clientKeyValue'
        quantity:
          description: Quantity of redeemed items
          type: integer
          example: 2
          default: 1
        sourceId:
          description: 'The source of redemption. It should be unique for the source of promotion to ensure that redemptions are successfully deduplicated when retried. Example: a concatenation of receipt ID and index of the discounted transaction line on the receipt.'
          type: string
          example: 3f0a1670-eb63-43f1-a6b8-895a74621964-3
        orderId:
          description: Receipt ID for which the promotion was redeemed. It's required when using step promotions. The order ID will be used to check if requirements of granting a step promotion are fulfilled.
          type: string
          example: 3f0a1670-eb63-43f1-a6b8-895a74621964
        lockIdentifier:
          description: Identifier of the "promotion requested" lock which will be released when the promotion is redeemed. This kind of lock blocks a profile from requesting new promotions and can be applied when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.
          type: string
          example: 6561d87b-2697-46ad-8f9a-0550736b86e3
      example:
        code: 75d9090f-06ac-46a2-a0ce-4b8eb287efb9
        clientKey: clientId
        clientKeyValue: '434428563'
    promotions-promotionActivation:
      required:
      - key
      - value
      type: object
      properties:
        key:
          type: string
          description: Type of promotion identifier
          enum:
          - uuid
          - code
        value:
          type: string
          description: Value of the selected identifier
        pointsToUse:
          nullable: true
          type: integer
          minimum: 0
          description: How many points should be converted to digital money and stored as ready to redeem in transactions in digital cashback promotions.
      example:
        key: code
        value: 7893467834GG
        pointsToUse: 100
    promotions-promotionActivationProcessSale:
      required:
      - key
      - value
      - pointsToUse
      type: object
      properties:
        key:
          type: string
          description: Type of promotion identifier
          enum:
          - uuid
          - code
        value:
          type: string
          description: Value of the selected identifier
        pointsToUse:
          type: integer
          minimum: 0
          description: How many points should be converted to digital money and stored as ready to redeem in transactions in digital cashback promotions.
      example:
        key: code
        value: 7893467834GG
        pointsToUse: 100
    promotions-PromotionResponseMessage:
      type: object
      properties:
        message:
          type: string
          description: Short summary of the response
    promotions-duplicatePromotionRequest:
      type: object
      properties:
        uuid:
          type: string
          description: Promotion UUID
        code:
          type: string
          description: Promotion code
    promotions-operationId:
      type: integer
      description: Operation ID
      nullable: false
    promotions-clientDateTime:
      type: string
      format: date-time
      description: Operation's start time
    promotions-terminal:
      type: object
      description: Data about the terminal that is the transaction's source
      required:
      - storeId
      - posId
      properties:
        storeId:
          type: string
          description: ID of the store
        posId:
          type: integer
          description: ID of the point of sale (POS)
    promotions-transactionMetric:
      type: object
      description: Metadata of the transaction
      required:
      - posTransactionId
      - beginDateTime
      - globalTransactionId
      properties:
        posTransactionId:
          type: integer
          description: ID of the transaction within the POS
        beginDateTime:
          format: date-time
          description: Time when the transaction starts
        globalTransactionId:
          type: string
          description: Global transaction ID
          nullable: true
    promotions-finalValue:
      type: string
      description: The total cost of all items in the basket, after discounts, including tax
    promotions-promotionErrors:
      type: array
      description: Array of promotion errors
      items:
        $ref: '#/components/schemas/promotions-promotionError'
    promotions-grantedDiscount:
      type: object
      required:
      - source
      - priceDiscount
      properties:
        source:
          $ref: '#/components/schemas/promotions-discountSource'
        priceDiscount:
          type: string
          description: The amount subtracted from `evidPrice`
          pattern: ^\d+\.\d{1,2}$
          example: '12.45'
    promotions-transactionAdditionalItem:
      type: object
      required:
      - seqNo
      - type
      - code
      properties:
        seqNo:
          type: integer
          description: Sequential number of additional item
        type:
          type: string
          description: Type of the additional item
          enum:
          - COUPON
        code:
          type: string
          description: Code of the additional item
    promotions-transactionItemWithGrants:
      type: object
      required:
      - seqNo
      - articleRef
      - quantity
      - evidPrice
      - finalPrice
      - finalValue
      - grantedDiscounts
      properties:
        seqNo:
          $ref: '#/components/schemas/promotions-TransactionItemSeqNo'
        articleRef:
          $ref: '#/components/schemas/promotions-TransactionItemArticleRef'
        quantity:
          $ref: '#/components/schemas/promotions-TransactionItemQuantity'
        evidPrice:
          $ref: '#/components/schemas/promotions-TransactionItemEvidPrice'
        finalPrice:
          $ref: '#/components/schemas/promotions-TransactionItemFinalPrice'
        finalValue:
          $ref: '#/components/schemas/promotions-TransactionItemFinalValue'
        grantedDiscounts:
          type: array
          items:
            $ref: '#/components/schemas/promotions-grantedDiscount'
          description: Array of granted discounts
    promotions-transactionItemWithoutGrants:
      type: object
      required:
      - seqNo
      - articleRef
      - quantity
      - evidPrice
      - finalPrice
      - finalValue
      properties:
        seqNo:
          $ref: '#/components/schemas/promotions-TransactionItemSeqNo'
        articleRef:
          $ref: '#/components/schemas/promotions-TransactionItemArticleRef'
        quantity:
          $ref: '#/components/schemas/promotions-TransactionItemQuantity'
        evidPrice:
          $ref: '#/components/schemas/promotions-TransactionItemEvidPrice'
        finalPrice:
          $ref: '#/components/schemas/promotions-TransactionItemFinalPrice'
        finalValue:
          $ref: '#/components/schemas/promotions-TransactionItemFinalValue'
    promotions-TransactionItemSeqNo:
      type: integer
      description: Sequential number of transaction line item
    promotions-TransactionItemArticleRef:
      type: string
      description: Item's identifier in the product catalog
    promotions-TransactionItemQuantity:
      type: string
      description: Quantity of the product, provided to 3 decimal places
      pattern: ^\d+(\.\d{1,3})?$
      example: '3.231'
    promotions-TransactionItemEvidPrice:
      type: string
      description: Price per unit before discount, including tax
      pattern: ^\d+\.\d{1,2}$
      example: '34.23'
    promotions-TransactionItemFinalPrice:
      type: string
      description: Price per unit after discount, including tax
      pattern: ^\d+\.\d{1,2}$
      example: '30.23'
    promotions-TransactionItemFinalValue:
      type: string
      description: 'The total cost of the product: `finalValue = finalPrice * quantity`'
      pattern: ^\d+\.\d{1,2}$
      example: '123.23'
    promotions-paymentItem:
      type: object
      required:
      - seqNo
      - type
      - name
      - amount
      properties:
        seqNo:
          type: integer
          description: Sequential number of payment method
        type:
          type: integer
          description: Type of payment method (id in external dictionary)
        name:
          type: string
          description: Name of the payment method
        amount:
          type: string
          description: Amount of payment
        hashCode:
          type: string
          description: Hash code of payment method
    promotions-paymentsReport:
      type: object
      description: Payment information
      required:
      - paymentItems
      properties:
        paymentItems:
          type: array
          description: Array of payment methods information
          items:
            $ref: '#/components/schemas/promotions-paymentItem'
    promotions-printout:
      type: object
      properties:
        source:
          type: object
          properties:
            source:
              $ref: '#/components/schemas/promotions-discountSource'
            printoutType:
              type: string
              enum:
              - FREE_TEXT
              - COUPON
              description: Type of printout
            printoutId:
              type: string
              description: ID of printout in source domain
            text:
              type: string
              description: Printout information text. Default name of handbill configuration.
            variables:
              type: array
              items:
                $ref: '#/components/schemas/promotions-printoutVariable'
    promotions-printoutVariable:
      type: object
      properties:
        type:
          type: string
          enum:
          - CODE
          description: Type of variable attached to printout
        value:
          type: string
          description: Value of the variable. Eg. code of coupon.
    promotions-processSaleReq:
      type: object
      required:
      - operationId
      - clientDateTime
      - terminal
      - transactionMetric
      - finalValue
      - transactionItems
      - transactionAdditionalItems
      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
        promotionsToActivate:
          type: array
          items:
            $ref: '#/components/schemas/promotions-promotionActivationProcessSale'
          description: Array of promotions to activate during the sale process
    promotions-processCheckoutRes:
      type: object
      properties:
        responseCode:
          $ref: '#/components/schemas/promotions-responseCode'
        responseDescription:
          $ref: '#/components/schemas/promotions-responseDescription'
        operationId:
          $ref: '#/components/schemas/promotions-operationId'
        clientDateTime:
          $ref: '#/components/schemas/promotions-clientDateTime'
        terminal:
          $ref: '#/components/schemas/promotions-terminal'
        transactionGrantReport:
          type: object
          description: Report of printouts related to the transaction
          properties:
            printouts:
              type: array
              items:
                $ref: '#/components/schemas/promotions-printout'
    promotions-processCheckoutReq:
      type: object
      required:
      - operationId
      - clientDateTime
      - terminal
      - transactionMetric
      - finalValue
      - transactionItems
      - transactionAdditionalItems
      - paymentsReport
      properties:
        operationId:
          $ref: '#/components/schemas/promotions-operationId'
        clientDateTime:
          $ref: '#/components/schemas/promotions-clientDateTime'
        terminal:
          $ref: '#/components/schemas/promotions-terminal'
        transactionMetric:
          $ref: '#/components/schemas/promotions-transactionMetric'
        finalValue:
          $ref: '#/components/schemas/promotions-finalValue'
        transactionItems:
          type: array
          items:
            $ref: '#/components/schemas/promotions-transactionItemWithoutGrants'
          description: Array of transaction items
        transactionAdditionalItems:
          type: array
          items:
            $ref: '#/components/schemas/promotions-transactionAdditionalItem'
          description: Array of additional items in the transaction
        paymentsReport:
          $ref: '#/components/schemas/promotions-paymentsReport'
    promotions-processSaleRes:
      type: object
      properties:
        responseCode:
          $ref: '#/components/schemas/promotions-responseCode'
        responseDescription:
          $ref: '#/components/schemas/promotions-responseDescription'
        operationId:
          $ref: '#/components/schemas/promotions-operationId'
        clientDateTime:
          $ref: '#/components/schemas/promotions-clientDateTime'
        terminal:
          $ref: '#/components/schemas/promotions-terminal'
        transactionMetric:
          $ref: '#/components/schemas/promotions-transactionMetric'
        finalValue:
          $ref: '#/components/schemas/promotions-finalValue'
        promotionErrors:
          type: array
          items:
            $ref: '#/components/schemas/promotions-promotionErrors'
        transactionItems:
          type: array
          items:
            $ref: '#/components/schemas/promotions-transactionItemWithGrants'
          description: Array of processed transaction items
        transactionAdditionalItem:
          type: array
          items:
            $ref: '#/components/schemas/promotions-transactionAdditionalItem'
          description: Array of processed additional items, currently not used
        transactionGrantReport:
          type: array
          description: Report of printouts related to the transaction, currently not used
          items: {}
    promotions-releaseLockRes:
      type: object
      properties:
        message:
          type: string
          example: Lock release succeeded
    promotions-createLockRes:
      type: object
      properties:
        callback:
          type: string
          description: URI to call for lock release
    promotions-promotionsSettingsBody:
      type: object
      properties:
        checkoutSettings:
          $ref: '#/components/schemas/promotions-checkoutSettings'
        enableCodeGeneration:
          $ref: '#/components/schemas/promotions-enableCodeGeneration'
        codePrefix:
          $ref: '#/components/schemas/promotions-codePrefix'
        blockTag:
          $ref: '#/components/schemas/promotions-blockTag'
        expression:
          $ref: '#/components/schemas/promotions-expression'
        promotionListSettings:
          $ref: '#/components/schemas/promotions-promotionListSettings'
        promotionAssignmentSettings:
          $ref: '#/components/schemas/promotions-promotionAssignmentSettings'
        restorePointsOnProfileDeactivation:
          $ref: '#/components/schemas/promotions-restorePointsOnProfileDeactivation'
        allowRedeemCompletionWhenBlocked:
          $ref: '#/components/schemas/promotions-allowRedeemCompletionWhenBlocked'
        saleSettings:
          $ref: '#/components/schemas/promotions-saleSettings'
        lockSettings:
          $ref: '#/components/schemas/promotions-lockSettings'
        transferSettings:
          $ref: '#/components/schemas/promotions-transferSettings'
        cashbackSettings:
          $ref: '#/components/schemas/promotions-cashbackSettings'
    promotions-handbillConfigUpdateRequest:
      type: object
      properties:
        channel:
          $ref: '#/components/schemas/promotions-handbillChannel'
        status:
          $ref: '#/components/schemas/promotions-handbillStatus'
        name:
          $ref: '#/components/schemas/promotions-handbillName'
        description:
          $ref: '#/components/schemas/promotions-handbillDescription'
        controlGroup:
          $ref: '#/components/schemas/promotions-handbillControlGroup'
        variants:
          $ref: '#/components/schemas/promotions-handbillVariants'
    promotions-handbillConfigCreateRequest:
      type: object
      required:
      - channel
      - status
      - name
      - description
      - controlGroup
      - variants
      properties:
        channel:
          $ref: '#/components/schemas/promotions-handbillChannel'
        status:
          $ref: '#/components/schemas/promotions-handbillStatus'
        name:
          $ref: '#/components/schemas/promotions-handbillName'
        description:
          $ref: '#/components/schemas/promotions-handbillDescription'
        controlGroup:
          $ref: '#/components/schemas/promotions-handbillControlGroup'
        variants:
          $ref: '#/components/schemas/promotions-handbillVariants'
    promotions-handbillConfig:
      type: object
      description: Details of a single handbill configuration
      properties:
        uuid:
          $ref: '#/components/schemas/promotions-handbillUuid'
        createdAt:
          $ref: '#/components/schemas/promotions-objectCreatedAt'
        updatedAt:
          $ref: '#/components/schemas/promotions-objectUpdatedAt'
        channel:
          $ref: '#/components/schemas/promotions-handbillChannel'
        status:
          $ref: '#/components/schemas/promotions-handbillStatus'
        userId:
          $ref: '#/components/schemas/promotions-userId'
        origin:
          $ref: '#/components/schemas/promotions-handbillOrigin'
        name:
          $ref: '#/components/schemas/promotions-handbillName'
        description:
          $ref: '#/components/schemas/promotions-handbillDescription'
        controlGroup:
          $ref: '#/components/schemas/promotions-handbillControlGroup'
        variants:
          $ref: '#/components/schemas/promotions-handbillVariants'
    promotions-handbillConfigWithSimplifiedVariants:
      type: object
      description: Details of a single handbill configuration
      properties:
        uuid:
          $ref: '#/components/schemas/promotions-handbillUuid'
        createdAt:
          $ref: '#/components/schemas/promotions-objectCreatedAt'
        updatedAt:
          $ref: '#/components/schemas/promotions-objectUpdatedAt'
        channel:
          $ref: '#/components/schemas/promotions-handbillChannel'
        status:
          $ref: '#/components/schemas/promotions-handbillStatus'
        userId:
          $ref: '#/components/schemas/promotions-userId'
        origin:
          $ref: '#/components/schemas/promotions-handbillOrigin'
        name:
          $ref: '#/components/schemas/promotions-handbillName'
        description:
          $ref: '#/components/schemas/promotions-handbillDescription'
        controlGroup:
          $ref: '#/components/schemas/promotions-handbillControlGroup'
        variants:
          $ref: '#/components/schemas/promotions-handbillVariantsSimple'
    promotions-userId:
      type: integer
      description: ID of the user who created this object or the last user who updated it, if applicable
    promotions-handbillChannel:
      description: |-
        Channel of the handbill.
        * CHECK_IN means that the promotions are offered before a purchase.
        * CHECK_OUT means that promotions are offered after a purchase, and can be used in a future transaction.
        * MOBILE is used to deliver promotions to a mobile application.
      type: string
      enum:
      - MOBILE
      - CHECK_OUT
      - CHECK_IN
    promotions-handbillName:
      type: string
      description: Name of the handbill configuration
    promotions-promotionImportHash:
      type: string
      format: uuid
      nullable: true
      description: Hash of the import
    promotions-handbillDescription:
      type: string
      maxLength: 65535
      description: Description of the handbill configuration
    promotions-handbillControlGroup:
      nullable: true
      description: Details of the control group. A control group is the part of profiles who are not offered any promotions so their activity can be compared with promotion-enabled profiles to check a promotion's effectiveness.
      type: object
      required:
      - name
      - percentage
      properties:
        name:
          type: string
          description: Name of the control group
        percentage:
          $ref: '#/components/schemas/promotions-handbillVariantPercentage'
    promotions-handbillOrigin:
      type: string
      enum:
      - USER
      - PROFILE
      description: Informs if this object was created/updated by a User or a Workspace.
    promotions-handbillStatus:
      type: string
      description: Status of the handbill
      enum:
      - DRAFT
      - ACTIVE
      - INACTIVE
    promotions-handbillUuid:
      type: string
      format: uuid
      description: UUID of the variant. Generated automatically.
    promotions-handbillVariantsSimple:
      type: array
      description: Variants of the handbill configuration.
      items:
        type: object
        description: Handbill variant
        properties:
          name:
            $ref: '#/components/schemas/promotions-handbillVariantName'
          uuid:
            $ref: '#/components/schemas/promotions-handbillVariantUuid'
          percentage:
            $ref: '#/components/schemas/promotions-handbillVariantPercentage'
          ai:
            $ref: '#/components/schemas/promotions-handbillVariantAi'
    promotions-handbillVariants:
      type: array
      description: Variants of the handbill configuration. If you do not want to use variants, send an empty array.
      maxItems: 10
      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'
          distinctFilter:
            $ref: '#/components/schemas/promotions-handbillDistinctFilter'
    promotions-handbillVariantName:
      type: string
      description: Name of the variant
    promotions-handbillVariantUuid:
      type: string
      format: uuid
      description: UUID of the variant. Generated automatically. Do not send this field in create/update requests.
    promotions-handbillVariantAi:
      type: object
      description: Additional configuration for the AI recommendations engine
      required:
      - controlVariant
      properties:
        controlVariant:
          type: boolean
          description: 'When `true`, the promotions are assigned at random. When `false`, the promotions are assigned based on the AI recommendations settings: `varietyFactor`, `varietyGroupSize`,`redistributionFrequencyFactor`, `popularityBoosting`.'
        varietyFactor:
          description: Adjust the variety of returned promotions. The higher the number, the more variety. The choice of promotions is calculated by the AI.
          type: number
          minimum: 0
          maximum: 1
          example: 0.5
        varietyGroupSize:
          description: Defines how many similar items may be recommended. This is calculated in according to `varietyFactor`.
          type: integer
          minimum: 1
          example: 1
        redistributionFrequencyFactor:
          description: Allows adjusting the frequency of promotion redistribution. The default value of 1 allows the model to decide how often to redistribute promotions. A value lower than 1 decreases redistribution frequency, a value higher than 1 increases it.
          type: number
          minimum: 0.5
          maximum: 1.5
          example: 0.5
        popularityBoosting:
          description: Allows adjusting how important product popularity is for the promotions model. Higher values increase the importance.
          type: number
          minimum: 0
          maximum: 1
          example: 1
    promotions-handbillVariantLimits:
      type: object
      nullable: true
      description: Daily redemption limits of this variant
      properties:
        limitPerDay:
          type: integer
          description: The maximum number of times each profile can redeem this handbill in a single day
          example: 6
          deprecated: true
        limitExceptions:
          type: array
          description: Days of the week when the limits are different
          nullable: true
          items:
            type: object
            required:
            - dayOfWeek
            - limitPerDay
            properties:
              dayOfWeek:
                type: integer
                description: Day of the week when the exception applies. "1" is Monday.
                minimum: 1
                maximum: 7
                example: 5
              limitPerDay:
                type: integer
                example: 8
                description: The maximum number of times each profile can redeem this promotion in the day defined for this exception.
        limitsPerBasket:
          type: array
          description: The minimum basket limits that should be met
          nullable: true
          items:
            type: object
            required:
            - basketSize
            - basketValue
            - condition
            properties:
              basketSize:
                type: integer
                description: Minimum basket size
                minimum: 0
                example: 12
              basketValue:
                type: number
                description: Minimum basket value
                minimum: 0
                example: 30.5
              condition:
                type: string
                description: Condition if minimum values should be conjunction or alternative
                enum:
                - AND
                - OR
        limitExclusion:
          type: array
          description: Items that should not be taken into consideration while calculating basket value and size
          nullable: true
          items:
            type: object
            required:
            - catalogId
            properties:
              catalogId:
                type: number
                description: Catalog that the products and/or filters belong to
                example: 22424
              products:
                type: array
                description: Products that should be excluded
                nullable: true
                items:
                  type: string
                  description: Product reference
                  example: UGG-BB-PUR-06
              filters:
                type: array
                description: Filter ids of products that should be excluded
                nullable: true
                items:
                  type: string
                  description: Filter ids
                  example: 7c1fbdf6-dd27-11ea-87d0-0242ac130003
    promotions-handbillVariantActivity:
      type: object
      nullable: true
      description: Defines how long the handbill promotions remain assigned to the profile after the handbill is generated.
      properties:
        lastingType:
          type: string
          description: Type of handbill expiration.
          default: RELATIVE
          enum:
          - RELATIVE
          - CRON
        lasting:
          type: object
          description: Defines a time period. Required if lastingType is `RELATIVE`.
          required:
          - value
          - unit
          properties:
            unit:
              description: The time unit
              enum:
              - HOURS
              - DAYS
            value:
              type: integer
              example: 24
              description: The amount of time units
        cronWeekdays:
          type: array
          description: 'Used when `"lastingType": "CRON"`. Array of week days when the handbill promotions expire'
          minItems: 1
          items:
            type: integer
            minimum: 0
            maximum: 6
            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.'
          pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$
          example: '12:34'
        lastingAt:
          type: string
          format: date-time
          description: 'Used when `"lastingType": "RELATIVE"`. Time when the handbill expires.'
        timeExclusions:
          type: object
          nullable: true
          required:
          - uuid
          properties:
            uuid:
              type: string
              format: uuid
              example: 6a177f3e-748f-44d4-ac30-a457a5199685
    promotions-handbillVariantPrintout:
      type: object
      description: Details for printing the coupon
      nullable: true
      required:
      - template
      properties:
        template:
          type: string
          description: Template in [Pug format](https://pugjs.org/api/getting-started.html). The template can contain references to variables in the definition of the promotion, for example `promotion.name`, `promotion.tags[1]`. You can also use the [Moment.js library](https://momentjs.com/). The `#{}` elements allow you to insert JS code with the scope limited to `promotion`, `moment`, and `JSON`.
          example: '|#{promotion.name};#{promotion.discountType == ''EXACT_PRICE'' ? ''Price'':''Discount''} #{promotion.discountValue} #{promotion.discountType == ''PERCENT''? ''%'' : ''USD''};Valid for;#{moment.utc(coupon.createdAt).tz(''Europe/Warsaw'').format(''DD.MM.YYYY HH:mm'')} - #{moment.utc(coupon.lastingAt).tz(''Europe/Warsaw'').format(''DD.MM.YYYY HH:mm'')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!'
        maxLineLength:
          type: integer
          description: Maximum number of characters to print on a line
          example: 18
        newLineDelimiter:
          type: string
          description: Line delimiter
          example: ;
    promotions-handbillVariantTypes:
      type: array
      nullable: true
      description: Array of promotions types which will be taken as promotion candidates to assign. When set to null, only promotions with HANDBILL type will be considered as candidates.  For type HANDBILL, promotions are assigned with lasting date calculated by `activity` settings in variant, so all get promotions endpoints consider those dates when filtering by `lastingOnly` flag. For other types than HANDBILL, promotions lasting date is only respected in `/get-for-client/handbill/:handbillUuid` endpoint. Other get promotions endpoints don't filter those promotions by `lastingOnly` flag.
      items:
        type: string
        description: Promotion type
        enum:
        - MEMBERS_ONLY
        - HANDBILL
        - CUSTOM
        - GENERAL
      example:
      - MEMBERS_ONLY
      - HANDBILL
    promotions-handbillExcludeByAvailableProducts:
      description: When `true`, promotions aren't generated for items which already belong to another assigned promotion.
      type: boolean
      example: true
      default: true
      nullable: false
    promotions-handbillVariantSlotFilters:
      type: object
      description: Slots to include in the coupon
      nullable: true
      required:
      - order
      - slots
      properties:
        order:
          type: string
          enum:
          - GIVEN
          - AI
          description: |-
            The type of slot ordering when they are returned, where:
                `GIVEN` - slots are returned in the order they were created
                `AI` - order of slots is changed by AI engine score
        slots:
          type: array
          description: Slots in the coupon. You can use them, for example, to create a slot that will only show promotions for a certain brand, and another for all the other brands. This is done by applying filters that include certain promotions.
          maxItems: 10
          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
              distinctFilter:
                $ref: '#/components/schemas/promotions-handbillDistinctFilter'
    promotions-handbillDistinctFilter:
      type: object
      nullable: true
      description: 'Distinct filter that limits how many promotions from each value of a given field (e.g. brand, category) can appear in the returned set. Rules are applied per field; at most 3 rules allowed, each `field` value must be unique across rules. `elastic: true` relaxes the filter when there are not enough qualifying promotions (may under-fill less); `elastic: false` is strict (may under-fill the slot). A variant-level `distinctFilter` and slot-level `distinctFilter` values are mutually exclusive (XOR): if the variant has a non-null `distinctFilter`, all slot `distinctFilter` values must be null/absent, and `slotFilters` must be present. `levelRangeModifier` is only meaningful when `field` is `category` — it widens or narrows the category level range used for grouping.'
      required:
      - filters
      - elastic
      properties:
        filters:
          type: array
          description: List of distinct-filter rules. Each rule targets one field. Field values must be unique across rules.
          minItems: 1
          maxItems: 3
          items:
            type: object
            required:
            - field
            - maxNumItems
            properties:
              field:
                type: string
                minLength: 1
                description: The promotion attribute to group by (e.g. `brand`, `category`).
                example: brand
              maxNumItems:
                type: integer
                minimum: 1
                description: Maximum number of promotions allowed from each distinct value of this field.
                example: 2
              levelRangeModifier:
                type: integer
                description: Only applicable when `field` is `category`. Adjusts the category level range used for grouping. Must not be present when `field` is not `category`.
                example: 1
        elastic:
          type: boolean
          description: When `true`, the filter is relaxed if not enough promotions qualify — the slot may be filled with additional promotions beyond the per-value limit. When `false`, the filter is strict — the slot may be under-filled if there are insufficient qualifying promotions.
          example: true
    promotions-handbillVariantPercentage:
      type: integer
      minimum: 0
      maximum: 100
      description: The size of the group, in relation to the entire group to which the promotion applies. The control group and the groups for each variant must sum up to 100%.
    promotions-objectCreatedAt:
      type: string
      format: date-time
      description: Time when the object was created
    promotions-objectUpdatedAt:
      type: string
      format: date-time
      description: Time when the object was last updated
    promotions-clientKey:
      type: string
      example: clientId
      description: Type of profile identifier
      enum:
      - externalId
      - clientId
      - email
      - phone
      - uuid
    promotions-clientKeyValue:
      description: Value of the selected identifier
      type: string
      example: '434428563'
    promotions-senderName:
      description: Name of the points sender
      type: string
    promotions-recipientName:
      description: Name of the points recipient
      type: string
    promotions-responseCode:
      type: number
      description: Response code. 0 is the same as HTTP 200. Other HTTP codes are sent as usual.
    promotions-responseDescription:
      type: string
      description: Description of the response. Used for diagnostics and troubleshooting.
    promotions-responseMeta:
      type: object
      description: Optional metadata
      properties:
        code:
          type: integer
          description: HTTP code
        limit:
          type: integer
          description: The number of items per page
        link:
          type: array
          description: Links to other pages
          items:
            type: object
            description: Link to another page on the list
            properties:
              rel:
                type: string
                enum:
                - first
                - last
                - next
                - prev
                description: The type of relationship to the current page
              url:
                type: string
                description: The URL of the page
        page:
          type: integer
          description: The current page
        totalCount:
          type: integer
          description: The total number of items on all pages
        totalPages:
          type: integer
          description: The total number of pages
    promotions-ResponseError:
      type: string
      description: Summary of the error
    promotions-ResponseErrorMessage:
      type: string
      description: Error details
    promotions-ErrorTimestamp:
      type: string
      description: Time when the error occurred
    promotions-ErrorCode:
      type: integer
      description: HTTP code of the problem
    promotions-ErrorObject:
      type: object
      title: JSON content issue
      properties:
        message:
          $ref: '#/components/schemas/promotions-ResponseError'
        error:
          description: Details of the error
          anyOf:
          - type: array
            description: An array of objects with error details
            items:
              type: object
              description: Details of an error
              properties:
                message:
                  $ref: '#/components/schemas/promotions-ErrorV2Message'
                additionalProperties:
                  description: Additional information, if applicable
          - type: string
            description: Description of the error
    promotions-ErrorV2Timestamp:
      type: string
      format: date-time
      description: Date and time when the error occurred
      example: '2020-10-05T10:59:21.000Z'
    promotions-ErrorV2TraceId:
      type: string
      description: TraceId of the request which resulted in the error
      example: 8705651679b203e7
    promotions-ErrorV2Message:
      type: string
      description: Short description of the error
      example: Internal Error
    promotions-ErrorV2HttpStatus:
      type: number
      description: HTTP status of the error
      example: 500
    promotions-ErrorV2Code:
      type: string
      description: Error code which helps identify the issue. See [API error reference](https://hub.synerise.com/api-reference/errors.html).
      example: ERR-001
    promotions-OptionalErrorV2Code:
      type: string
      description: Error code which helps identify the issue. See [API error reference](https://hub.synerise.com/api-reference/errors.html).
      example: ERR-001
      nullable: true
    promotions-PromotionActivationErrorSchema:
      type: object
      description: Details of an error
      properties:
        errorCode:
          $ref: '#/components/schemas/promotions-OptionalErrorV2Code'
        message:
          $ref: '#/components/schemas/promotions-ResponseErrorMessage'
      example:
        message: Points not met limits for activation
        name: PointsNotMetError
        errorCode: ERR-042
    promotions-GenericErrorV2Schema:
      type: object
      description: Details of an error
      properties:
        timestamp:
          $ref: '#/components/schemas/promotions-ErrorV2Timestamp'
        traceId:
          $ref: '#/components/schemas/promotions-ErrorV2TraceId'
        errorCode:
          $ref: '#/components/schemas/promotions-ErrorV2Code'
        message:
          $ref: '#/components/schemas/promotions-ErrorV2Message'
        httpStatus:
          $ref: '#/components/schemas/promotions-ErrorV2HttpStatus'
    promotions-ClientNotFoundError:
      allOf:
      - $ref: '#/components/schemas/promotions-GenericErrorV2Schema'
      - description: Profile not found
        example:
          errorCode: CLI-001
          httpStatus: 404
          message: Profile not found
          timestamp: '2020-10-05T10:59:21.000Z'
          traceId: 8705651679b203e7
    promotions-ProfileNotFoundErrorV1:
      description: Profile not found
      properties:
        message:
          $ref: '#/components/schemas/promotions-ResponseErrorMessage'
      example:
        message: Profile not found
    promotions-PromotionNotFoundErrorV1:
      description: Promotion not found
      properties:
        message:
          $ref: '#/components/schemas/promotions-ResponseErrorMessage'
      example:
        message: Promotion not found
    promotions-PromotionNotActivatedErrorV1:
      description: Promotion not activated
      properties:
        message:
          $ref: '#/components/schemas/promotions-ResponseErrorMessage'
      example:
        message: Promotion not activated
    promotions-PromotionRedeemLimitExceededErrorV1:
      description: Promotion redeem limit exceeded
      properties:
        message:
          $ref: '#/components/schemas/promotions-ResponseErrorMessage'
      example:
        message: Promotion redeem limit exceeded
    promotions-PromotionAlreadyRedeemedErrorV1:
      description: Promotion already redeemed
      properties:
        message:
          $ref: '#/components/schemas/promotions-ResponseErrorMessage'
      example:
        message: Promotion already redeemed
    promotions-LockNotFoundErrorV1:
      description: Lock not found
      properties:
        message:
          $ref: '#/components/schemas/promotions-ResponseErrorMessage'
      example:
        message: Lock not found
    promotions-ErrorV2InvalidBodySource:
      type: object
      properties:
        pointer:
          description: JSON pointer to the object which was source of the error
          example: /exampleKey
    promotions-InvalidDataErrorV2:
      allOf:
      - $ref: '#/components/schemas/promotions-GenericErrorV2Schema'
      - description: Details of a body validation error
        properties:
          errors:
            type: array
            items:
              type: object
              description: Details of a validation error
              properties:
                errorCode:
                  $ref: '#/components/schemas/promotions-ErrorV2Message'
                source:
                  $ref: '#/components/schemas/promotions-ErrorV2InvalidBodySource'
        example:
          errorCode: ERR-042
          httpStatus: 400
          message: Invalid data
          timestamp: '2020-10-05T10:59:21.000Z'
          traceId: 8705651679b203e7
    promotions-ClientNotHaveRequiredPointsError:
      allOf:
      - $ref: '#/components/schemas/promotions-GenericErrorV2Schema'
      - description: Profile does not have the required number of points
        example:
          errorCode: PRO-015
          httpStatus: 422
          message: Profile does not have the required number of points
          timestamp: '2020-10-05T10:59:21.000Z'
          traceId: 8705651679b203e7
    promotions-ClientPointsSenderNotInSegmentError:
      allOf:
      - $ref: '#/components/schemas/promotions-GenericErrorV2Schema'
      - description: Point sender is not in the required segmentation
        example:
          errorCode: PRO-034
          httpStatus: 422
          message: Point sender is not in the required segmentation
          timestamp: '2020-10-05T10:59:21.000Z'
          traceId: 8705651679b203e7
    promotions-ClientPointsRecipientNotInSegmentError:
      allOf:
      - $ref: '#/components/schemas/promotions-GenericErrorV2Schema'
      - description: Point recipient is not in required segmentation
        example:
          errorCode: PRO-035
          httpStatus: 422
          message: Point recipient is not in required segmentation
          timestamp: '2020-10-05T10:59:21.000Z'
          traceId: 8705651679b203e7
    promotions-ClientPointsLockErrorV2:
      allOf:
      - $ref: '#/components/schemas/promotions-GenericErrorV2Schema'
      - description: Profile points are locked. Waiting for releasing lock for the profile
        example:
          errorCode: PRO-016
          httpStatus: 423
          message: Profile points are locked. Waiting for releasing lock for the profile.
          timestamp: '2020-10-05T10:59:21.000Z'
          traceId: 8705651679b203e7
    push-devices-service-Updated:
      type: string
      description: Tokens updated before this date will be deleted.
      format: date-time
    push-devices-service-WebPushCleanupRequest:
      oneOf:
      - type: object
        title: By update time
        required:
        - type
        - updated
        properties:
          type:
            type: string
            enum:
            - BY_UPDATED_BEFORE
          updated:
            $ref: '#/components/schemas/push-devices-service-Updated'
      - type: object
        title: By version
        required:
        - type
        - version
        properties:
          type:
            type: string
            enum:
            - BY_VERSION
          version:
            type: string
            example: 0.0.1
            description: Tokens with this service worker version will be deleted.
    push-devices-service-MobilePushCleanupRequest:
      type: object
      properties:
        type:
          type: string
          enum:
          - BY_UPDATED_BEFORE
        updated:
          $ref: '#/components/schemas/push-devices-service-Updated'
      required:
      - type
      - updated
    push-devices-service-inBodyClientDeviceId:
      type: string
      description: Unique Android or iOS device ID
    push-devices-service-LinkaClientdeviceRequest:
      type: object
      required:
      - deviceId
      - type
      - registrationId
      properties:
        deviceId:
          $ref: '#/components/schemas/push-devices-service-inBodyClientDeviceId'
        registrationId:
          type: string
          description: Registration ID for [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)
        type:
          type: string
          description: Device type
          enum:
          - android
          - ios
          - windows
        bluetoothAddress:
          type: string
          description: Bluetooth MAC address of the device
        macAddress:
          type: string
          description: MAC address of the network adapter
        manufacturer:
          type: string
          description: Manufacturer of the device
        model:
          type: string
          description: Model of the device
        osVersion:
          type: string
          description: Operating system of the device
        product:
          type: string
          description: Additional information about the OS on the device
          example: a51ul_htc_europe
        screenHeight:
          type: integer
          format: int32
          description: Screen height in pixels
        screenWidth:
          type: integer
          format: int32
          description: Screen width in pixels
        publicKey:
          type: string
          description: Public key used to encrypt push messages
    push-devices-service-HTTP400:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: Additional details of the errors, if applicable
          items:
            $ref: '#/components/schemas/push-devices-service-Error'
    push-devices-service-Error:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: 12082
          description: A numeric identifier of the error type
        field:
          type: string
          example: countryCode
          description: Field in the request body that caused the error
        message:
          type: string
          example: Country Code must have 0 or 3 characters as per ISO format.
          description: A detailed description of the problem
        rejectedValue:
          type: string
          example: Poland
          description: The value that caused the error
    query-rules-v2-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
      - timestamp
      - status
      - message
    query-rules-v2-PaginatedRules:
      type: object
      properties:
        data:
          type: array
          description: A list of rules
          items:
            $ref: '#/components/schemas/query-rules-v2-RuleWithStatus'
        extras:
          type: object
          description: Additional information
          properties:
            statuses:
              type: object
              description: The number of rules with each status. All rules are considered.
              properties:
                Finished:
                  type: integer
                Draft:
                  type: integer
                Paused:
                  type: integer
                Scheduled:
                  type: integer
                Active:
                  type: integer
        meta:
          $ref: '#/components/schemas/query-rules-v2-PaginationMeta'
    query-rules-v2-PaginationMeta:
      type: object
      description: 'Optional pagination metadata (sent if `"includeMeta": true`)'
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of campaigns
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                - first
                - next
                - prev
                - last
    query-rules-v2-RuleWithStatus:
      type: object
      description: Details of the rule
      properties:
        status:
          description: Status of the rule
          type: string
        rule:
          type: object
          description: Configuration of the rule
          properties:
            id:
              $ref: '#/components/schemas/query-rules-v2-RuleId'
            name:
              $ref: '#/components/schemas/query-rules-v2-RuleName'
            author:
              $ref: '#/components/schemas/query-rules-v2-RuleAuthor'
            state:
              $ref: '#/components/schemas/query-rules-v2-RuleState'
            activeFrom:
              $ref: '#/components/schemas/query-rules-v2-RuleActiveFromDatetime'
            activeTo:
              $ref: '#/components/schemas/query-rules-v2-RuleActiveToDatetime'
            timezone:
              $ref: '#/components/schemas/query-rules-v2-RuleTimezoneSchema'
            updatedAt:
              $ref: '#/components/schemas/query-rules-v2-RuleUpdateDatetime'
            createdAt:
              $ref: '#/components/schemas/query-rules-v2-RuleCreatedDatetime'
            data:
              $ref: '#/components/schemas/query-rules-v2-RuleDataSchema'
            source:
              $ref: '#/components/schemas/query-rules-v2-RuleSource'
    query-rules-v2-RuleId:
      type: integer
      description: ID of the rule
    query-rules-v2-RuleName:
      type: string
      description: Name of the rule
    query-rules-v2-RuleMatchingType:
      type: string
      description: Match logic of the rule
      enum:
      - is
      - startsWith
      - endsWith
      - contains
    query-rules-v2-RuleAuthor:
      description: The user who created the rule
      type: integer
    query-rules-v2-RuleState:
      type: string
      description: State of the rule
      enum:
      - draft
      - active
      - paused
      - finished
    query-rules-v2-RuleSource:
      type: string
      description: Whether the rule belongs to the index itself (`index`) or is inherited from its parent index (`parent`). Inherited rules are read-only on the child index.
      enum:
      - index
      - parent
    query-rules-v2-RuleUpdateDatetime:
      type: string
      description: Last update time in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleCreatedDatetime:
      type: string
      description: Creation time in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleActiveToDatetime:
      type: string
      description: Time when the rule becomes inactive, in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleActiveFromDatetime:
      type: string
      description: Time when the rules becomes active, in YYYY-MM-DD HH-MM-SS format
    query-rules-v2-RuleTimezoneSchema:
      type: string
      description: Timezone in `UTC[+/-]X` format, for example `UTC+4`, `UTC+0`, `UTC-3`
    query-rules-v2-RuleDataSchema:
      type: object
      description: This object contains the details of what the rule does
      required:
      - conditions
      - queryConsequences
      - postQueryConsequences
      properties:
        audience:
          type: object
          description: Optional audience the rule will be applied to
          properties:
            segmentationIds:
              type: array
              description: Ids of segmentations to which client belongs
              example:
              - 34ab56cd-789be-22ee-11ab-123456789abc
              - 12xy34z5-456b-33cc-7o52-987654321ece
              items:
                type: string
        conditions:
          type: object
          description: Additional conditions
          properties:
            patterns:
              type: array
              description: Strings that trigger this rule when included in the query
              example:
              - phone
              - notebook
              - mouse {color} {brand}
              items:
                type: string
            matchingType:
              $ref: '#/components/schemas/query-rules-v2-RuleMatchingType'
            contexts:
              type: array
              description: Contexts for which the rule will be considered during matching
              example:
              - listing
              - web
              - mobile
              items:
                type: string
            filters:
              type: object
              description: You can configure a condition so that the rule only applies depending on the filters used in a search query.
              properties:
                textFilters:
                  $ref: '#/components/schemas/query-rules-v2-ConditionsTextFiltersSchema'
                rangeFilters:
                  $ref: '#/components/schemas/query-rules-v2-ConditionsRangeFiltersSchema'
                datetimeFilters:
                  $ref: '#/components/schemas/query-rules-v2-ConditionsDatetimeFiltersSchema'
        queryConsequences:
          type: array
          description: An array of transformations to be performed on the query
          items:
            type: object
            properties:
              type:
                type: string
                description: |
                  The action to perform

                  - `removeWord` removes a word from the query.
                  - `replaceWord` replaces a word from the query with a string.
                  - `replaceQuery` replaces the entire query.

                  **IMPORTANT:**

                  These operations are performed on strings that match the pattern exactly. For example:

                  1. The pattern is `foo bar`.
                  1. The operation is set to `removeWord` and `word` is set to `foo`.
                  1. The user searches for `foo bar bar foo`.

                  **The result:** "foo" is removed from "foo bar" and the transformed query is now "bar bar foo".
                enum:
                - removeWord
                - replaceWord
                - replaceQuery
              word:
                type: string
                description: The word to replace or remove
              replacement:
                type: string
                description: The string that replaces the word/query
        postQueryConsequences:
          type: object
          description: This object describes how the rule affects the search results
          properties:
            hideHits:
              type: array
              description: An array of items to hide from the results, identified by `itemId`
              items:
                type: string
            promoteHits:
              type: array
              description: An array of items to show first in the results
              items:
                type: object
                properties:
                  id:
                    description: '`productRetailerPartNo`'
                    type: string
                  position:
                    description: Item's position on the list of results
                    type: integer
            promoteHitsPositionStrategy:
              $ref: '#/components/schemas/query-rules-v2-PositionStrategy'
            standardFilters:
              $ref: '#/components/schemas/query-rules-v2-RuleFilters'
            elasticFilters:
              $ref: '#/components/schemas/query-rules-v2-RuleFilters'
            boostFilters:
              $ref: '#/components/schemas/query-rules-v2-BoostFilters'
            topHitsFilters:
              $ref: '#/components/schemas/query-rules-v2-TopHitsFilters'
            distinctFilter:
              $ref: '#/components/schemas/query-rules-v2-DistinctFilter'
            sortBy:
              type: object
              description: Sorting info
              properties:
                attribute:
                  type: string
                  description: Name of the attribute by which the data will be sorted
                ordering:
                  description: Sorting order
                  type: string
                  enum:
                  - desc
                  - asc
            customData:
              type: string
              description: Custom JSON that will be returned with the search results
              example: '{"customLandingPage": "https://synerise.com/"}'
            returnNoData:
              type: boolean
              description: When set to `true`, forces the search result to be empty
              example: false
            pinFacets:
              type: array
              description: |
                Forces specific facets to be included in the response, regardless of coverage score or
                automatic facet selection. Each entry may optionally specify a 1-based `position` to pin
                the facet at a specific slot in the response `facetsOrdering`.

                A pin without `position` is placed before any non-pinned facets (in input order).
                A pin with `position` greater than the final list size is appended at the tail; multiple
                such pins keep their relative ordering by ascending `position`.
                A facet that is also `hideFacets` is dropped (hide wins).
                A pin's attribute must exist in the index's facetable attributes; positions cannot exceed
                the number of facetable attributes.
              items:
                type: object
                required:
                - attribute
                properties:
                  attribute:
                    type: string
                    description: Name of the facet attribute to pin.
                    example: size
                  position:
                    type: integer
                    minimum: 1
                    maximum: 100
                    description: |
                      Optional 1-based slot in `facetsOrdering`. Omit to pin without specifying a slot.
                    example: 1
              example:
              - attribute: size
                position: 1
              - attribute: width
                position: 2
              - attribute: gift_wrap
            hideFacets:
              type: array
              description: |
                Forces specific facets to be excluded from the response, even if they would otherwise be
                selected by automatic facet selection or were explicitly requested by the API caller.
                Hidden attributes are also stripped from `customFilteredFacets` for the matched request.
              items:
                type: string
                description: Facet attribute to hide.
              example:
              - material
              - fabric
              - sleeve_length
            scoringOverride:
              $ref: '#/components/schemas/query-rules-v2-ScoringOverride'
    query-rules-v2-ConditionsTextFiltersSchema:
      type: object
      description: Condition filters for text attributes
      example:
        color:
          values:
          - green
          - red
          matchingType: InUserFilters
      additionalProperties:
        $ref: '#/components/schemas/query-rules-v2-SingleTextFiltersSchema'
    query-rules-v2-SingleTextFiltersSchema:
      type: object
      description: Values and a matching type for a single text attribute. The name of this object must be the same as the name of the attribute.
      properties:
        values:
          type: array
          description: An array of strings to match the attribute value with
          items:
            type: string
        matchingType:
          $ref: '#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType'
    query-rules-v2-ConditionsRangeFiltersSchema:
      type: object
      description: Condition filters for range attributes
      example:
        price:
          ranges:
          - rightEnd:
              value: 20
              inclusive: true
          matchingType: Exact
      additionalProperties:
        $ref: '#/components/schemas/query-rules-v2-SingleRangeFiltersSchema'
    query-rules-v2-SingleRangeFiltersSchema:
      type: object
      description: Ranges and a matching type for a single range attribute. The name of this object must be the same as the name of the attribute.
      properties:
        ranges:
          type: array
          description: An array of ranges to match the attribute value with.
          items:
            type: object
            properties:
              leftEnd:
                description: Lower boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                - $ref: '#/components/schemas/query-rules-v2-RangeEndSchema'
              rightEnd:
                description: Upper boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                - $ref: '#/components/schemas/query-rules-v2-RangeEndSchema'
        matchingType:
          $ref: '#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType'
    query-rules-v2-ConditionsDatetimeFiltersSchema:
      type: object
      description: Condition filters for datetime attributes
      example:
        created:
          ranges:
          - rightEnd:
              value: '2024-01-01'
              inclusive: true
          matchingType: Exact
      additionalProperties:
        $ref: '#/components/schemas/query-rules-v2-SingleDatetimeFiltersSchema'
    query-rules-v2-SingleDatetimeFiltersSchema:
      type: object
      description: Ranges and a matching type for a single datetime attribute. The name of this object must be the same as the name of the attribute.
      properties:
        ranges:
          type: array
          description: An array of ranges to match the attribute value with.
          items:
            type: object
            properties:
              leftEnd:
                description: Lower boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                - $ref: '#/components/schemas/query-rules-v2-DatetimeEndSchema'
              rightEnd:
                description: Upper boundary of the range. If not defined (this object is not sent at all), defaults to infinity.
                allOf:
                - $ref: '#/components/schemas/query-rules-v2-DatetimeEndSchema'
        matchingType:
          $ref: '#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType'
    query-rules-v2-ConditionsFiltersMatchingType:
      type: string
      description: |
        Match logic of the filters for a given attribute. Condition filters and customer search filters are compared as mathematical sets.

        - `Exact`: the customer's search filters must be exactly the same as this condition filter.
        - `ContainsUserFilters`: this condition filter must contain all the customer's search filters (but can also contain other filters).
        - `InUserFilters`: the customer's search filter must contain all of this condition filter (but can also contain other filters)
        - `NonEmptyIntersectionWithUserFilters`: at least one of the customer's search filters must match a value from this condition filter.

        **Example:**:

        - The customer's filters are `color == "green" OR color == "white" OR color == "red"`.
        - The condition filter is `color == ["green","red"]`.

        The result is:
        - `Exact`: does not match, the sets are different.
        - `ContainsUserFilters`: does not match, some customer filters are not included in the condition filters
        - `InUserFilters`: matches, `"green"` and `"red"` are included in `["green","white","red"]`.
        - `NonEmptyIntersectionWithUserFilters`: matches, there is at least one common element
      enum:
      - Exact
      - ContainsUserFilters
      - InUserFilters
      - NonEmptyIntersectionWithUserFilters
    query-rules-v2-RangeEndSchema:
      type: object
      properties:
        value:
          type: number
          description: Numerical value
        inclusive:
          type: boolean
          description: If TRUE, `<` becomes `<=` and `>` becomes `>=`.
    query-rules-v2-DatetimeEndSchema:
      type: object
      properties:
        value:
          type: string
          description: ISO datetime value
        inclusive:
          type: boolean
          description: If TRUE, `<` becomes `<=` and `>` becomes `>=`.
    query-rules-v2-BoostFilters:
      type: array
      description: Filters that boost the results
      items:
        type: object
        properties:
          weight:
            type: integer
            description: |
              The boost percentage. Positive values boost scores of results that match
              the provided filters. Negative values demotes scores of matching items.
            minimum: -100
            maximum: 100
            not:
              enum:
              - 0
          filters:
            $ref: '#/components/schemas/query-rules-v2-RuleFilters'
    query-rules-v2-TopHitsFilters:
      type: array
      description: Filters that move a specified number of items to the front
      items:
        type: object
        properties:
          hitsNumber:
            type: integer
            description: |
              Number of top-scoring items that match the provided filters
              and will be moved to the front of the results
            minimum: 1
            maximum: 20
          positions:
            type: array
            description: |
              Optional 1-based result positions for the top-hits, aligned by index to the sub-query's score order. Omit for the default front-block-by-score behaviour. Must be unique, within [1, 50], and no more than `hitsNumber` entries.
            items:
              type: integer
              minimum: 1
              maximum: 50
          filters:
            $ref: '#/components/schemas/query-rules-v2-RuleFilters'
    query-rules-v2-DistinctFilter:
      type: object
      required:
      - attribute
      - maxNumItems
      description: Distinct filter definition
      properties:
        attribute:
          type: string
          description: Name of the attribute for distinct filter
        maxNumItems:
          type: integer
          description: Max number of items having the same attribute value
        categoryLevelModifier:
          type: integer
          description: Category level modifier to use with `category` attribute
    query-rules-v2-RuleFilters:
      type: object
      description: Filters for the query
      properties:
        textFilters:
          type: array
          description: Text-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: brand
              mode:
                type: string
                description: |
                  Information whether to include or exclude filtered results.

                  - `include`: includes filtered results
                  - `exclude`: excludes filtered results
                enum:
                - include
                - exclude
                example: include
            oneOf:
            - properties:
                values:
                  type: array
                  description: Values to be used during filtering. May contain both strings and patterns.
                  example:
                  - A-Brand
                  - B-Brand
                  - '{brand}'
                  items:
                    type: string
            - properties:
                aggregateId:
                  type: string
                  description: Uuid of an aggregate to be used during filtering.
                  example: 32be9640-37e5-3196-abb6-6dc192002dab
            - properties:
                expressionId:
                  type: string
                  description: Uuid of an expression to be used during filtering.
                  example: ad29ff7a-7148-4a5c-8a2a-4491e3ae7e9d
        rangeFilters:
          type: array
          description: Range-type filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: price
              operator:
                type: string
                description: |
                  Operator to be used during filtering.

                  - `gt`: greater than
                  - `gte`: greater or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `eq`/`neq`: equal/not equal
                enum:
                - gt
                - gte
                - lt
                - lte
                - eq
                - neq
            oneOf:
            - properties:
                value:
                  description: Value to use during filtering
                  oneOf:
                  - type: string
                    description: Placeholder value to use during filtering. The placeholder must be included in all of the patterns defined in the `conditions` object.
                    example: '{price}'
                  - type: number
                    format: float
                    description: Float value to use during filtering
                    example: 19.99
            - properties:
                aggregateId:
                  type: string
                  description: Uuid of an aggregate to be used during filtering.
                  example: 32be9640-37e5-3196-abb6-6dc192002dab
            - properties:
                expressionId:
                  type: string
                  description: Uuid of an expression to be used during filtering.
                  example: ad29ff7a-7148-4a5c-8a2a-4491e3ae7e
        datetimeFilters:
          type: array
          description: Range-type datetime filters
          items:
            type: object
            properties:
              attribute:
                type: string
                description: Attribute to be filtered
                example: created
              operator:
                type: string
                description: |
                  Operator to be used during filtering.

                  - `gt`: greater than
                  - `gte`: greater or equal
                  - `lt`: less than
                  - `lte`: less than or equal
                  - `eq`/`neq`: equal/not equal
                enum:
                - gt
                - gte
                - lt
                - lte
                - eq
                - neq
            oneOf:
            - properties:
                value:
                  description: Value to use during filtering
                  oneOf:
                  - type: string
                    description: Placeholder value to use during filtering. The placeholder must be included in all of the patterns defined in the `conditions` object.
                    example: '{created}'
                  - type: string
                    description: ISO datetime value to use during filtering
                    example: 2024-01-01T00:00:00Z
            - properties:
                aggregateId:
                  type: string
                  description: Uuid of an aggregate to be used during filtering.
                  example: 32be9640-37e5-3196-abb6-6dc192002dab
            - properties:
                expressionId:
                  type: string
                  description: Uuid of an expression to be used during filtering.
                  example: ad29ff7a-7148-4a5c-8a2a-4491e3ae7e
            - properties:
                relativeValue:
                  $ref: '#/components/schemas/query-rules-v2-RelativeDatetime'
    query-rules-v2-RelativeDatetime:
      type: object
      required:
      - value
      - unit
      properties:
        value:
          type: integer
          description: The numerical duration value.
        unit:
          type: string
          description: The unit of duration.
          enum:
          - seconds
          - minutes
          - hours
          - days
      example:
        value: 2
        unit: days
    query-rules-v2-PositionStrategy:
      oneOf:
      - $ref: '#/components/schemas/query-rules-v2-ManualType'
      - $ref: '#/components/schemas/query-rules-v2-CustomType'
      - $ref: '#/components/schemas/query-rules-v2-AscendingType'
      discriminator:
        propertyName: type
        mapping:
          manual: '#/components/schemas/query-rules-v2-ManualType'
          custom: '#/components/schemas/query-rules-v2-CustomType'
          ascending: '#/components/schemas/query-rules-v2-AscendingType'
      example:
        type: custom
    query-rules-v2-ManualType:
      type: object
      properties:
        type:
          type: string
          enum:
          - manual
          example: manual
      required:
      - type
      additionalProperties: false
    query-rules-v2-CustomType:
      type: object
      properties:
        type:
          type: string
          enum:
          - custom
          example: custom
      required:
      - type
      additionalProperties: false
    query-rules-v2-AscendingType:
      type: object
      properties:
        type:
          type: string
          enum:
          - ascending
          example: ascending
        start:
          type: integer
          example: 1
        step:
          type: integer
          example: 2
      required:
      - type
      - start
      - step
      additionalProperties: false
    query-rules-v2-ScoringOverride:
      oneOf:
      - $ref: '#/components/schemas/query-rules-v2-RankingScoringOverride'
      - $ref: '#/components/schemas/query-rules-v2-TargetScoringOverride'
      discriminator:
        propertyName: type
    query-rules-v2-RankingScoringOverride:
      type: object
      required:
      - type
      - weights
      properties:
        type:
          type: string
          enum:
          - ranking
        weights:
          type: object
          description: |
            Absolute per-signal ranking weights. Each supplied signal overrides the index-config value; omitted signals fall back to index config. At least one signal must be set.
          properties:
            personalized:
              type: number
              minimum: 0
              maximum: 5
            pageVisitsPopularity:
              type: number
              minimum: 0
              maximum: 5
            transactionsPopularity:
              type: number
              minimum: 0
              maximum: 5
            pageVisits7DaysPopularity:
              type: number
              minimum: 0
              maximum: 5
            transactions7DaysPopularity:
              type: number
              minimum: 0
              maximum: 5
            revenueBoost:
              type: number
              minimum: 0
              maximum: 5
            conversionRateBoost:
              type: number
              minimum: 0
              maximum: 5
    query-rules-v2-TargetScoringOverride:
      type: object
      required:
      - type
      - optimizationTarget
      properties:
        type:
          type: string
          enum:
          - target
        optimizationTarget:
          type: string
          enum:
          - ctr
          - cr
          - revenue
          - ndcg
          - margin
    recommendation-campaigns-CrossWorkspaceMode:
      type: object
      properties:
        enabled:
          type: boolean
          description: Specifies if campaign should support multibrand cross workspace segmentation.
    recommendation-campaigns-Slug:
      type: string
      description: Unique identifier of the campaign. Can be used for fetching campaigns instead of the ID. Create meaningful, human-readable slugs for easier work with recommendation campaigns.
    recommendation-campaigns-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
      - timestamp
      - status
      - message
    recommendation-campaigns-BaseRecommendationsCampaignParameters:
      type: object
      description: Parameters that apply to this campaign
      properties:
        additionalResponseAttributes:
          type: array
          items:
            type: string
          description: An array of additional response attributes.
    recommendation-campaigns-WithMetricsRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters'
      - type: object
        properties:
          boostMetric:
            type: string
            description: ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results.
          sortMetric:
            type: string
            description: ID of the metric to sort the results by.
          boostMetricStrength:
            type: number
            description: How much influence the `boostMetric` has. Values less than 0 allow you to demote items that have high metric score, values greater than 0 allow you to promote items that have high metric score. A strength with a value of 0 does not change the scoring.
            format: float
            minimum: -100
            maximum: 100
          shuffleNumItems:
            $ref: '#/components/schemas/recommendation-campaigns-ShuffleNumItems'
    recommendation-campaigns-MetricsRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
      - type: object
        properties:
          personalizedBoostingStrength:
            $ref: '#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength'
        required:
        - sortMetric
    recommendation-campaigns-SetComplementRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters'
      - type: object
        properties:
          itemSimilarity:
            type: integer
            minimum: 0
            maximum: 5
            description: Similarity between items in the cart and the recommended items. Higher values decrease the similarity.
          recommendationVariety:
            type: number
            format: float
            minimum: 0
            maximum: 0.9
            description: Similarity between recommended items - higher values will result in more variety within the recommended item set.
          personalizedBoostingStrength:
            $ref: '#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength'
    recommendation-campaigns-RecentInteractionsRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters'
      - type: object
        properties:
          aggregateId:
            type: string
            description: Id of the aggregate which provides events as a base of recommendations.
          personalizedBoostingStrength:
            $ref: '#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength'
    recommendation-campaigns-SectionRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters'
      - type: object
        properties:
          metadataCatalogId:
            type: string
    recommendation-campaigns-AttributeRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters'
      - type: object
        properties:
          metadataCatalogId:
            type: string
            description: The id of catalog containing attributes metadata.
    recommendation-campaigns-RecommendationsCampaignFilterRules:
      type: object
      description: Filters that apply to this campaign. If the filters contain an attribute used in the default filters of the recommendation model ([**Settings > AI Configuration**](https://help.synerise.com/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-recommendations/#selecting-recommendation-types-and-default-filters)), that default filter is ignored.
      properties:
        excludePurchasedItems:
          type: boolean
          description: When true, the recommendation results will include only items that the profile hasn't purchased before.
        excludePurchasedItemsSinceDays:
          type: number
          format: integer
          description: Limits the application of the `excludePurchasedItems` filter to a specified number of days.
        elasticExcludePurchasedItems:
          type: boolean
          description: This is a setting for Elastic filters.<br>When true, the recommendation results will include only items that the profile hasn't purchased before.
        elasticExcludePurchasedItemsSinceDays:
          type: number
          format: integer
          description: This is a setting for Elastic filters.<br>Limits the application of the `elasticExcludePurchasedItemsSinceDays` filter to a specified number of days.
    recommendation-campaigns-RecommendationsCampaignSlotFilterRules:
      type: object
      description: Filters that apply to this campaign
      properties:
        filters:
          type: string
          description: Filtering string
        elasticFilters:
          type: string
          description: Filtering string for Elastic filter
    recommendation-campaigns-ItemsCatalogId:
      type: string
      description: Only items from this catalog will be recommended.
    recommendation-campaigns-DistinctFilter:
      type: object
      description: Distinct filter allows to specify how many recommended items can have the same value of specified attributes.
      properties:
        elastic:
          type: boolean
          description: It allows to complete the recommended items with items which don't meet the distinct filter criteria.
        filters:
          type: array
          minItems: 1
          maxItems: 5
          description: Array of distinct filters
          items:
            type: object
            properties:
              field:
                type: string
                description: Attribute name
              maxNumItems:
                type: number
                format: integer
                description: Max number of items with the same value of the attribute
              levelRangeModifier:
                type: number
                format: integer
                description: Parameter used (for the `category` field) to specify how many categories to cut off from the end
            required:
            - field
            - maxNumItems
      required:
      - elastic
      - filters
    recommendation-campaigns-Slots:
      type: array
      minLength: 1
      description: Recommendation slots. Must contain at least one slot with a non-empty `name`.
      items:
        $ref: '#/components/schemas/recommendation-campaigns-Slot'
    recommendation-campaigns-Slot:
      type: object
      description: Slot allows you to define a separate recommendation frame with its filters and other parameters
      properties:
        name:
          $ref: '#/components/schemas/recommendation-campaigns-SlotName'
        itemMin:
          $ref: '#/components/schemas/recommendation-campaigns-ItemMin'
        itemMax:
          $ref: '#/components/schemas/recommendation-campaigns-ItemMax'
        filterRules:
          $ref: '#/components/schemas/recommendation-campaigns-RecommendationsCampaignSlotFilterRules'
        distinctFilter:
          $ref: '#/components/schemas/recommendation-campaigns-DistinctFilter'
        attribute:
          type: object
          description: The attribute for rows grouping in the section and attribute recommendation campaign.
          properties:
            name:
              description: Name of attribute for rows grouping.
              type: string
            levelRangeModifier:
              description: Restricts the range of products in recommendations to a particular attribute level.
              type: integer
        numRows:
          type: integer
          description: The number of rows in the section recommendation campaign.
        numItems:
          type: integer
          description: The number of products in each row in the section recommendation campaign.
        useDefaultDistinctFilters:
          type: boolean
          description: Specify if slot should override distinctFilter and use defaultDistinctFiltersConfiguration specified for the feed instead.
        useDefaultItemFilters:
          type: boolean
          description: Specify if slot should override item filters and use defaultItemFilters specified for the feed instead.
      required:
      - name
    recommendation-campaigns-SlotName:
      type: string
      description: Slot name
    recommendation-campaigns-KeepSlotsOrder:
      type: boolean
      default: true
      description: |
        - When `true`, the `data` array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in `data` are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
        - When `false`, the `data` array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.

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

        If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
    recommendation-campaigns-PersonalizeSlotsOrder:
      type: boolean
      default: false
      description: |
        Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.

        If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
    recommendation-campaigns-ItemsSource:
      type: object
      description: |
        The source of item ID or IDs for the recommendation context. This parameter can be passed in all recommendations. In recommendations which don't use item context as part of the recommendation model, the context item can be used only to create filters.

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

        Alternatively, you can pass the `itemId` or `itemsSource` parameter when making a request to generate a recommendation from this campaign. The parameter overrides the settings defined here.
      properties:
        type:
          type: string
          enum:
          - aggregate
          - expression
          description: "Type of the source of item ID or IDs for the recommendation context. \n\nIf the items' source type is 'aggregate', the aggregate result will be used as context items. If the items' source type is 'expression', the expression result will be used as context items.\n"
        id:
          type: string
          description: |
            ID of the items' source for the recommendation context. If the source's type is 'aggregate', this is the aggregate's ID. If the source's type is 'expression', this is the expression's ID.
    recommendation-campaigns-ABTestInfo:
      type: object
      description: Information whether campaign is part of an a/b test
      properties:
        experimentId:
          type: integer
          description: Experiment ID
        variantId:
          type: integer
          description: Variant ID
        status:
          type: string
          enum:
          - NotStarted
          - Running
          - Paused
          - Finished
          description: Status
        isBaseline:
          type: boolean
          description: Information whether campaign is a baseline.
    recommendation-campaigns-BoostingStrategies:
      type: array
      description: Recommendation boosting strategies
      items:
        $ref: '#/components/schemas/recommendation-campaigns-BoostingStrategy'
    recommendation-campaigns-BoostingStrategy:
      type: object
      description: Boosting strategy allows you to promote or demote specific types of products in recommendation scoring
      properties:
        name:
          type: string
          description: Boosting strategy name
        condition:
          type: string
          description: The condition that indicates on which items the boost will be performed. The condition must comply with the rules of creating filters.
        strength:
          type: number
          description: How much influence the strategy has. Values less than 1.0 allow you to degrade items that meet the condition, values greater than 1.0 allow you to promote items that meet the condition. A strength with a value of 1.0 does not change the scoring.
          format: float
          minimum: 0
          maximum: 2.0
          default: 1.0
      required:
      - name
      - condition
      - strength
    recommendation-campaigns-PersonalizedBoostingStrength:
      type: number
      description: How much influence the personalized scoring has. Greater values allow you to promote items that have high personalized score. A strength with a value of 0 does not change the scoring.
      format: float
      minimum: 0
      maximum: 100.0
      default: 0
    recommendation-campaigns-CampaignTitle:
      type: string
      description: Campaign title
    recommendation-campaigns-CampaignTypeSimilar:
      type: string
      description: Campaign type
      enum:
      - similar
    recommendation-campaigns-CampaignTypeCrossSell:
      type: string
      description: Campaign type
      enum:
      - cross-sell
    recommendation-campaigns-CampaignTypeComplementary:
      type: string
      description: Campaign type
      enum:
      - set-complement
    recommendation-campaigns-CampaignTypeLastViewed:
      type: string
      description: Campaign type
      enum:
      - last-viewed
    recommendation-campaigns-CampaignTypeMetrics:
      type: string
      description: Campaign type
      enum:
      - metrics
    recommendation-campaigns-CampaignTypePersonalized:
      type: string
      description: Campaign type
      enum:
      - personalized
    recommendation-campaigns-CampaignTypeVisuallySimilar:
      type: string
      description: Campaign type
      enum:
      - visually-similar
    recommendation-campaigns-CampaignTypeItemComparison:
      type: string
      description: Campaign type
      enum:
      - item-comparison
    recommendation-campaigns-CampaignTypeRecentInteractions:
      type: string
      description: Campaign type
      enum:
      - recent-interactions
    recommendation-campaigns-CampaignTypeSection:
      type: string
      description: Campaign type
      enum:
      - section
    recommendation-campaigns-CampaignTypeAttribute:
      type: string
      description: Campaign type
      enum:
      - attribute
    recommendation-campaigns-CampaignTypeNextInteraction:
      type: string
      description: Campaign type
      enum:
      - next-interaction
    recommendation-campaigns-CampaignTypeExternalItems:
      type: string
      description: Campaign type
      enum:
      - external-items
    recommendation-campaigns-CampaignDescription:
      type: string
      description: Campaign description
    recommendation-campaigns-EndDate:
      type: string
      description: End date for the campaign
    recommendation-campaigns-StartDate:
      type: string
      description: Start date for the campaign
    recommendation-campaigns-ShuffleNumItems:
      type: integer
      description: When this parameter is provided, this many best item recommendations are provided. A number of them, no more than the value of `itemMax`, are chosen randomly for recommendation.
    recommendation-campaigns-ItemMin:
      type: integer
      description: The minimal number of items in the campaign or the minimal number of attribute values in the attribute recommendation campaign.
    recommendation-campaigns-ItemMax:
      type: integer
      description: The maximal number of items in the campaign or the maximal number of attribute values in the attribute recommendation campaign.
    recommendation-campaigns-State:
      type: string
      description: Campaign status
      enum:
      - draft
      - active
      - paused
      - deleted
    recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2:
      type: object
      properties:
        title:
          $ref: '#/components/schemas/recommendation-campaigns-CampaignTitle'
        slug:
          $ref: '#/components/schemas/recommendation-campaigns-Slug'
        description:
          $ref: '#/components/schemas/recommendation-campaigns-CampaignDescription'
        startDate:
          $ref: '#/components/schemas/recommendation-campaigns-StartDate'
        endDate:
          $ref: '#/components/schemas/recommendation-campaigns-EndDate'
        state:
          $ref: '#/components/schemas/recommendation-campaigns-State'
        filterRules:
          $ref: '#/components/schemas/recommendation-campaigns-RecommendationsCampaignFilterRules'
        itemsCatalogId:
          $ref: '#/components/schemas/recommendation-campaigns-ItemsCatalogId'
        slots:
          $ref: '#/components/schemas/recommendation-campaigns-Slots'
        keepSlotsOrder:
          $ref: '#/components/schemas/recommendation-campaigns-KeepSlotsOrder'
        personalizeSlotsOrder:
          $ref: '#/components/schemas/recommendation-campaigns-PersonalizeSlotsOrder'
        boostingStrategies:
          $ref: '#/components/schemas/recommendation-campaigns-BoostingStrategies'
        itemsSource:
          $ref: '#/components/schemas/recommendation-campaigns-ItemsSource'
      required:
      - title
      - type
      - itemsCatalogId
      - slots
    recommendation-campaigns-CrossSellRecommendationCampaignsCreateRequestV2:
      title: Cross-sell
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeCrossSell'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-SetComplementRecommendationCampaignsCreateRequestV2:
      title: Complementary
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeComplementary'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-SetComplementRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-LastViewedRecommendationCampaignsCreateRequestV2:
      title: Last viewed
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeLastViewed'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-PersonalizedRecommendationCampaignsCreateRequestV2:
      title: Personalized
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypePersonalized'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-VisuallySimilarRecommendationCampaignsCreateRequestV2:
      title: Visually similar
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeVisuallySimilar'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-SimilarRecommendationCampaignsCreateRequestV2:
      title: Similar
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeSimilar'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-NextInteractionRecommendationCampaignsCreateRequestV2:
      title: Next interaction
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeNextInteraction'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-ExternalItemsRecommendationCampaignCreateRequestV2:
      title: External items
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeExternalItems'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-ItemComparisonRecommendationCampaignsCreateRequestV2:
      title: Comparison
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeItemComparison'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-MetricsRecommendationCampaignsCreateRequestV2:
      title: Top items
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeMetrics'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-MetricsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-RecentInteractionsRecommendationCampaignsCreateRequestV2:
      title: Recent interactions
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeRecentInteractions'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-SectionRecommendationCampaignsCreateRequestV2:
      title: Section
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeSection'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-SectionRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-AttributeRecommendationCampaignsCreateRequestV2:
      title: Attribute
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeAttribute'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-AttributeRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2'
    recommendation-campaigns-SimpleRecommendationCampaignsV2:
      type: array
      items:
        type: object
        properties:
          campaignId:
            type: string
            description: Campaign ID
          title:
            type: string
            description: Campaign title
          type:
            type: string
            description: Campaign type
    recommendation-campaigns-RecommendationCampaignUpdateFromAnotherCampaign:
      title: Copy from another campaign
      type: object
      properties:
        copyConfigurationFrom:
          type: string
          description: |
            Source campaign ID.

            When you copy from another campaign:
            - the following campaign data is NOT updated:
              - `title`
              - `state`
              - `start_date`
              - `end_date`
              - `campaignId`
              - `createdAt`
            - `modified_by_user_id` changes to the user who performed the update
      required:
      - copyConfigurationFrom
    recommendation-campaigns-RecommendationCampaignDefinitionV2:
      title: Campaign definition
      oneOf:
      - $ref: '#/components/schemas/recommendation-campaigns-SimilarRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-MetricsRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-CrossSellRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-SetComplementRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-LastViewedRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-PersonalizedRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-VisuallySimilarRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-ItemComparisonRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-SectionRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-AttributeRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-NextInteractionRecommendationCampaignsDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-ExternalItemsRecommendationCampaignsDefinitionV2'
      discriminator:
        propertyName: type
        mapping:
          similar: '#/components/schemas/recommendation-campaigns-SimilarRecommendationCampaignsDefinitionV2'
          metrics: '#/components/schemas/recommendation-campaigns-MetricsRecommendationCampaignsDefinitionV2'
          cross-sell: '#/components/schemas/recommendation-campaigns-CrossSellRecommendationCampaignsDefinitionV2'
          set-complement: '#/components/schemas/recommendation-campaigns-SetComplementRecommendationCampaignsDefinitionV2'
          last-viewed: '#/components/schemas/recommendation-campaigns-LastViewedRecommendationCampaignsDefinitionV2'
          personalized: '#/components/schemas/recommendation-campaigns-PersonalizedRecommendationCampaignsDefinitionV2'
          visually-similar: '#/components/schemas/recommendation-campaigns-VisuallySimilarRecommendationCampaignsDefinitionV2'
          item-comparison: '#/components/schemas/recommendation-campaigns-ItemComparisonRecommendationCampaignsDefinitionV2'
          recent-interactions: '#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationCampaignsDefinitionV2'
          section: '#/components/schemas/recommendation-campaigns-SectionRecommendationCampaignsDefinitionV2'
          attribute: '#/components/schemas/recommendation-campaigns-AttributeRecommendationCampaignsDefinitionV2'
          next-interaction: '#/components/schemas/recommendation-campaigns-NextInteractionRecommendationCampaignsDefinitionV2'
          external-items: '#/components/schemas/recommendation-campaigns-ExternalItemsRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-RecommendationCampaignUpdateRequest:
      oneOf:
      - $ref: '#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2'
      - $ref: '#/components/schemas/recommendation-campaigns-RecommendationCampaignUpdateFromAnotherCampaign'
    recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2:
      type: object
      properties:
        campaignId:
          type: string
          description: Campaign ID
        title:
          $ref: '#/components/schemas/recommendation-campaigns-CampaignTitle'
        slug:
          $ref: '#/components/schemas/recommendation-campaigns-Slug'
        description:
          $ref: '#/components/schemas/recommendation-campaigns-CampaignDescription'
        startDate:
          $ref: '#/components/schemas/recommendation-campaigns-StartDate'
        endDate:
          $ref: '#/components/schemas/recommendation-campaigns-EndDate'
        createdAt:
          type: string
          description: Date when the campaign was created
        updatedAt:
          type: string
          description: Date when the campaign was last updated
        state:
          $ref: '#/components/schemas/recommendation-campaigns-State'
        filterRules:
          $ref: '#/components/schemas/recommendation-campaigns-RecommendationsCampaignFilterRules'
        itemsCatalogId:
          $ref: '#/components/schemas/recommendation-campaigns-ItemsCatalogId'
        additionalResponseAttributes:
          type: array
          description: An array of addtional response attributes.
          items:
            type: string
        slots:
          $ref: '#/components/schemas/recommendation-campaigns-Slots'
        keepSlotsOrder:
          $ref: '#/components/schemas/recommendation-campaigns-KeepSlotsOrder'
        personalizeSlotsOrder:
          $ref: '#/components/schemas/recommendation-campaigns-PersonalizeSlotsOrder'
        boostingStrategies:
          $ref: '#/components/schemas/recommendation-campaigns-BoostingStrategies'
        itemsSource:
          $ref: '#/components/schemas/recommendation-campaigns-ItemsSource'
        abTest:
          $ref: '#/components/schemas/recommendation-campaigns-ABTestInfo'
        crossWorkspaceMode:
          $ref: '#/components/schemas/recommendation-campaigns-CrossWorkspaceMode'
      required:
      - title
      - type
      - startDate
      - state
      - itemsCatalogId
    recommendation-campaigns-CrossSellRecommendationCampaignsDefinitionV2:
      title: Cross-sell
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeCrossSell'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-SetComplementRecommendationCampaignsDefinitionV2:
      title: Complementary
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeComplementary'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-SetComplementRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-LastViewedRecommendationCampaignsDefinitionV2:
      title: Last viewed
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeLastViewed'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-PersonalizedRecommendationCampaignsDefinitionV2:
      title: Personalized
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypePersonalized'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-VisuallySimilarRecommendationCampaignsDefinitionV2:
      title: Visually similar
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeVisuallySimilar'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-SimilarRecommendationCampaignsDefinitionV2:
      title: Similar
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeSimilar'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-NextInteractionRecommendationCampaignsDefinitionV2:
      title: Next interaction
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeNextInteraction'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-ExternalItemsRecommendationCampaignsDefinitionV2:
      title: External items
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeExternalItems'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-ItemComparisonRecommendationCampaignsDefinitionV2:
      title: Comparison
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeItemComparison'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-MetricsRecommendationCampaignsDefinitionV2:
      title: Top items
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeMetrics'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-MetricsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-RecentInteractionsRecommendationCampaignsDefinitionV2:
      title: Recent interactions
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeRecentInteractions'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-SectionRecommendationCampaignsDefinitionV2:
      title: Section
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeSection'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-SectionRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-AttributeRecommendationCampaignsDefinitionV2:
      title: Attribute
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendation-campaigns-CampaignTypeAttribute'
          parameters:
            $ref: '#/components/schemas/recommendation-campaigns-AttributeRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2'
    recommendation-campaigns-RecommendationCampaignsResponseV2:
      type: object
      properties:
        meta:
          type: object
          description: Pagination metadata
          properties:
            totalPages:
              type: number
              description: The total number of pages
            totalCount:
              type: number
              description: The total number of campaigns
            page:
              type: number
              description: The current page
            limit:
              type: number
              description: The maximal number of items on a page
            sortedBy:
              type: string
              description: The column (attribute) that the campaigns were sorted by
            ordering:
              type: string
              description: Sorting order
            code:
              type: number
              description: HTTP response code
            link:
              type: array
              description: Links to neighboring pages, first page, and last page in pagination
              items:
                type: object
                properties:
                  url:
                    description: Page URL
                    type: string
                  rel:
                    type: string
                    description: Position of the linked page
                    enum:
                    - first
                    - next
                    - prev
                    - last
        data:
          type: array
          description: Campaign details
          items:
            $ref: '#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2'
        extras:
          type: object
          properties:
            states:
              type: object
              description: Number of campaigns in particular state after applying filters
              properties:
                active:
                  type: number
                draft:
                  type: number
                paused:
                  type: number
    recommendation-campaigns-RecommendationStateChangeRequestV2:
      type: object
      properties:
        state:
          $ref: '#/components/schemas/recommendation-campaigns-State'
        ids:
          type: array
          minItems: 1
          maxItems: 10
          description: An array of campaign IDs.
          items:
            type: string
      required:
      - state
      - ids
    recommendation-campaigns-RecommendationStateChangeResponseV2:
      type: array
      description: Array of updated campaigns IDs.
      items:
        type: string
    recommendations-api-materializer-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
      - timestamp
      - status
      - message
    recommendations-api-materializer-SlotError:
      type: object
      description: Error details, if applicable
      properties:
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
      required:
      - status
      - error
      - message
    recommendations-api-materializer-RecommendationResponseSchemaV2-materializer:
      type: object
      properties:
        data:
          type: array
          description: Recommended items
          items:
            type: object
            properties:
              itemId:
                type: string
                description: Item identifier
            required:
            - itemId
        extras:
          type: object
          description: Additional data
          properties:
            correlationId:
              type: string
              description: Correlation identifier of a recommendation request
            contextItems:
              type: array
              description: A list of context items provided in request
              items:
                type: object
                properties:
                  itemId:
                    type: string
                    description: Item identifier (`itemId` in item catalog)
                additionalProperties: {}
                required:
                - itemId
            slots:
              type: array
              description: A list of slots data
              items:
                type: object
                properties:
                  id:
                    type: integer
                    description: Slot identifier. Matches the index (zero-based numbering) of the slot provided in request
                  name:
                    type: string
                    description: Slot name provided in request
                  itemIds:
                    type: array
                    description: A list of item ids that meet the slot criteria
                    items:
                      type: string
                      description: Item identifier (`itemId` in item catalog)
                  error:
                    $ref: '#/components/schemas/recommendations-api-materializer-SlotError'
                required:
                - id
                - itemIds
          required:
          - correlationId
          - slots
    recommendations-api-materializer-BasePostRecommendationsRequest:
      type: object
      properties:
        items:
          type: array
          description: "An array of item identifiers (`itemId` in the item feed) for the context. This could be, for example, the current basket, or the item that is currently being viewed.  \n\nThis overrides the `itemsSource` settings of the campaign definition.\n\nThis parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.\n\nAlternatively, you can use the `itemsSource` object to get item IDs from an aggregate or expression. `items` and `itemsSource` can't be used at the same time.\n"
          items:
            type: string
            description: '`itemId` from the item feed'
        itemsSource:
          type: object
          description: |
            Source of the Item ID or item IDs for the recommendation context.

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

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

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

            Alternatively, you can pass the `itemId` parameter to define context items directly. Only one of these options is allowed at the same time.
          properties:
            type:
              $ref: '#/components/schemas/recommendations-api-materializer-RecommendationRequestItemsSourceType'
            id:
              $ref: '#/components/schemas/recommendations-api-materializer-RecommendationRequestItemsSourceId'
        itemsExcluded:
          type: array
          minItems: 0
          description: Items (identified by `itemId` in the item feed) that will be excluded from the generated recommendations. For example, items already added to the basket.
          items:
            type: string
            description: Items (identified by `itemId` in the item feed) that will be excluded from the generated recommendations. For example, items already added to the basket.
        additionalFilters:
          type: string
          description: "<hr>\n<strong>IMPORTANT</strong>:\n\n- The `filtersJoiner` attribute is REQUIRED when `additionalFilters` is included. If `filtersJoiner` is missing, the additional filters do not work.  \n- Do NOT send multiple instances of this parameter.\n\n<hr>\n\nAdditional filters. These are merged with the campaign's own filters according to the logic in `filtersJoiner`.\n\nThis parameter must include all the additional filters as a single string, for example `additionalFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).\n"
          example: effectivePrice>300 AND effectivePrice<400
        filtersJoiner:
          type: string
          enum:
          - AND
          - OR
          - REPLACE
          description: |
            Defines the logic of merging `additionalFilters` with the campaign's existing filters.
            - `REPLACE` replaces the campaign's filters with your filters.
            - `AND` matches if both your filters and the campaign filters are met.
            - `OR` matches if at least one of the filters is met.
        additionalElasticFilters:
          type: string
          description: "<hr>\n<strong>IMPORTANT</strong>:\n\n- The `elasticFiltersJoiner` attribute is REQUIRED when `additionalElasticFilters` is included. If `elasticFiltersJoiner` is missing, the additional filters do not work.  \n- Do NOT send multiple instances of this parameter.\n\n<hr>\n\nAdditional elastic filters. These are merged with the campaign's own elastic filters according to the logic in `elasticFiltersJoiner`.\n\nThis parameter must include all the additional filters as a single string, for example `additionalElasticFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).\n"
          example: effectivePrice>300 AND effectivePrice<400
        elasticFiltersJoiner:
          type: string
          enum:
          - AND
          - OR
          - REPLACE
          description: |
            Defines the logic of merging `additionalElasticFilters` with the campaign's existing elastic filters.
            - `REPLACE` replaces the campaign's filters with your filters.
            - `AND` matches if both your filters and the campaign filters are met.
            - `OR` matches if at least one of the filters is met.
        displayAttributes:
          type: array
          minItems: 0
          items:
            type: string
          description: An array of item attributes which value will be returned in a recommendation response. The array will be merged together with the configuration of the recommendation.
        includeContextItems:
          type: boolean
          description: When true, the recommendation response will include context items metadata.
        recommendedItemsFromExternalModel:
          type: array
          minItems: 0
          items:
            type: array
            items:
              type: string
          description: |
            Items provided by an external recommendation model to be returned as recommendation results.

            This parameter is used with campaigns of type "external-items".
        inventoryContext:
          $ref: '#/components/schemas/recommendations-api-materializer-InventoryContext'
        params:
          $ref: '#/components/schemas/recommendations-api-materializer-ParamsMaterializer'
    recommendations-api-materializer-PostRecommendationsRequest:
      allOf:
      - type: object
        properties:
          clientUUID:
            type: string
            description: |
              Profile UUID. This parameter is required for these recommendation types:
                - Personalized
                - Last seen
                - Recent interactions
                - Section
                - Attribute

              This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.
          campaignId:
            type: string
            description: Recommendation campaign ID for establishing the context
          slug:
            type: string
            description: Recommendation campaign slug for establishing the context
      - $ref: '#/components/schemas/recommendations-api-materializer-BasePostRecommendationsRequest'
    recommendations-api-materializer-PostRecommendationsWithIdentifierValueRequest:
      allOf:
      - type: object
        required:
        - identifierValue
        properties:
          identifierValue:
            type: string
            description: Value of the identifier selected in the path attributes
      - $ref: '#/components/schemas/recommendations-api-materializer-BasePostRecommendationsRequest'
    recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest:
      type: object
      properties:
        title:
          $ref: '#/components/schemas/recommendations-api-materializer-CampaignTitle'
        campaignId:
          $ref: '#/components/schemas/recommendations-api-materializer-CampaignId'
        filterRules:
          $ref: '#/components/schemas/recommendations-api-materializer-RecommendationsCampaignFilterRules'
        itemsCatalogId:
          $ref: '#/components/schemas/recommendations-api-materializer-ItemsCatalogId'
        slots:
          $ref: '#/components/schemas/recommendations-api-materializer-Slots'
        keepSlotsOrder:
          $ref: '#/components/schemas/recommendations-api-materializer-KeepSlotsOrder'
        personalizeSlotsOrder:
          $ref: '#/components/schemas/recommendations-api-materializer-PersonalizeSlotsOrder'
        boostingStrategies:
          $ref: '#/components/schemas/recommendations-api-materializer-BoostingStrategies'
        itemsSource:
          $ref: '#/components/schemas/recommendations-api-materializer-ItemsSource'
      required:
      - type
      - itemsCatalogId
      - slots
    recommendations-api-materializer-CampaignTitle:
      type: string
      description: Title of the campaign used in the preview.
      default: preview
    recommendations-api-materializer-CampaignId:
      type: string
      description: ID of the campaign used in the preview.
      default: preview
    recommendations-api-materializer-PreviewCrossSellRecommendationCampaignsCreateRequest:
      title: Cross-sell
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypeCrossSell'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-PreviewSetComplementRecommendationCampaignsCreateRequest:
      title: Complementary
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypeComplementary'
          parameters:
            $ref: '#/components/schemas/recommendations-api-materializer-SetComplementRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-PreviewLastViewedRecommendationCampaignsCreateRequest:
      title: Last viewed
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypeLastViewed'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-PreviewPersonalizedRecommendationCampaignsCreateRequest:
      title: Personalized
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypePersonalized'
          parameters:
            $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-PreviewVisuallySimilarRecommendationCampaignsCreateRequest:
      title: Visually similar
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypeVisuallySimilar'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-PreviewSimilarRecommendationCampaignsCreateRequest:
      title: Similar
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypeSimilar'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-PreviewItemComparisonRecommendationCampaignsCreateRequest:
      title: Comparison
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypeItemComparison'
          parameters:
            allOf:
            - $ref: '#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters'
            - type: object
              properties:
                personalizedBoostingStrength:
                  $ref: '#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-PreviewMetricsRecommendationCampaignsCreateRequest:
      title: Top items
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypeMetrics'
          parameters:
            $ref: '#/components/schemas/recommendations-api-materializer-MetricsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-PreviewRecentInteractionsRecommendationCampaignsCreateRequest:
      title: Recent interactions
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypeRecentInteractions'
          parameters:
            $ref: '#/components/schemas/recommendations-api-materializer-RecentInteractionsRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-PreviewSectionRecommendationCampaignsCreateRequest:
      title: Section
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypeSection'
          parameters:
            $ref: '#/components/schemas/recommendations-api-materializer-SectionRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-PreviewAttributeRecommendationCampaignsCreateRequest:
      title: Attribute
      allOf:
      - type: object
        required:
        - type
        properties:
          type:
            $ref: '#/components/schemas/recommendations-api-materializer-CampaignTypeAttribute'
          parameters:
            $ref: '#/components/schemas/recommendations-api-materializer-AttributeRecommendationsCampaignParameters'
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest'
    recommendations-api-materializer-RecommendationRequestItemsSourceType:
      type: string
      enum:
      - aggregate
      - expression
      description: Type of the items' source.
    recommendations-api-materializer-PersonalizedBoostingStrength:
      type: number
      description: How much influence the personalized scoring has. Greater values allow you to promote items that have high personalized score. A strength with a value of 0 does not change the scoring.
      format: float
      minimum: 0
      maximum: 100.0
      default: 0
    recommendations-api-materializer-BoostingStrategies:
      type: array
      description: Recommendation boosting strategies
      items:
        $ref: '#/components/schemas/recommendations-api-materializer-BoostingStrategy'
    recommendations-api-materializer-BoostingStrategy:
      type: object
      description: Boosting strategy allows you to promote or demote specific types of products in recommendation scoring
      properties:
        name:
          type: string
          description: Boosting strategy name
        condition:
          type: string
          description: The condition that indicates on which items the boost will be performed. The condition must comply with the rules of creating filters.
        strength:
          type: number
          description: How much influence the strategy has. Values less than 1.0 allow you to degrade items that meet the condition, values greater than 1.0 allow you to promote items that meet the condition. A strength with a value of 1.0 does not change the scoring.
          format: float
          minimum: 0
          maximum: 2.0
          default: 1.0
      required:
      - name
      - condition
      - strength
    recommendations-api-materializer-ItemsSource:
      type: object
      description: |
        The source of item ID or IDs for the recommendation context. This parameter can be passed in all recommendations. In recommendations which don't use item context as part of the recommendation model, the context item can be used only to create filters.

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

        Alternatively, you can pass the `itemId` or `itemsSource` parameter when making a request to generate a recommendation from this campaign. The parameter overrides the settings defined here.
      properties:
        type:
          type: string
          enum:
          - aggregate
          - expression
          description: "Type of the source of item ID or IDs for the recommendation context. \n\nIf the items' source type is 'aggregate', the aggregate result will be used as context items. If the items' source type is 'expression', the expression result will be used as context items.\n"
        id:
          type: string
          description: |
            ID of the items' source for the recommendation context. If the source's type is 'aggregate', this is the aggregate's ID. If the source's type is 'expression', this is the expression's ID.
    recommendations-api-materializer-RecommendationRequestItemsSourceId:
      type: string
      description: ID of the items' source (aggregate or expression)
    recommendations-api-materializer-ParamsMaterializer:
      type: object
      example:
        source: mobile
      description: Extra parameters that will be added to the `recommendation.generated` event. The total size must not exceed 500 bytes.
      additionalProperties: true
    recommendations-api-materializer-InventoryContext:
      description: |
        Inventory context used to evaluate inventory-related filters and boosting strategies.
        Can be either a single inventory context or
        a multi-inventory context (set of channel IDs per inventory).
      oneOf:
      - $ref: '#/components/schemas/recommendations-api-materializer-SingleInventoryContext'
      - $ref: '#/components/schemas/recommendations-api-materializer-MultiInventoryContext'
    recommendations-api-materializer-SingleInventoryContext:
      type: object
      description: |
        Single inventory context.
      properties:
        channelIds:
          type: array
          items:
            type: string
          description: |
            List of channel identifiers used to evaluate inventory-related filters and boosting strategies.
      required:
      - channelIds
    recommendations-api-materializer-RecommendationsCampaignFilterRules:
      type: object
      description: Filters that apply to this campaign. If the filters contain an attribute used in the default filters of the recommendation model ([**Settings > AI Configuration**](https://help.synerise.com/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-recommendations/#selecting-recommendation-types-and-default-filters)), that default filter is ignored.
      properties:
        excludePurchasedItems:
          type: boolean
          description: When true, the recommendation results will include only items that the profile hasn't purchased before.
        excludePurchasedItemsSinceDays:
          type: number
          format: integer
          description: Limits the application of the `excludePurchasedItems` filter to a specified number of days.
        elasticExcludePurchasedItems:
          type: boolean
          description: This is a setting for Elastic filters.<br>When true, the recommendation results will include only items that the profile hasn't purchased before.
        elasticExcludePurchasedItemsSinceDays:
          type: number
          format: integer
          description: This is a setting for Elastic filters.<br>Limits the application of the `elasticExcludePurchasedItemsSinceDays` filter to a specified number of days.
    recommendations-api-materializer-ItemsCatalogId:
      type: string
      description: Only items from this catalog will be recommended.
    recommendations-api-materializer-ItemMin:
      type: integer
      description: The minimal number of items in the campaign or the minimal number of attribute values in the attribute recommendation campaign.
    recommendations-api-materializer-ItemMax:
      type: integer
      description: The maximal number of items in the campaign or the maximal number of attribute values in the attribute recommendation campaign.
    recommendations-api-materializer-ShuffleNumItems:
      type: integer
      description: When this parameter is provided, this many best item recommendations are provided. A number of them, no more than the value of `itemMax`, are chosen randomly for recommendation.
    recommendations-api-materializer-RecommendationsCampaignSlotFilterRules:
      type: object
      description: Filters that apply to this campaign
      properties:
        filters:
          type: string
          description: Filtering string
        elasticFilters:
          type: string
          description: Filtering string for Elastic filter
    recommendations-api-materializer-DistinctFilter:
      type: object
      description: Distinct filter allows to specify how many recommended items can have the same value of specified attributes.
      properties:
        elastic:
          type: boolean
          description: It allows to complete the recommended items with items which don't meet the distinct filter criteria.
        filters:
          type: array
          minItems: 1
          maxItems: 5
          description: Array of distinct filters
          items:
            type: object
            properties:
              field:
                type: string
                description: Attribute name
              maxNumItems:
                type: number
                format: integer
                description: Max number of items with the same value of the attribute
              levelRangeModifier:
                type: number
                format: integer
                description: Parameter used (for the `category` field) to specify how many categories to cut off from the end
            required:
            - field
            - maxNumItems
      required:
      - elastic
      - filters
    recommendations-api-materializer-CampaignTypeCrossSell:
      type: string
      description: Campaign type
      enum:
      - cross-sell
    recommendations-api-materializer-CampaignTypeSimilar:
      type: string
      description: Campaign type
      enum:
      - similar
    recommendations-api-materializer-CampaignTypeComplementary:
      type: string
      description: Campaign type
      enum:
      - set-complement
    recommendations-api-materializer-CampaignTypeLastViewed:
      type: string
      description: Campaign type
      enum:
      - last-viewed
    recommendations-api-materializer-CampaignTypeMetrics:
      type: string
      description: Campaign type
      enum:
      - metrics
    recommendations-api-materializer-CampaignTypePersonalized:
      type: string
      description: Campaign type
      enum:
      - personalized
    recommendations-api-materializer-CampaignTypeVisuallySimilar:
      type: string
      description: Campaign type
      enum:
      - visually-similar
    recommendations-api-materializer-CampaignTypeItemComparison:
      type: string
      description: Campaign type
      enum:
      - item-comparison
    recommendations-api-materializer-CampaignTypeRecentInteractions:
      type: string
      description: Campaign type
      enum:
      - recent-interactions
    recommendations-api-materializer-CampaignTypeSection:
      type: string
      description: Campaign type
      enum:
      - section
    recommendations-api-materializer-CampaignTypeAttribute:
      type: string
      description: Campaign type
      enum:
      - attribute
    recommendations-api-materializer-Slots:
      type: array
      minLength: 1
      description: Recommendation slots. Must contain at least one slot with a non-empty `name`.
      items:
        $ref: '#/components/schemas/recommendations-api-materializer-Slot'
    recommendations-api-materializer-Slot:
      type: object
      description: Slot allows you to define a separate recommendation frame with its filters and other parameters
      properties:
        name:
          $ref: '#/components/schemas/recommendations-api-materializer-SlotName'
        itemMin:
          $ref: '#/components/schemas/recommendations-api-materializer-ItemMin'
        itemMax:
          $ref: '#/components/schemas/recommendations-api-materializer-ItemMax'
        filterRules:
          $ref: '#/components/schemas/recommendations-api-materializer-RecommendationsCampaignSlotFilterRules'
        distinctFilter:
          $ref: '#/components/schemas/recommendations-api-materializer-DistinctFilter'
        attribute:
          type: object
          description: The attribute for rows grouping in the section and attribute recommendation campaign.
          properties:
            name:
              description: Name of attribute for rows grouping.
              type: string
            levelRangeModifier:
              description: Restricts the range of products in recommendations to a particular attribute level.
              type: integer
        numRows:
          type: integer
          description: The number of rows in the section recommendation campaign.
        numItems:
          type: integer
          description: The number of products in each row in the section recommendation campaign.
      required:
      - name
    recommendations-api-materializer-SlotName:
      type: string
      description: Slot name
    recommendations-api-materializer-KeepSlotsOrder:
      type: boolean
      default: true
      description: |
        - When `true`, the `data` array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in `data` are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
        - When `false`, the `data` array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.

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

        If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
    recommendations-api-materializer-PersonalizeSlotsOrder:
      type: boolean
      default: false
      description: |
        Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.

        If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
    recommendations-api-materializer-BaseRecommendationsCampaignParameters:
      type: object
      description: Parameters that apply to this campaign
      properties:
        additionalResponseAttributes:
          type: array
          items:
            type: string
          description: An array of additional response attributes.
    recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters'
      - type: object
        properties:
          boostMetric:
            type: string
            description: ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results.
          sortMetric:
            type: string
            description: ID of the metric to sort the results by.
          boostMetricStrength:
            type: number
            description: How much influence the `boostMetric` has. Values less than 0 allow you to demote items that have high metric score, values greater than 0 allow you to promote items that have high metric score. A strength with a value of 0 does not change the scoring.
            format: float
            minimum: -100
            maximum: 100
          shuffleNumItems:
            $ref: '#/components/schemas/recommendations-api-materializer-ShuffleNumItems'
    recommendations-api-materializer-MetricsRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters'
      - type: object
        properties:
          personalizedBoostingStrength:
            $ref: '#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength'
        required:
        - sortMetric
    recommendations-api-materializer-SetComplementRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters'
      - type: object
        properties:
          itemSimilarity:
            type: integer
            minimum: 0
            maximum: 5
            description: Similarity between items in the cart and the recommended items. Higher values decrease the similarity.
          recommendationVariety:
            type: number
            format: float
            minimum: 0
            maximum: 0.9
            description: Similarity between recommended items - higher values will result in more variety within the recommended item set.
          personalizedBoostingStrength:
            $ref: '#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength'
    recommendations-api-materializer-RecentInteractionsRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters'
      - type: object
        properties:
          aggregateId:
            type: string
            description: Id of the aggregate which provides events as a base of recommendations.
          personalizedBoostingStrength:
            $ref: '#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength'
    recommendations-api-materializer-SectionRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters'
      - type: object
        properties:
          metadataCatalogId:
            type: string
    recommendations-api-materializer-AttributeRecommendationsCampaignParameters:
      allOf:
      - $ref: '#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters'
      - type: object
        properties:
          metadataCatalogId:
            type: string
            description: The id of catalog containing attributes metadata.
    recommendations-api-materializer-ClientUUID:
      description: UUID of the client
      type: string
      format: uuid
    recommendations-api-materializer-Item:
      type: string
      description: ID of an entity in the item feed
    recommendations-api-materializer-Items:
      type: array
      description: 'A list of itemIds for building the context. Alternatively, you can use the `itemsSource` parameter to provide the context. Item context is required by these recommendation types: `similar`, `cross-sell`, `set-complement`, `visually-similar`, `item-comparison`. In other recommendation types, the item context is optional, but may be used by the model when scoring items.'
      items:
        $ref: '#/components/schemas/recommendations-api-materializer-Item'
    recommendations-api-materializer-IncludeContextItems:
      type: boolean
      default: false
      description: The recommendation results will include context items from the request.
    recommendations-api-materializer-ParamsReco:
      type: object
      example:
        source: mobile
      description: Extra parameters that will be added to the `recommendation.generated` event. The total size must not exceed 500 bytes.
    recommendations-api-materializer-MultiInventoryContext:
      type: object
      description: |
        Multi-inventory context where each inventory can have its own set of channel IDs.
      properties:
        inventoryCatalogs:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/recommendations-api-materializer-InventoryContextDefinition'
          description: |
            Map of inventory ID to inventory context definition. Each inventory can have its own set of channel IDs.
      required:
      - inventoryCatalogs
    recommendations-api-materializer-InventoryContextDefinition:
      type: object
      description: |
        Context definition for a specific inventory.
      properties:
        channelIds:
          type: array
          items:
            type: string
          description: |
            List of channel identifiers for this specific inventory.
    recommendations-api-materializer-PreviewRecommendationContext:
      type: object
      properties:
        clientUUID:
          $ref: '#/components/schemas/recommendations-api-materializer-ClientUUID'
        items:
          $ref: '#/components/schemas/recommendations-api-materializer-Items'
        includeContextItems:
          $ref: '#/components/schemas/recommendations-api-materializer-IncludeContextItems'
        params:
          $ref: '#/components/schemas/recommendations-api-materializer-ParamsReco'
        inventoryContext:
          $ref: '#/components/schemas/recommendations-api-materializer-InventoryContext'
    recommendations-config-CrossWorkspaceMode:
      type: object
      description: Cross-workspace mode configuration
      properties:
        enabled:
          type: boolean
          description: Whether cross-workspace mode is enabled
    recommendations-config-CrossWorkspaceModeStatus:
      type: object
      description: Cross-workspace mode status for a model
      properties:
        state:
          type: string
          description: |
            Cross-workspace mode state.
              - Disabled: cross-workspace mode is disabled.
              - Events: cross-workspace events are enabled.
              - Full: cross-workspace model training and events are enabled.
          enum:
          - Disabled
          - Events
          - Full
      required:
      - state
    recommendations-config-ModelEnabled:
      type: boolean
      description: '`true` when the model is enabled for this feed'
    recommendations-config-DefaultFilters:
      type: array
      deprecated: true
      description: "Default filters that apply to all recommendation requests from this feed and model. For syntax, see [https://hub.synerise.com/developers/iql/](https://hub.synerise.com/developers/iql/).\nThis field is kept in bidirectional sync with `defaultItemFiltersConfiguration`\n- When `defaultItemFiltersConfiguration` is provided and non-empty, `defaultFilters` is automatically derived from it (the `iqlExpression` values).\n- When only `defaultFilters` is provided, `defaultItemFiltersConfiguration` is automatically derived from it. \n- If both are provided, `defaultItemFiltersConfiguration` takes priority.\n"
      items:
        type: string
    recommendations-config-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
      required:
      - timestamp
      - status
      - message
    recommendations-config-SyneriseError:
      type: object
      properties:
        error:
          type: string
          description: A description of the error
        errorCode:
          type: string
          description: Synerise error code. See [API error code reference](https://developers.synerise.com/errors.html).
        httpStatus:
          type: string
          description: HTTP code of the error
        message:
          type: string
          description: A description of the error
        path:
          type: string
          description: The path to the resource where the error occurred
        status:
          type: number
          description: Internal status
        timestamp:
          type: string
          format: date-time
          description: Date and time when the problem occurred.
        requestId:
          type: string
          description: Unique ID for troubleshooting
        traceId:
          type: string
          description: Unique ID for troubleshooting
    recommendations-config-ItemsCreatedAt:
      type: string
      format: date-time
      description: Time of catalog creation, ISO 8601
    recommendations-config-ItemsUpdatedAt:
      type: string
      format: date-time
      description: Time of the last successful item update, ISO 8601
    recommendations-config-PersonalizedPromotionsSchema:
      type: object
      description: |
        Personalized promotions configuration for this catalog. Only one catalog per workspace may have promotions
        enabled at a time.
      properties:
        enabled:
          type: boolean
          description: Whether the promotions data source is enabled for this catalog.
    recommendations-config-ModelsSchema:
      description: Model configurations for this feed
      type: object
      properties:
        complementToSet:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelSchema'
        complementary:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelSchema'
        lastViewed:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelSchema'
        metricsBased:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelSchema'
        personalized:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelSchema'
        section:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelSchema'
        attribute:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelSchema'
        similar:
          $ref: '#/components/schemas/recommendations-config-RecommendationModelWithTrainingSchema'
        visualSimilarity:
          $ref: '#/components/schemas/recommendations-config-VisualRecommendationModelSchema'
        itemComparison:
          $ref: '#/components/schemas/recommendations-config-RecommendationModelWithTrainingSchema'
        recentInteractions:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelSchema'
    recommendations-config-BasicRecommendationModelSchema:
      type: object
      properties:
        enabled:
          $ref: '#/components/schemas/recommendations-config-ModelEnabled'
        defaultFilters:
          $ref: '#/components/schemas/recommendations-config-DefaultFilters'
        defaultItemFiltersConfiguration:
          $ref: '#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration'
        defaultDistinctFiltersConfiguration:
          $ref: '#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration'
    recommendations-config-RecommendationModelWithTrainingSchema:
      type: object
      properties:
        enabled:
          $ref: '#/components/schemas/recommendations-config-ModelEnabled'
        defaultFilters:
          $ref: '#/components/schemas/recommendations-config-DefaultFilters'
        defaultItemFiltersConfiguration:
          $ref: '#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration'
        defaultDistinctFiltersConfiguration:
          $ref: '#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration'
        training:
          type: object
          description: Training configuration, applicable in some models
          properties:
            fields:
              type: array
              items:
                type: string
                example: title
    recommendations-config-VisualRecommendationModelSchema:
      type: object
      properties:
        enabled:
          $ref: '#/components/schemas/recommendations-config-ModelEnabled'
        defaultFilters:
          $ref: '#/components/schemas/recommendations-config-DefaultFilters'
        defaultItemFiltersConfiguration:
          $ref: '#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration'
        training:
          type: object
          description: Training configuration, applicable in some models
          properties:
            imageLink:
              type: string
            additionalImageLinks:
              type: string
            availability:
              type: string
    recommendations-config-DisplayedAttributesSchema:
      description: Attributes shown in the recommendation results
      example:
      - brand
      - color
      - title
      type: array
      items:
        type: string
    recommendations-config-LinkAttributeSchema:
      description: Name of the attribute which will be used as link to an item
      type: string
    recommendations-config-LinkAttributesSchema:
      description: Names of attributes which will be used as link to an item
      type: array
      items:
        $ref: '#/components/schemas/recommendations-config-LinkAttributeSchema'
    recommendations-config-DistinctAttributesSchema:
      description: Names of attributes which can be used in distinct filters
      type: array
      items:
        allOf:
        - type: string
    recommendations-config-PreviewAttributesSchema:
      description: Mapping of attributes which will be used for preview
      type: object
      properties:
        title:
          type: string
          description: The name of the attribute in the source catalog that stores the title.
        category:
          type: string
          description: The name of the attribute in the source catalog that stores the category.
        imageLink:
          type: string
          description: The name of the attribute in the source catalog that stores the item's image link.
        itemLink:
          type: string
          description: The name of the attribute in the source catalog that stores the item's page link.
        price:
          type: string
          description: The name of the attribute in the source catalog that stores the item's price.
        additionalAttributes:
          type: object
          description: Other parameter mappings
          additionalProperties:
            type: string
    recommendations-config-RecommendationModelStateSchema:
      type: object
      description: Current state of the model
      properties:
        name:
          type: string
          description: |
            State name.
              - ServingDisabled: the model wasn't enabled in the configuration.
              - Active: the model is active and working.
              - NotEnoughData: the model can't be trained because there aren't enough events in the database.
              - TrainingInProgress: the model is currently being trained.
              - TrainingDisabled: the model didn't receive any requests in 30 days and isn't scheduled for training. It can still accept requests and return a recommendation. If a request to the model is made, training is re-enabled.
              - Inactive: the model didn't receive any requests for 60 days and was deactivated. It must be re-enabled in the configuration.
          enum:
          - ServingDisabled
          - TrainingDisabled
          - TrainingInProgress
          - NotEnoughData
          - Active
          - Inactive
        cause:
          type: string
          description: The cause of the transition into the current state
          enum:
          - Inactivity
        changedAfterNumOfDays:
          type: number
          description: The number of days after which a model was transitioned to the `TrainingDisabled` or `ServingDisabled` state.
      required:
      - name
    recommendations-config-RecommendationRequirements:
      type: object
      description: Model requirements
      properties:
        lastCheckDate:
          type: string
          format: date-time
          description: Date and time when the requirements were last checked.
        minimal:
          type: array
          description: Minimum requirements of the model type
          items:
            $ref: '#/components/schemas/recommendations-config-RecommendationSingleRequirement'
        recommended:
          type: array
          description: Recommended requirements of the model type
          items:
            $ref: '#/components/schemas/recommendations-config-RecommendationSingleRequirement'
    recommendations-config-DefaultDistinctFiltersConfiguration:
      description: Default distinct filters configuration that can be applied to a specific campaign slot.
      type: object
      properties:
        filters:
          description: List of default distinct filters.
          type: array
          items:
            $ref: '#/components/schemas/recommendations-config-DistinctFilterConfigEntry'
        elastic:
          description: Specify if default distinct filters are elastic.
          type: boolean
    recommendations-config-DefaultItemFiltersConfiguration:
      description: |
        Default item filters configuration that apply to all recommendation campaigns.
        This field is kept in bidirectional sync with `defaultFilters`.
        - When this field is provided and non-empty, it takes priority and `defaultFilters` is derived from the `iqlExpression` values.
        - When only `defaultFilters` is provided, this field is automatically populated from it. This format supports additional metadata such as `description` per filter entry.
      type: object
      properties:
        filters:
          description: List of individual default item filters.
          type: array
          items:
            $ref: '#/components/schemas/recommendations-config-ItemFilterConfigEntry'
    recommendations-config-DistinctFilterConfigEntry:
      type: object
      properties:
        field:
          type: string
          description: Name of the attribute for distinct filter
        levelRangeModifier:
          type: integer
          description: |
            Applies only when the attribute is `category`. Controls how many levels of the category chain are used for filtering.
            - A positive value `N` removes `N` levels from the right (lowest/deepest levels), always keeping at least one level.
            - A negative value `-N` keeps only the first `N` levels from the left (highest levels).
            - `0` (default) leaves the category chain unchanged.
            For example, if the category is `A > B > C > D`
            - using `1` changes the category to `A > B > C`
            - using `2` changes the category to `A > B`
            - using `3` changes the category to `A`
            - using `-1` changes the category to `A`
            - using `-2` changes the category to `A > B`
            - using `-3` changes the category to `A > B > C`
        maxNumItems:
          type: integer
          description: The maximum number of items which can have the same attribute value
        description:
          type: string
          maxLength: 300
          description: Human-readable description of the default distinct filter, cannot be longer than 300 characters.
    recommendations-config-ItemFilterConfigEntry:
      type: object
      properties:
        iqlExpression:
          type: string
          description: IQL expression of item filters that will be applied to all recommendation campaigns
        description:
          type: string
          maxLength: 300
          description: Human readable description of the item filter, cannot be longer than 300 characters.
    recommendations-config-RecommendationSingleRequirement:
      type: object
      properties:
        code:
          type: string
          description: Unique code of the requirement
        explanation:
          type: string
          description: Explanation of the requirement, with variables that should be replaced with with a value from `values` to display a human-readable explanation.
        isSatisfied:
          type: boolean
          description: '`true` when the requirement is satisfied.'
        values:
          type: object
          description: Map of pairs (key, value) where keys in explanation field should be replaced with values. The keys correspond to the variables in in `description`, their names depend on the model type.
          additionalProperties:
            type: number
    recommendations-config-RecommendationFeedConfigurationWithModelsStateV3Schema:
      type: object
      properties:
        config:
          $ref: '#/components/schemas/recommendations-config-RecommendationCatalogConfigurationV3Schema'
        modelsState:
          $ref: '#/components/schemas/recommendations-config-RecommendationCatalogModelsStateV3ArraySchema'
    recommendations-config-RecommendationCatalogConfigurationV3Schema:
      type: object
      description: Configuration of the item feed
      properties:
        displayedAttributes:
          $ref: '#/components/schemas/recommendations-config-DisplayedAttributesSchema'
        linkAttribute:
          $ref: '#/components/schemas/recommendations-config-LinkAttributeSchema'
        linkAttributes:
          $ref: '#/components/schemas/recommendations-config-LinkAttributesSchema'
        models:
          $ref: '#/components/schemas/recommendations-config-ModelsV3Schema'
        itemsCreatedAt:
          $ref: '#/components/schemas/recommendations-config-ItemsCreatedAt'
        itemsUpdatedAt:
          $ref: '#/components/schemas/recommendations-config-ItemsUpdatedAt'
        crossWorkspaceMode:
          $ref: '#/components/schemas/recommendations-config-CrossWorkspaceMode'
    recommendations-config-ModelsV3Schema:
      description: Model configurations for this feed
      type: object
      properties:
        complementToSet:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema'
        complementary:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema'
        lastViewed:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema'
        metricsBased:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema'
        personalized:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema'
        section:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema'
        attribute:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema'
        similar:
          $ref: '#/components/schemas/recommendations-config-RecommendationModelWithTrainingV3Schema'
        visualSimilarity:
          $ref: '#/components/schemas/recommendations-config-VisualRecommendationModelV3Schema'
        itemComparison:
          $ref: '#/components/schemas/recommendations-config-RecommendationModelWithTrainingV3Schema'
        recentInteractions:
          $ref: '#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema'
    recommendations-config-BasicRecommendationModelV3Schema:
      type: object
      properties:
        defaultFilters:
          $ref: '#/components/schemas/recommendations-config-DefaultFilters'
        defaultItemFiltersConfiguration:
          $ref: '#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration'
        defaultDistinctFiltersConfiguration:
          $ref: '#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration'
    recommendations-config-RecommendationModelWithTrainingV3Schema:
      type: object
      properties:
        defaultFilters:
          $ref: '#/components/schemas/recommendations-config-DefaultFilters'
        defaultItemFiltersConfiguration:
          $ref: '#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration'
        defaultDistinctFiltersConfiguration:
          $ref: '#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration'
        training:
          type: object
          description: Training configuration, applicable in some models
          properties:
            fields:
              type: array
              items:
                type: string
                example: title
    recommendations-config-VisualRecommendationModelV3Schema:
      type: object
      properties:
        defaultFilters:
          $ref: '#/components/schemas/recommendations-config-DefaultFilters'
        defaultItemFiltersConfiguration:
          $ref: '#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration'
        training:
          type: object
          description: Training configuration, applicable in some models
          properties:
            imageLink:
              type: string
            additionalImageLinks:
              type: string
            availability:
              type: string
    recommendations-config-RecommendationCatalogModelsStateV3ArraySchema:
      type: array
      description: Models and their states
      items:
        $ref: '#/components/schemas/recommendations-config-RecommendationModelV3Schema'
    recommendations-config-RecommendationModelV3Schema:
      type: object
      properties:
        modelType:
          type: string
          description: Model type
        enabled:
          type: boolean
          description: '`true` when the model is enabled'
        state:
          $ref: '#/components/schemas/recommendations-config-RecommendationModelStateSchema'
        requirements:
          $ref: '#/components/schemas/recommendations-config-RecommendationRequirements'
        crossWorkspaceMode:
          $ref: '#/components/schemas/recommendations-config-CrossWorkspaceModeStatus'
      required:
      - modelType
      - enabled
      - state
    recommendations-config-TrainingCustomEventsSchema:
      type: object
      properties:
        meta:
          type: object
          description: Pagination metadata. Present only when the `includeMeta` query parameter is `true`.
          properties:
            totalPages:
              type: number
              description: The total number of pages
            totalCount:
              type: number
              description: The total number of events
            page:
              type: number
              description: The current page
            limit:
              type: number
              description: The maximal number of items on a page
            code:
              type: number
              description: HTTP response code
            link:
              type: array
              description: Links to neighboring pages, first page, and last page in pagination
              items:
                type: object
                properties:
                  url:
                    description: Page URL
                    type: string
                  rel:
                    type: string
                    description: Position of the linked page
                    enum:
                    - first
                    - next
                    - prev
                    - last
        data:
          type: array
          description: Custom events that can be used as model training inputs
          items:
            $ref: '#/components/schemas/recommendations-config-TrainingCustomEventSchema'
    recommendations-config-TrainingCustomEventSchema:
      type: object
      description: A custom event definition retrieved from the params-collector service.
      properties:
        id:
          type: integer
          format: int64
          description: Internal identifier of the event
        name:
          type: string
          description: Event name (action name in the params-collector service)
        businessProfileId:
          type: integer
          format: int64
          description: ID of the business profile that owns the event
        hidden:
          type: boolean
          description: '`true` when the event is hidden in the params-collector service'
        translation:
          type: object
          description: Display translation of the event
          properties:
            label:
              type: string
              description: Human-readable label
            type:
              type: string
              description: Translation type
            description:
              type: string
              description: Optional description
          required:
          - label
          - type
        position:
          type: integer
          description: Display order of the event
        namespace:
          type: string
          description: Namespace the event belongs to
        ttl:
          type: object
          description: Event time-to-live configuration
          properties:
            type:
              type: string
              description: TTL unit (for example `DAY`)
            value:
              type: integer
              description: TTL value in units specified by `type`
          required:
          - type
          - value
        createdAt:
          type: string
          format: date-time
          description: Time when the event was created, ISO 8601
        modifiedAt:
          type: string
          format: date-time
          description: Time when the event was last modified, ISO 8601
        count:
          type: integer
          format: int64
          description: Total number of occurrences of this event
      required:
      - name
      - businessProfileId
      - hidden
      - translation
      - position
      - namespace
      - createdAt
      - modifiedAt
    recommendations-rust-all-RecommendationResponseSchemaV2:
      type: object
      properties:
        extras:
          type: object
          description: Additional data
          properties:
            correlationId:
              type: string
              description: Correlation ID that allows you to link the "item clicked" events with the "recommendation generated" event that's created for each recommendation result.
            contextItems:
              type: array
              nullable: true
              description: A list of context items provided in the request
              items:
                type: object
                properties:
                  itemId:
                    type: string
                    description: Item identifier (`itemId` in item catalog)
                additionalProperties: true
                required:
                - itemId
            campaignId:
              type: string
              description: ID of the context campaign
              nullable: true
        data:
          type: array
          description: A list of recommended items
          items:
            type: object
            properties:
              itemId:
                type: string
                description: Item identifier (`itemId` in item catalog)
            additionalProperties: {}
            required:
            - itemId
    recommendations-rust-all-SlotsRecommendationResponseSchemaV2:
      allOf:
      - $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
      - type: object
        properties:
          extras:
            type: object
            properties:
              slots:
                type: array
                description: A list of slots data
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Slot identifier. Matches the index (zero-based numbering) of the slot provided in request
                    name:
                      type: string
                      description: Slot name provided in request
                    itemIds:
                      type: array
                      description: A list of item ids that meet the slot criteria
                      items:
                        type: string
                        description: Item identifier (`itemId` in item catalog)
                    error:
                      $ref: '#/components/schemas/recommendations-rust-all-Error'
                  required:
                  - id
            required:
            - slots
    recommendations-rust-all-SectionsSlotsRecommendationResponseSchemaV2:
      allOf:
      - $ref: '#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2'
      - type: object
        properties:
          extras:
            type: object
            properties:
              slots:
                type: array
                description: A list of slots data
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Slot identifier. Matches the index (zero-based numbering) of the slot provided in request
                    name:
                      type: string
                      description: Slot name provided in request
                    rows:
                      type: array
                      description: A list of rows that groups items with the same attribute value
                      items:
                        type: object
                        properties:
                          attributeValue:
                            type: string
                            description: The attribute value used to group items in the row
                          itemIds:
                            type: array
                            description: A list of item ids that meet the slot and row criteria
                            items:
                              type: string
                              description: Item identifier (`itemId` in item catalog)
                          metadata:
                            type: object
                            description: Metadata catalog attributes
                            properties:
                              itemId:
                                type: string
                                description: Item identifier (`itemId` in item metadata catalog)
                            additionalProperties: {}
                            required:
                            - itemId
                    error:
                      $ref: '#/components/schemas/recommendations-rust-all-Error'
                  required:
                  - id
            required:
            - slots
    recommendations-rust-all-BaseBodySchemaV2:
      type: object
      properties:
        campaignId:
          type: string
          description: The campaignId which will be passed as *utm_campaign* in a link to the recommended item.
          default: defaultCampaign
        campaignName:
          type: string
          description: The campaign name which will be included in the recommendation.generated event.
        catalogId:
          type: string
          description: ID (_not_ name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed.
          default: default
        clientUUID:
          type: string
          description: |
            Profile UUID. This parameter is required for these recommendation types:
              - Personalized
              - Last seen
              - Recent interactions
              - Section
              - Attribute

            This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.
        contextItemIds:
          type: array
          description: Item identifiers, equal to `itemId` from the *item feed*. They can be used to define the item context of the query.
          items:
            type: string
            description: Item identifier (`itemId` in item catalog)
        includeContextItems:
          type: boolean
          default: false
          description: The recommendation results will include context items from the request.
        filterRules:
          $ref: '#/components/schemas/recommendations-rust-all-FilterRulesV2'
        displayAttributes:
          type: string
          description: Attributes to be returned
        abTestContext:
          $ref: '#/components/schemas/recommendations-rust-all-AbTestContext'
        params:
          $ref: '#/components/schemas/recommendations-rust-all-ParamsReco'
        inventoryContext:
          $ref: '#/components/schemas/recommendations-rust-all-InventoryContext'
    recommendations-rust-all-AbTestContext:
      type: object
      description: A/B test context.
      properties:
        experimentId:
          type: integer
          description: Experiment ID which will be included in the `recommendation.generated` event.
        variantId:
          type: string
          description: Campaign variant ID which will be included in the `recommendation.generated` event.
        requestedCampaignId:
          type: string
          description: Requested campaign ID which will be included in the `recommendation.generated` event.
    recommendations-rust-all-SlotsBodySchemaV2:
      allOf:
      - $ref: '#/components/schemas/recommendations-rust-all-BaseBodySchemaV2'
      - type: object
        properties:
          keepSlotsOrder:
            type: boolean
            default: true
            description: |
              - When `true`, the `data` array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in `data` are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
              - When `false`, the `data` array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.

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

              If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
          personalizeSlotsOrder:
            type: boolean
            default: false
            description: |
              Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.

              If you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.
          sortMetric:
            type: string
            description: ID of the metric to sort the results by. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).
          boostingParameters:
            $ref: '#/components/schemas/recommendations-rust-all-BoostingParametersV2'
          boostingStrategies:
            type: array
            description: Boosting strategies
            items:
              $ref: '#/components/schemas/recommendations-rust-all-BoostingStrategyV2'
          crossWorkspaceMode:
            $ref: '#/components/schemas/recommendations-rust-all-CrossWorkspaceMode'
          slots:
            type: array
            description: Slot definitions. To apply default values and fetch all the results as a single slot, send `slots` as an array with one empty object.
            minItems: 1
            items:
              $ref: '#/components/schemas/recommendations-rust-all-SlotSchemaV2Rust'
        required:
        - slots
    recommendations-rust-all-SectionsSlotsBodySchemaV2:
      allOf:
      - $ref: '#/components/schemas/recommendations-rust-all-BaseBodySchemaV2'
      - type: object
        properties:
          metadataCatalogId:
            $ref: '#/components/schemas/recommendations-rust-all-MetadataCatalogId'
          slots:
            type: array
            description: Slots data
            items:
              $ref: '#/components/schemas/recommendations-rust-all-SectionSlotSchemaV2'
        required:
        - slots
    recommendations-rust-all-AttributesSlotsBodySchemaV2:
      allOf:
      - $ref: '#/components/schemas/recommendations-rust-all-BaseBodySchemaV2'
      - type: object
        properties:
          metadataCatalogId:
            $ref: '#/components/schemas/recommendations-rust-all-MetadataCatalogId'
          slots:
            type: array
            description: Slots data
            items:
              $ref: '#/components/schemas/recommendations-rust-all-AttributeSlotSchemaV2'
        required:
        - slots
    recommendations-rust-all-BoostingParametersV2:
      type: object
      description: Result boosting parameters
      properties:
        metric:
          type: string
          description: ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).
        strength:
          type: number
          description: How much influence the `boostMetric` has. Values less than 0 allow you to demote items that have high metric score, values greater than 0 allow you to promote items that have high metric score. A strength with a value of 0 does not change the scoring.
          format: float
        personalizedBoostingStrength:
          type: number
          description: How much influence the personalized scoring has. Greater values allow you to promote items that have high personalized score. A strength with a value of 0 does not change the scoring.
          format: float
          minimum: 0
          maximum: 100.0
          default: 0
    recommendations-rust-all-BoostingStrategyV2:
      type: object
      description: Boosting strategy allows you to promote or demote specific types of products in recommendation scoring
      properties:
        name:
          type: string
          description: Boosting strategy name
        condition:
          type: string
          description: The condition that indicates on which items the boost will be performed. The condition must comply with the rules of creating filters.
        strength:
          type: number
          description: How much influence the strategy has. Values less than 1.0 allow you to demote items that meet the condition, values greater than 1.0 allow you to promote items that meet the condition. A strength with a value of 1.0 does not change the scoring.
          format: float
          minimum: 0
          maximum: 2.0
          default: 1.0
      required:
      - name
      - condition
      - strength
    recommendations-rust-all-CrossWorkspaceMode:
      type: object
      description: Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available.
      properties:
        enabled:
          type: boolean
          description: Defines if cross-workspace mode is enabled.
    recommendations-rust-all-FilterRulesV2:
      type: object
      description: Filter configuration
      properties:
        excludePurchasedItems:
          $ref: '#/components/schemas/recommendations-rust-all-ExcludePurchasedItems'
        excludePurchasedItemsSinceDays:
          $ref: '#/components/schemas/recommendations-rust-all-ExcludePurchasedItemsSince'
        elasticExcludePurchasedItems:
          $ref: '#/components/schemas/recommendations-rust-all-ExcludePurchasedItems'
        elasticExcludePurchasedItemsSinceDays:
          $ref: '#/components/schemas/recommendations-rust-all-ExcludePurchasedItemsSince'
    recommendations-rust-all-SlotSchemaV2Rust:
      type: object
      properties:
        name:
          type: string
          description: Slot name
        minNumItems:
          $ref: '#/components/schemas/recommendations-rust-all-MinNumItems'
        maxNumItems:
          $ref: '#/components/schemas/recommendations-rust-all-MaxNumItems'
        shuffleNumItems:
          $ref: '#/components/schemas/recommendations-rust-all-ShuffleNumItemsRust'
        filters:
          $ref: '#/components/schemas/recommendations-rust-all-Filter'
        elasticFilters:
          $ref: '#/components/schemas/recommendations-rust-all-ElasticFilter'
        distinctFilter:
          $ref: '#/components/schemas/recommendations-rust-all-DistinctFilterReco'
    recommendations-rust-all-SectionSlotSchemaV2:
      type: object
      properties:
        name:
          type: string
          description: Slot name
        attribute:
          $ref: '#/components/schemas/recommendations-rust-all-Attribute'
        numRows:
          $ref: '#/components/schemas/recommendations-rust-all-NumRows'
        numItems:
          $ref: '#/components/schemas/recommendations-rust-all-NumItems'
        filters:
          $ref: '#/components/schemas/recommendations-rust-all-Filter'
        elasticFilters:
          $ref: '#/components/schemas/recommendations-rust-all-ElasticFilter'
      required:
      - attribute
      - numRows
      - numItems
    recommendations-rust-all-AttributeSlotSchemaV2:
      type: object
      properties:
        name:
          type: string
          description: Slot name
        attribute:
          $ref: '#/components/schemas/recommendations-rust-all-Attribute'
        minNumItems:
          $ref: '#/components/schemas/recommendations-rust-all-MinNumItems'
        maxNumItems:
          $ref: '#/components/schemas/recommendations-rust-all-MaxNumItems'
        filters:
          $ref: '#/components/schemas/recommendations-rust-all-Filter'
        elasticFilters:
          $ref: '#/components/schemas/recommendations-rust-all-ElasticFilter'
      required:
      - attribute
    recommendations-rust-all-MetricsBodySchemaV2:
      allOf:
      - $ref: '#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2'
      - type: object
        required:
        - sortMetric
        - clientUUID
    recommendations-rust-all-MetadataCatalogId:
      type: string
      description: ID of the catalog which stores attribute metadata
    recommendations-rust-all-DistinctFilterReco:
      type: object
      description: Distinct filters allow you to specify how many recommended items can have the same value of specified attributes.
      properties:
        elastic:
          type: boolean
          description: When TRUE, allows to complete the recommended items with items which don't meet the distinct filter criteria.
        filters:
          type: array
          minItems: 1
          maxItems: 5
          description: Array of distinct filters
          items:
            type: object
            properties:
              field:
                type: string
                description: Attribute name
              maxNumItems:
                type: number
                format: integer
                description: Max number of items with the same value of the attribute
              levelRangeModifier:
                type: number
                format: integer
                description: Parameter used (for the `category` field) to specify how many categories to cut off from the end
            required:
            - field
            - maxNumItems
      required:
      - elastic
      - filters
    recommendations-rust-all-Attribute:
      type: object
      description: The attribute for grouping rows in the section and attribute recommendations.
      properties:
        name:
          description: Name of the attribute
          type: string
        levelRangeModifier:
          description: Restricts the range of items in recommendations to a particular attribute level.
          type: integer
      required:
      - name
    recommendations-rust-all-NumRows:
      type: integer
      description: The number of rows in the slot.
      minimum: 1
      maximum: 10
    recommendations-rust-all-NumItems:
      type: integer
      description: The number of items in each row in the slot.
      minimum: 1
      maximum: 100
    recommendations-rust-all-MinNumItems:
      type: integer
      description: The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error.
      default: 1
      minimum: 1
    recommendations-rust-all-MaxNumItems:
      type: integer
      description: The maximal number of returned item recommendations.
      maximum: 100
      default: 5
    recommendations-rust-all-ShuffleNumItemsRust:
      type: integer
      description: When this parameter is provided, this many best item recommendations are provided. A number of them, no more than the value of `maxItemNums`, are chosen randomly for recommendation.
      minimum: 1
      maximum: 200
    recommendations-rust-all-Filter:
      type: string
      description: "This string defines the criteria that an item must meet in order to be considered for recommendation.  \nFor information on building filters, see [\"Items Query Language (IQL)\" in the Developer Guide](https://hub.synerise.com/developers/iql/).\n"
    recommendations-rust-all-ElasticFilter:
      description: |
        This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.
        For information on building filters, see ["Items Query Language (IQL)" in the Developer Guide](https://hub.synerise.com/developers/iql/).
      type: string
    recommendations-rust-all-ExcludePurchasedItems:
      description: "When true, the recommendation results will include only items that the Profile hasn't purchased before.  \n**IMPORTANT**: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation.\n"
      type: boolean
      default: false
    recommendations-rust-all-ExcludePurchasedItemsSince:
      description: Limits the application of the `excludePurchasedItems` filter to a specified number of days.
      type: integer
    recommendations-rust-all-Error:
      type: object
      description: Details of an error, if applicable
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
      - timestamp
      - status
      - message
    recommendations-rust-all-ParamsReco:
      type: object
      example:
        source: mobile
      description: Extra parameters that will be added to the `recommendation.generated` event. The total size must not exceed 500 bytes.
    recommendations-rust-all-InventoryContext:
      description: |
        Inventory context used to evaluate inventory-related filters and boosting strategies.
        Can be either a single inventory context or
        a multi-inventory context (set of channel IDs per inventory).
      oneOf:
      - $ref: '#/components/schemas/recommendations-rust-all-SingleInventoryContext'
      - $ref: '#/components/schemas/recommendations-rust-all-MultiInventoryContext'
    recommendations-rust-all-SingleInventoryContext:
      type: object
      description: |
        Single inventory context.
      properties:
        channelIds:
          type: array
          items:
            type: string
          description: |
            List of channel identifiers used to evaluate inventory-related filters and boosting strategies.
      required:
      - channelIds
    recommendations-rust-all-MultiInventoryContext:
      type: object
      description: |
        Multi-inventory context where each inventory can have its own set of channel IDs.
      properties:
        inventoryCatalogs:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/recommendations-rust-all-InventoryContextDefinition'
          description: |
            Map of inventory ID to inventory context definition. Each inventory can have its own set of channel IDs.
      required:
      - inventoryCatalogs
    recommendations-rust-all-InventoryContextDefinition:
      type: object
      description: |
        Context definition for a specific inventory.
      properties:
        channelIds:
          type: array
          items:
            type: string
          description: |
            List of channel identifiers for this specific inventory.
      required:
      - channelIds
    sauth-OauthAuthBody:
      required:
      - accessToken
      - apiKey
      - uuid
      type: object
      properties:
        accessToken:
          type: string
          description: OAuth token
        apiKey:
          type: string
          description: Profile API key (same as for Profile login)
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        agreements:
          $ref: '#/components/schemas/sauth-Agreements'
        attributes:
          $ref: '#/components/schemas/sauth-Attributes'
        tags:
          $ref: '#/components/schemas/sauth-Tags'
        customId:
          type: string
          description: If `mappedExternal` is set to FALSE in OAuth settings, this field is required.
    sauth-ClientRefreshRequest:
      type: object
      required:
      - apiKey
      properties:
        apiKey:
          $ref: '#/components/schemas/sauth-ClientApiKey'
      title: ClientRefreshRequest
    sauth-JWTtoken:
      type: object
      properties:
        token:
          type: string
          description: '[JWT](https://jwt.io/) token'
    sauth-JWTtokenV3:
      type: object
      properties:
        token:
          type: string
          description: '[JWT](https://jwt.io/) token'
        expiration:
          type: integer
          example: 1649283173
        created:
          type: integer
          example: 1649277173668
        origin:
          type: string
          example: SYNERISE
        customId:
          type: string
          example: card123
        realm:
          type: string
          example: client
    sauth-BanSettingsPayload:
      type: object
      properties:
        blockingForClientEnabled:
          type: boolean
          description: When TRUE, first- and second-level bans are enabled. Permanent bans are always enabled.
        firstBanCollectingTime:
          type: integer
          format: int32
          description: |
            Time in seconds. If a Profile fails to log in too many times during this time, the account is banned. The number of login attempts is defined in `firstBanThreshold` and the duration is defined in `firstBanDuration`.

            **Note:** The timer starts at the first login attempt and is common for first-level, second-level, and permanent bans.
        firstBanDuration:
          type: integer
          format: int32
          description: Duration of the first-level ban in seconds. The first-level ban is applied to a Profile's identifier and cancelled after a successful password reset.
        firstBanThreshold:
          type: integer
          format: int32
          description: The number of failed login attempts before the first-level ban is applied.
        secondBanCollectingTime:
          type: integer
          format: int32
          description: |
            Time in seconds. If a Profile fails to log in too many times during this time, the account is banned. The number of login attempts is defined in `secondBanThreshold` and the duration is defined in `secondBanDuration`.

            **Note:** The timer starts at the first login attempt and is common for first-level, second-level, and permanent bans.
        secondBanDuration:
          type: integer
          format: int32
          description: Duration of the second-level ban in seconds. The second-level ban is applied to a Profile's identifier and cancelled after a successful password reset.
        secondBanThreshold:
          type: integer
          format: int32
          description: The number of failed login attempts before the second-level ban is applied.
        permanentBanCollectingTime:
          type: integer
          format: int32
          description: |
            Time in seconds. If a Profile fails to log in too many times during this time, the account is banned. The number of login attempts is defined in `permanentBanThreshold` and the duration is defined in `permanentBanDuration`.

            **Note:** The timer starts at the first login attempt and is common for first-level, second-level, and permanent bans.
        permanentBanDuration:
          type: integer
          format: int32
          description: Duration of the permanent ban in seconds. The permanent ban is applied to an IP address and cancelled after a successful password reset.
        permanentBanThreshold:
          type: integer
          format: int32
          description: The number of failed login attempts before the permanent ban is applied.
    sauth-ClientActivationResendRequest:
      type: object
      properties:
        email:
          type: string
          description: Email address
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        uuid:
          type: string
          description: UUID of the Client
    sauth-AuthenticationRequestV2_and_3:
      type: object
      required:
      - apiKey
      - identityProvider
      properties:
        apiKey:
          $ref: '#/components/schemas/sauth-ClientApiKey'
        identityProvider:
          type: string
          description: The identity provider.
          enum:
          - SYNERISE
          - FACEBOOK
          - OAUTH
          - APPLE
          - GOOGLE
          - UNKNOWN
        identityProviderToken:
          $ref: '#/components/schemas/sauth-AuthIdentityProviderToken'
        email:
          $ref: '#/components/schemas/sauth-AuthClientEmail'
        customId:
          $ref: '#/components/schemas/sauth-AuthClientCustomId'
        password:
          $ref: '#/components/schemas/sauth-AuthClientPassword'
        uuid:
          $ref: '#/components/schemas/sauth-AuthClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        agreements:
          $ref: '#/components/schemas/sauth-Agreements'
        attributes:
          $ref: '#/components/schemas/sauth-Attributes'
        tags:
          $ref: '#/components/schemas/sauth-Tags'
      title: AuthenticationRequestV2_and_3
    sauth-ClientEmailChangeRequest:
      type: object
      properties:
        email:
          type: string
          description: New email address
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
    sauth-ClientPinActivationResendRequest:
      type: object
      properties:
        email:
          $ref: '#/components/schemas/sauth-inBodyClientEmail'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
      title: ClientPinActivationResendRequest
    sauth-PinCodeConfirmationRequest:
      type: object
      properties:
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        email:
          $ref: '#/components/schemas/sauth-inBodyClientEmail'
        pinCode:
          type: string
          description: The PIN code received by email
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
    sauth-LogInAsClientRequestBody:
      type: object
      properties:
        apiKey:
          $ref: '#/components/schemas/sauth-ClientApiKey'
        email:
          type: string
          description: Profile email
        password:
          type: string
          description: Profile password
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          type: string
          description: '**Important:** deviceId is required during login if device control is enabled.'
    sauth-ChangeClientPasswordRequestBody:
      type: object
      properties:
        oldPassword:
          type: string
          description: Current password
        password:
          type: string
          description: New password
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
    sauth-LogInAnonymouslyRequestBody:
      type: object
      properties:
        apiKey:
          $ref: '#/components/schemas/sauth-ClientApiKey'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
    sauth-LogInAnonymouslyV2RequestBody:
      type: object
      properties:
        apiKey:
          $ref: '#/components/schemas/sauth-ClientApiKey'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
    sauth-LogInAnonymouslyV3RequestBody:
      type: object
      required:
      - apiKey
      - uuid
      properties:
        apiKey:
          $ref: '#/components/schemas/sauth-ClientApiKey'
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          type: string
          description: Unique iOS or Android device identifier.
    sauth-ConfirmAClientAccountRequestBody:
      type: object
      description: Activation token received by email
      properties:
        token:
          description: Activation token received by email
          type: string
    sauth-AuthenticateWithAppleRequestBody:
      type: object
      properties:
        accessToken:
          type: string
          description: Apple token
        apiKey:
          $ref: '#/components/schemas/sauth-ClientApiKey'
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        agreements:
          $ref: '#/components/schemas/sauth-Agreements'
        attributes:
          $ref: '#/components/schemas/sauth-Attributes'
        tags:
          $ref: '#/components/schemas/sauth-Tags'
    sauth-DeleteAppleClientRequestBody:
      type: object
      properties:
        accessToken:
          type: string
          description: Apple access token
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        customId:
          $ref: '#/components/schemas/sauth-inBodyClientCustomId'
    sauth-LoginWithAppleWithoutRegistrationRequestBody:
      type: object
      properties:
        accessToken:
          type: string
          description: Apple token
        apiKey:
          $ref: '#/components/schemas/sauth-ClientApiKey'
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        agreements:
          $ref: '#/components/schemas/sauth-Agreements'
        attributes:
          $ref: '#/components/schemas/sauth-Attributes'
        tags:
          $ref: '#/components/schemas/sauth-Tags'
    sauth-AuthenticateWithFacebookRequestBody:
      type: object
      properties:
        facebookToken:
          type: string
          description: Facebook authentication token
        apiKey:
          $ref: '#/components/schemas/sauth-ClientApiKey'
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        agreements:
          $ref: '#/components/schemas/sauth-Agreements'
        attributes:
          $ref: '#/components/schemas/sauth-Attributes'
        tags:
          $ref: '#/components/schemas/sauth-Tags'
    sauth-AuthenticateWithFacebookWithoutRegistrationRequestBody:
      type: object
      properties:
        facebookToken:
          type: string
          description: Facebook Authentication Token
        apiKey:
          $ref: '#/components/schemas/sauth-ClientApiKey'
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        agreements:
          $ref: '#/components/schemas/sauth-Agreements'
        attributes:
          $ref: '#/components/schemas/sauth-Attributes'
        tags:
          $ref: '#/components/schemas/sauth-Tags'
    sauth-DeleteAFacebookClientAccountRequestBody:
      type: object
      properties:
        facebookToken:
          type: string
          description: Facebook authentication token
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
    sauth-DeleteAccountV2RequestBody:
      type: object
      required:
      - password
      - identityProvider
      properties:
        password:
          type: string
          description: Profile password. Only applicable if the Profile is **not** authenticated by an external identity provider.
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        externalToken:
          type: string
          description: External authorization token. Only applicable if the Profile is authenticated by an external identity provider.
        customId:
          type: string
          description: Custom ID of the Profile, if applicable
        identityProvider:
          type: string
          enum:
          - FACEBOOK
          - OAUTH
          - APPLE
          - SYNERISE
          description: Authorization provider
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
    sauth-ConfirmClientEmailChangeRequestBody:
      type: object
      properties:
        token:
          type: string
          format: uuid
          example: 58acd5bd-8efd-47ed-b101-32eb56e13839
          description: Token received by email
        newsletterAgreement:
          type: boolean
          description: Permission to receive email newsletters
    sauth-RequestClientEmailChangeRequestBody:
      type: object
      properties:
        email:
          type: string
          description: New email address
        password:
          type: string
          description: Profile password
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
    sauth-DeleteAccountV1RequestBody:
      type: object
      properties:
        password:
          type: string
          description: Profile password
        uuid:
          type: string
          description: Profile UUID
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
    sauth-DeleteOauthClientRequestBody:
      type: object
      properties:
        accessToken:
          type: string
          description: OAuth access token
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        customId:
          $ref: '#/components/schemas/sauth-inBodyClientCustomId'
    sauth-RegisterAClientRequestBody:
      type: object
      properties:
        email:
          $ref: '#/components/schemas/sauth-inBodyClientEmail'
        password:
          type: string
          description: Password for the Profile
        phone:
          $ref: '#/components/schemas/sauth-inBodyClientPhone'
        customId:
          $ref: '#/components/schemas/sauth-inBodyClientCustomId'
        firstName:
          $ref: '#/components/schemas/sauth-inBodyClientFirstName'
        lastName:
          $ref: '#/components/schemas/sauth-inBodyClientLastName'
        displayName:
          $ref: '#/components/schemas/sauth-inBodyClientDisplayName'
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        avatarUrl:
          $ref: '#/components/schemas/sauth-inBodyClientAvatarUrl'
        whatsAppId:
          type: string
          description: WhatsApp identifier of the Profile
          maxLength: 255
        birthDate:
          $ref: '#/components/schemas/sauth-inBodyClientBirthDate'
        company:
          $ref: '#/components/schemas/sauth-inBodyClientCompany'
        city:
          $ref: '#/components/schemas/sauth-inBodyClientCity'
        address:
          $ref: '#/components/schemas/sauth-inBodyClientAddress'
        zipCode:
          $ref: '#/components/schemas/sauth-inBodyClientZipCode'
        province:
          $ref: '#/components/schemas/sauth-inBodyClientProvince'
        countryCode:
          $ref: '#/components/schemas/sauth-inBodyClientCountryCode'
        sex:
          $ref: '#/components/schemas/sauth-inBodyClientSex'
        agreements:
          $ref: '#/components/schemas/sauth-Agreements'
        attributes:
          $ref: '#/components/schemas/sauth-Attributes'
        tags:
          $ref: '#/components/schemas/sauth-Tags'
    sauth-TemplateSettingsData:
      type: object
      properties:
        clientEmailChangeRequestMailSubject:
          type: string
          description: Subject of the email change confirmation email. This is sent to the new address.
        clientEmailChangeRequestMailBody:
          nullable: true
          type: string
          description: HTML body of the email change confirmation email. All `"` characters must be escaped and all the code must be a single line. This is sent to the new address.
        clientEmailChangeRequestMailTemplateId:
          nullable: true
          type: string
          description: ID of the email change confirmation email body template. This email is sent to the new address. If you use a template, it overrides the content sent in `clientEmailChangeRequestMailBody`.
        clientEmailChangeNotificationMailSubject:
          type: string
          description: Subject of the email change notification email. This is sent to the current address.
        clientEmailChangeNotificationMailBody:
          nullable: true
          type: string
          description: HTML body of the email change notification email. All `"` characters must be escaped and all the code must be a single line. This is sent to the current address.
        clientEmailChangeNotificationMailTemplateId:
          nullable: true
          type: string
          description: ID of the email change notification email template. This email is sent to the current address. If you use a template, it overrides the content sent in `clientEmailChangeNotificationMailBody`.
      title: TemplateSettingsData
    sauth-ClientLogoutRequest:
      type: object
      properties:
        action:
          type: string
          enum:
          - LOGOUT
          - LOGOUT_WITH_SESSION_CLEARING
    sauth-DeviceControlSettingsPayload:
      type: object
      properties:
        deviceControlMode:
          type: string
          description: |
            Defines the type of device authorization.

            - OFF: No device authorization.
            - SOFT: The Profile is notified about logins from a new device, but the access is not blocked.
            - HARD: Login attempts from the new device are blocked until the Profile authorizes the device with the link or token received by email.
            - CONDITIONAL_BASED_ON_LOCATION: If a Profile logs in from a new device in Poland, they receive a notification (same as with SOFT setting). If the new device is outside of Poland, it must be authorized with a link or token received by email (same as with HARD setting). Other countries will be supported in the future.
          enum:
          - 'OFF'
          - SOFT
          - HARD
          - CONDITIONAL_BASED_ON_LOCATION
        hardMailBody:
          type: string
          description: HTML body of the device authorization email for hard mode. All `"` characters must be escaped and all the code must be a single line.
        hardMailTitle:
          type: string
          description: Subject of the device authorization email for hard mode.
        hardTemplateId:
          type: string
          description: ID of the device authorization email template for hard mode. If you use a template, it overrides the content sent in `hardMailBody`.
        softMailBody:
          type: string
          description: HTML body of the device authorization email for soft mode. All `"` characters must be escaped and all the code must be a single line.
        softMailTitle:
          type: string
          description: Subject of the device authorization email for soft mode.
        softTemplateId:
          type: string
          description: ID of the device authorization email template for soft mode. If you use a template, it overrides the content sent in `softMailBody`.
        deviceUnlockSuccessRedirectUrl:
          type: string
        deviceUnlockAlreadyConfirmedRedirectUrl:
          type: string
    sauth-AppleAuthSettingsPayload:
      type: object
      properties:
        enabled:
          type: boolean
          description: Defines if Sign in with Apple is enabled in this workspace.
        bundle:
          type: string
          description: Name of your application package
          example: com.synerise.sdk.sample-swift
    sauth-GenericClientEmailChangeRequest:
      type: object
      required:
      - email
      - uuid
      properties:
        email:
          description: New email address
          type: string
        externalToken:
          type: string
          description: External authorization token. Only applicable if the Profile is authenticated by an external identity provider.
        password:
          type: string
          description: Profile password. Only applicable if the Profile is **not** authenticated by an external identity provider.
        uuid:
          $ref: '#/components/schemas/sauth-inBodyClientUuid'
        deviceId:
          $ref: '#/components/schemas/sauth-inBodyClientDeviceId'
        customId:
          type: string
          description: Custom ID of the Profile, if applicable
      title: GenericClientEmailChangeRequest
    sauth-GeneralSettingsData:
      type: object
      required:
      - tokenLifetimeInSeconds
      properties:
        tokenLifetimeInSeconds:
          $ref: '#/components/schemas/sauth-TokenLifetimeInSeconds'
        voucherPoolUuid:
          $ref: '#/components/schemas/sauth-VoucherPoolUuid'
        allowOverwriteCustomIdentify:
          $ref: '#/components/schemas/sauth-AllowOverwriteCustomIdentify'
        allowOverwriteExternalId:
          $ref: '#/components/schemas/sauth-AllowOverwriteExternalId'
        allowEmailChangeFromWebForm:
          $ref: '#/components/schemas/sauth-AllowEmailChangeFromWebForm'
        allowToPassCustomIdentifyWithVoucherPool:
          $ref: '#/components/schemas/sauth-AllowToPassCustomIdentifyWithVoucherPool'
      title: GeneralSettingsData
    sauth-SyneriseAuthSettingsData:
      required:
      - enabled
      - registrationType
      type: object
      properties:
        enabled:
          type: boolean
        registrationType:
          $ref: '#/components/schemas/sauth-RegistrationType'
        pinConfirmationType:
          type: string
          default: ON_CONFLICT_WITH_EXTERNAL_ACCOUNT
          enum:
          - EVERYONE
          - ON_CONFLICT_WITH_EXTERNAL_ACCOUNT
          description: Defines if PIN confirmation (if enabled) is required for all new accounts or only if there is a conflict with an existing account registered by using third-party Identity Providers.
        pinConfirmationLength:
          type: integer
          description: The number of characters in the PIN
          default: 6
        pinConfirmationValidInSeconds:
          type: integer
          default: 300
          description: TTL of the PIN code before it expires and cannot be used
        allowPinResendFromDifferentDeviceId:
          type: boolean
          default: false
          description: |
            When TRUE, a PIN email re-send can be requested from a different device than the last device that requested a PIN email.

            **NOTE:** Regardless of this setting, the activation request can only be sent from the last device that requested a PIN email.
        confirmationRedirectLink:
          $ref: '#/components/schemas/sauth-ConfirmationRedirectLink'
        confirmationMailSubject:
          type: string
          description: Subject of the account activation email
        confirmationMailBody:
          nullable: true
          type: string
          description: HTML body of the account activation email. All `"` characters must be escaped and all the code must be a single line.
        confirmationMailTemplateId:
          nullable: true
          type: string
          description: ID of the account activation email body template. If you use a template, it overrides the content sent in `confirmationMailBody`.
        passwordResetMailTemplateId:
          nullable: true
          type: string
          description: ID of the password reset confirmation email body template
        passwordResetMailSubject:
          type: string
          description: Subject of the password reset confirmation email
        passwordResetMailBody:
          nullable: true
          type: string
          description: HTML body of the password reset confirmation email. All `"` characters must be escaped and all the code must be a single line.
        pinConfirmationMailSubject:
          type: string
          description: Subject of the email with the PIN needed to confirm an account.
        pinConfirmationMailBody:
          nullable: true
          type: string
          description: HTML body of the email with the PIN needed to confirm an account. All `"` characters must be escaped and all the code must be a single line. The PIN code is inserted using the `{{ pin_code }}` Jinjava insert.
        pinConfirmationMailTemplateId:
          nullable: true
          type: string
          description: ID of the template for the email with the PIN needed to confirm an account. If you use a template, it overrides the content sent in `pinConfirmationMailBody`.
        maxLength:
          type: integer
          format: int32
          description: Maximum length of the password
        minLength:
          type: integer
          format: int32
          description: Minimum length of the password
        requireAtLeastOneLowercaseLetter:
          type: boolean
          description: When TRUE, the password must include at least one lowercase letter.
          default: false
        requireAtLeastOneNonAlphaNumericCharacter:
          type: boolean
          description: When TRUE, the password must include at least one non-alphanumeric character.
          default: false
        requireAtLeastOneNumber:
          type: boolean
          description: When TRUE, the password must include at least one number.
          default: false
        requireAtLeastOneUppercaseLetter:
          type: boolean
          description: When TRUE, the password must include at least one uppercase letter.
          default: false
    sauth-GoogleOauthSettingsPayload:
      required:
      - enabled
      type: object
      properties:
        enabled:
          type: boolean
    sauth-FacebookOauthSettingsPayload:
      required:
      - enabled
      type: object
      properties:
        enabled:
          type: boolean
    sauth-OauthSettingsRequest:
      anyOf:
      - type: object
        title: 'Mode: SERVER'
        properties:
          enabled:
            type: boolean
          mode:
            $ref: '#/components/schemas/sauth-OauthMode'
          name:
            $ref: '#/components/schemas/sauth-OauthName'
          endpoint:
            $ref: '#/components/schemas/sauth-OauthEndpoint'
          headers:
            $ref: '#/components/schemas/sauth-OauthHeaders'
          mapping:
            $ref: '#/components/schemas/sauth-OauthMapping'
          mappedExternal:
            $ref: '#/components/schemas/sauth-OauthMappedExternal'
          syncDataOnLogin:
            $ref: '#/components/schemas/sauth-OauthSyncDataOnLogin'
      - type: object
        title: 'Mode: JWT_TOKEN'
        properties:
          enabled:
            type: boolean
          mode:
            $ref: '#/components/schemas/sauth-OauthMode'
          name:
            $ref: '#/components/schemas/sauth-OauthName'
          jwkEndpoint:
            $ref: '#/components/schemas/sauth-OauthJwkEndpoint'
          mapping:
            $ref: '#/components/schemas/sauth-OauthMapping'
          mappedExternal:
            $ref: '#/components/schemas/sauth-OauthMappedExternal'
          syncDataOnLogin:
            $ref: '#/components/schemas/sauth-OauthSyncDataOnLogin'
          validation:
            $ref: '#/components/schemas/sauth-OauthValidation'
    sauth-OauthSettingsResponse:
      type: object
      properties:
        enabled:
          type: boolean
        mode:
          $ref: '#/components/schemas/sauth-OauthMode'
        endpoint:
          $ref: '#/components/schemas/sauth-OauthEndpoint'
        jwkEndpoint:
          $ref: '#/components/schemas/sauth-OauthJwkEndpoint'
        headers:
          $ref: '#/components/schemas/sauth-OauthHeaders'
        mapping:
          $ref: '#/components/schemas/sauth-OauthMapping'
        name:
          $ref: '#/components/schemas/sauth-OauthName'
        mappedExternal:
          $ref: '#/components/schemas/sauth-OauthMappedExternal'
        syncDataOnLogin:
          $ref: '#/components/schemas/sauth-OauthSyncDataOnLogin'
        validation:
          $ref: '#/components/schemas/sauth-OauthValidation'
    sauth-OauthName:
      type: string
      description: Name of the integration
    sauth-OauthMode:
      type: string
      enum:
      - JWT_TOKEN
      - SERVER
      description: |
        The mode of authentication:

        - SERVER: Your OAuth server returns a token to the client device; the client device passes it to the Synerise backend; Synerise backend verifies the token with your OAuth backend
        - JWT_TOKEN: Your OAuth server returns a JWT to the client device; the client device passes it to the Synerise backend; the Synerise backends verifies it with the provided JWK. This mode requires fewer resources from your backend.
    sauth-OauthJwkEndpoint:
      type: string
      description: "URL of the JWK when the `JWT_TOKEN` mode is selected.  \nIf you want to pass the token from your backend in the URL, use the `{{_snrs_access_token}}` insert.\n"
    sauth-OauthEndpoint:
      type: string
      description: "URL of the OAuth authorization endpoint when the `SERVER` mode is selected.  \nIf you want to pass the token from your backend in the URL, use the `{{_snrs_access_token}}` insert.\n"
    sauth-OauthHeaders:
      type: object
      description: "'Headers for the authorization request when `SERVER` mode is selected. For example, `\"X-Custom-Header\": \"someValue\"`  \nIf you want to pass the token from your backend in a header, use the `{{_snrs_access_token}}` insert'\n"
      example:
        Content-Type: application/json
        Authorization: Bearer {{_snrs_access_token}}
        Cache-control: no-cache
      additionalProperties:
        type: string
    sauth-OauthMapping:
      type: object
      description: 'A mapping of fields from the Synerise endpoint to your OAuth endpoint. For example, if your field is called `token` and its counterpart in Synerise is `accessToken`, the mapping is `"accessToken": "token"`'
      additionalProperties:
        type: string
    sauth-OauthValidation:
      type: object
      description: A validation mapping of fields from jwt token.
      additionalProperties:
        type: string
    sauth-OauthMappedExternal:
      type: boolean
      default: true
      description: If set to FALSE, the authentication request must include the customer's `customId` in the body.
    sauth-OauthSyncDataOnLogin:
      type: boolean
      default: false
      description: When set to TRUE, profile data from an external authentication provider is uploaded into the Synerise database every time the profile logs in. When FALSE, the data is saved only the first time a profile logs in, so that the amount of data is reduced in later authentication requests.
    sauth-ConditionalAuthenticationResponse:
      type: object
      properties:
        conditions:
          type: array
          description: Reserved for future use.
          items:
            type: string
        status:
          type: string
          description: Login status. Currently, only `SUCCESS` is used.
          enum:
          - SUCCESS
          - UNAUTHORIZED
          - ACTIVATION_REQUIRED
          - REGISTRATION_REQUIRED
          - APPROVAL_REQUIRED
          - TERMS_ACCEPTANCE_REQUIRED
          - MFA_REQUIRED
        token:
          type: string
          description: '[JWT](https://jwt.io/) token'
      title: ConditionalAuthenticationResponse
    sauth-ServerAuthenticationRequestV2_and_3:
      allOf:
      - type: object
        required:
        - ipAddress
        properties:
          ipAddress:
            type: string
            description: The IP address of the client device that is logging in.
      - $ref: '#/components/schemas/sauth-AuthenticationRequestV2_and_3'
    sauth-ConditionalAuthenticationResponseV3:
      type: object
      properties:
        conditions:
          type: array
          description: Reserved for future use.
          items:
            type: string
        status:
          type: string
          description: Login status. Currently, only `SUCCESS` is used.
          enum:
          - SUCCESS
          - UNAUTHORIZED
          - ACTIVATION_REQUIRED
          - REGISTRATION_REQUIRED
          - APPROVAL_REQUIRED
          - TERMS_ACCEPTANCE_REQUIRED
          - MFA_REQUIRED
        token:
          type: string
          description: '[JWT](https://jwt.io/) token'
        expiration:
          type: integer
          example: 1649283173
        created:
          type: integer
          example: 1649277173668
        origin:
          type: string
          example: SYNERISE
        customId:
          type: string
          example: card123
        realm:
          type: string
          example: client
      title: ConditionalAuthenticationResponseV3
    sauth-ClientApiKey:
      type: string
      description: Profile (formerly "Client") API key
    sauth-AuthIdentityProviderToken:
      type: string
      description: Third-party authentication token used to authenticate with the Identity Provider. Required if `identityProvider` is different than `SYNERISE`.
    sauth-AuthClientEmail:
      type: string
      description: Profile email. Required if `identityProvider` is `SYNERISE` and email is the unique identifier (default setting).
    sauth-AuthClientPassword:
      type: string
      description: Profile password. Required if `identityProvider` is `SYNERISE`.
    sauth-AuthClientUuid:
      type: string
      description: Profile UUID. Required if `identityProvider` is `SYNERISE`.
    sauth-AuthClientCustomId:
      description: Profile customId. Required if `identityProvider` is `SYNERISE` and customId is the unique identifier (see https://hub.synerise.com/docs/settings/configuration/non-unique-emails/).
    sauth-inBodyClientCompany:
      type: string
      description: Profile's company
    sauth-inBodyClientBirthDate:
      type: string
      description: Profile's date of birth
    sauth-inBodyClientAvatarUrl:
      type: string
      nullable: true
      description: URL of the Profile's avatar picture
    sauth-inBodyClientDisplayName:
      type: string
      description: Currently unused
    sauth-inBodyClientLastName:
      type: string
      description: Profile's last name
    sauth-inBodyClientCustomId:
      type: string
      description: Profile's custom ID
    sauth-inBodyClientPhone:
      type: string
      description: Phone number of the Profile. Can only include digits, spaces, and an optional `+` at the beginning
      example: '+48111222333'
    sauth-inBodyClientEmail:
      type: string
      description: Profile's email address
    sauth-inBodyClientFirstName:
      type: string
      description: Profile's first name
    sauth-inBodyClientUuid:
      type: string
      description: UUID of the Profile
      example: 07243772-008a-42e1-ba37-c3807cebde8f
    sauth-inBodyClientDeviceId:
      type: string
      description: |
        Unique Android or iOS device ID.

        We recommend sending this attribute every time, to assign a web push registration to the device.

        Required when any form of [unknown device control](https://hub.synerise.com/docs/settings/tool/iam-for-apps/access/#unknown-device-control) is enabled.
    sauth-inBodyClientCity:
      type: string
      description: Profile's city of residence
    sauth-inBodyClientAddress:
      type: string
      description: Profile's street address
    sauth-inBodyClientZipCode:
      type: string
      description: Profile's zip code
    sauth-inBodyClientProvince:
      type: string
      description: Profile's province of residence
    sauth-inBodyClientCountryCode:
      type: string
      description: Code of Profile's country of residence (Alpha-2 code according to ISO 3166-1)
      example: PL
    sauth-inBodyClientSex:
      type: string
      description: Profile's sex
      enum:
      - FEMALE
      - MALE
      - NOT_SPECIFIED
      - OTHER
    sauth-Tags:
      type: array
      description: Tags can be used to group Profile accounts.
      items:
        type: string
    sauth-Attributes:
      type: object
      description: |
        Custom attributes (with any names)

        <strong><span style="color:red">WARNING<span></strong>: Some attributes cannot be sent in this object and will be ignored. Some of these are reserved for system use, and others must be sent as properties of the profile in the root object of the request body instead of inside the `attributes` object.

        <details><summary><span style="background:red;color:white">Click to expand the list of reserved attributes</span></summary>
        <code>email</code><br><code>id</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br>
        <code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br>
        <code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br>
        <code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br>
        <code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br>
        <code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br>
        <code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br><code>receive_whatsapp_messages</code><br><code>whatsapp_id</code><br>
        <code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_country</code><br><code>geo_loc_isp</code><br>
        <code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>deletedAt</code><br><code>deleted_unique</code><br><code>status</code><br><code>recognized</code><br><code>previous_clients</code><br><code>testProfile</code><br>
        <code>apikey</code><br><code>apiKey</code><br><code>ApiKey</code><br><code>Apikey</code><br><code>tracker</code><br><code>snr_sdk_version</code><br>
        <code>eventCreateTime</code><br><code>correlationId</code>
        </details>
      additionalProperties:
        description: Can be numbers, strings, or booleans.
    sauth-Agreements:
      description: |-
        Marketing agreements of the Profile.

        You can also pass the values as strings (`"true"`;`"TRUE"`;`"True"`/`"false"`;`"FALSE"`;`"False"`) or integers (`1` for true and `0` for false).
      type: object
      properties:
        email:
          type: boolean
          description: Permission to receive marketing information by email
          default: true
        sms:
          type: boolean
          description: Permission to receive marketing information by SMS
          default: true
        push:
          type: boolean
          description: Permission to receive push notifications
          default: true
        bluetooth:
          type: boolean
          deprecated: true
          description: This field is ignored.
          default: false
        rfid:
          type: boolean
          deprecated: true
          description: This field is ignored.
          default: false
        wifi:
          type: boolean
          deprecated: true
          description: This field is ignored.
          default: false
        whatsApp:
          type: boolean
          description: Permission to receive WhatsApp messages
          default: false
      example:
        email: true
        sms: true
        push: true
        bluetooth: false
        rfid: false
        wifi: false
    sauth-ConfirmClientpasswordresetRequest:
      required:
      - password
      - token
      type: object
      properties:
        password:
          type: string
          description: New password
        token:
          type: string
          description: Token received by email
      example:
        password: testPass1!
        token: token_from_pass_reset_req
    sauth-RequestClientpasswordresetRequest:
      required:
      - email
      type: object
      properties:
        email:
          type: string
          description: Email address where the password reset link will be sent
      example:
        email: testDoc@example.com
    sauth-ConfirmationRedirectLink:
      type: string
      default: null
      description: Redirect URL of the confirmation link
    sauth-RegistrationType:
      type: string
      description: |
        Defines the Profile account activation type.

        - REQUIRE_ACTIVATION: the account is inactive until the link in the confirmation email is accessed.
        - REQUIRE_EMAIL_CONFIRMATION: the account is active and can be used immediately, but must be confirmed using the link from the confirmation email.
        - AUTOMATIC: no activation is required
        - REQUIRE_PIN_CONFIRMATION: PIN code confirmation is required. To send the PIN by email, the email template must include the `{{pin_code}}` jinjava tag.
      enum:
      - REQUIRE_ACTIVATION
      - REQUIRE_EMAIL_CONFIRMATION
      - REQUIRE_PIN_CONFIRMATION
      - AUTOMATIC
    sauth-TokenLifetimeInSeconds:
      type: integer
      format: int64
      default: 0
      description: 'The time in seconds before the authorization tokens expire. If set to `0` (default), the global Synerise setting is applied: 60 minutes.'
    sauth-VoucherPoolUuid:
      type: string
      default: null
      description: UUID of the voucher pool that stores `customId` values available for assignment to new Profiles, if applicable in your implementation.
    sauth-AllowOverwriteCustomIdentify:
      type: boolean
      default: false
      description: When set to TRUE, customers' `customId` values may be modified. By default, the `customId` cannot be changed.
    sauth-AllowOverwriteExternalId:
      type: boolean
      default: false
      description: |
        When set to TRUE, a profile's `externalId` value may be modified.

        This may be useful, for example, if someone deletes their account with an external authentication provider, and then registers a new account with the same email.
        The external provider assigns a new ID and you need to allow overwriting the existing external ID in Synerise in order to link the existing profile in Synerise with the newly created account from the external provider.
    sauth-AllowEmailChangeFromWebForm:
      type: boolean
      default: false
      description: When set to TRUE, email change can be requested/confirmed using a web form.
    sauth-AllowToPassCustomIdentifyWithVoucherPool:
      type: boolean
      default: false
      description: When set to TRUE, `customId` can be provided even if `voucher pool` is configured. In this case voucher will not be assigned.
    sauth-4xx-base:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: An array of detailed error messages, if applicable
          items:
            type: object
            properties:
              code:
                type: integer
                description: Error code
              field:
                type: string
                description: Name of the field that did not pass validation
              message:
                type: string
                description: Details of the problem
              rejectedValue:
                description: The value that did not pass validation
                anyOf:
                - type: string
                - type: number
                - type: integer
                - type: boolean
                - type: array
                  items: {}
                - type: object
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        traceId:
          type: string
          description: ID for debugging
    schema-service-generateDocumentWithIdReq:
      type: object
      required:
      - identifierValue
      properties:
        identifierValue:
          $ref: '#/components/schemas/schema-service-identifierValue'
        params:
          type: object
          description: Additional parameters
          additionalProperties:
            $ref: '#/components/schemas/schema-service-additionalPropertiesForGenerate'
    schema-service-additionalPropertiesForGenerate:
      description: |
        If you are generating the resource with a context that doesn't have the data for inserts in the resource (for example, a document has a `{% customer param %}` insert, but you're authenticated with a workspace JWT, so the customer context can't be extracted from the JWT), you can include the parameters in the request body. If an insert can't be processed, the returned content is empty.

        **Usage example**: if the `{% customer firstName %}` insert is used in a document, you can pass its value by sending `"customer.firstName": "Joe"`

        Because inserts are always encapsulated with quotation marks, inserts that return a number or a boolean value return it as a string.
      anyOf:
      - type: string
      - type: number
    schema-service-DocumentGenerateResponse:
      type: object
      description: Processed document
      required:
      - id
      - slug
      - schema
      - content
      properties:
        uuid:
          $ref: '#/components/schemas/schema-service-DocumentId'
        slug:
          $ref: '#/components/schemas/schema-service-DocumentSlug'
        schema:
          $ref: '#/components/schemas/schema-service-DocumentSchema'
        content:
          $ref: '#/components/schemas/schema-service-documentContentProcessed'
    schema-service-GenerateResponse:
      type: object
      required:
      - id
      - hash
      - priority
      - name
      - createdAt
      - updatedAt
      - audience
      - data
      - path
      properties:
        id:
          $ref: '#/components/schemas/schema-service-screenViewId'
        hash:
          $ref: '#/components/schemas/schema-service-screenViewId'
        priority:
          $ref: '#/components/schemas/schema-service-screenViewPriority'
        name:
          $ref: '#/components/schemas/schema-service-screenViewName'
        createdAt:
          $ref: '#/components/schemas/schema-service-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/schema-service-UpdatedAt'
        audience:
          $ref: '#/components/schemas/schema-service-Audience'
        data:
          type: object
          description: The JSON structure of the screen view, with inserts processed
          properties:
            collection:
              type: array
              description: By default, the `collection` property exists in each screen view, unless the default content was overwritten. This property's value is the output of the `{% screenviewcollection %}` insert. If you moved the insert into a different position in the JSON structure, its result (the array) will be stored at the position where you placed the insert (you can modify the screen definition so that the insert is under a key different than `collection`).
              items:
                $ref: '#/components/schemas/schema-service-DocumentGenerateResponse'
          additionalProperties:
            description: Other JSON entities included in the screen view's JSON structure.
        path:
          type: string
          description: Address of the screen view definition
          example: /v2/screen-views/f9215cb9-4a7e-410b-88cb-8bc40363cc10
    schema-service-PreviewGroup:
      type: object
      required:
      - id
      - name
      - children
      properties:
        id:
          $ref: '#/components/schemas/schema-service-groupUuid'
        name:
          $ref: '#/components/schemas/schema-service-groupName'
        children:
          type: array
          description: An array of documents in the group
          items:
            $ref: '#/components/schemas/schema-service-DocumentPreviewGroup'
    schema-service-DocumentPreviewGroup:
      type: object
      description: Details of a single document
      required:
      - id
      - name
      - status
      - priority
      - children
      properties:
        id:
          $ref: '#/components/schemas/schema-service-DocumentId'
        name:
          $ref: '#/components/schemas/schema-service-DocumentName'
        status:
          $ref: '#/components/schemas/schema-service-DocumentStatus'
        priority:
          $ref: '#/components/schemas/schema-service-DocumentPriority'
        children:
          type: array
          description: Documents that are included in the body of this document
          items:
            type: object
            description: Details of a single document
            required:
            - id
            - name
            - status
            - priority
            - children
            properties:
              id:
                $ref: '#/components/schemas/schema-service-DocumentId'
              name:
                $ref: '#/components/schemas/schema-service-DocumentName'
              status:
                $ref: '#/components/schemas/schema-service-DocumentStatus'
              priority:
                $ref: '#/components/schemas/schema-service-DocumentPriority'
              children:
                type: array
                description: Documents that are included in the body of this document. This is a recursive schema, `children` may have their own `children`.
                items:
                  type: object
                  $ref: '#/components/schemas/schema-service-DocumentPreviewGroup'
    schema-service-GraphObject:
      type: object
      required:
      - id
      - type
      - children
      properties:
        id:
          type: string
          description: UUID of the screen view or document
        type:
          type: string
          description: Type of the entity
          enum:
          - document
          - screenview
        name:
          type: string
          description: Name of the screen view or document (not slug)
        children:
          type: array
          description: Screen views or documents that refer to this entity
          items:
            $ref: '#/components/schemas/schema-service-GraphObject'
    schema-service-UpdateDocumentRequest:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/schema-service-DocumentName'
        priority:
          $ref: '#/components/schemas/schema-service-DocumentPriority'
        content:
          $ref: '#/components/schemas/schema-service-documentContentRaw'
        schema:
          $ref: '#/components/schemas/schema-service-DocumentSchema'
        groupId:
          $ref: '#/components/schemas/schema-service-DocumentGroupId'
        audience:
          $ref: '#/components/schemas/schema-service-Audience'
        schedule:
          $ref: '#/components/schemas/schema-service-EntrySchedule'
        directoryId:
          $ref: '#/components/schemas/schema-service-directoryId'
    schema-service-CreateDocumentRequest:
      type: object
      required:
      - name
      - priority
      - content
      - slug
      - audience
      - directoryId
      properties:
        name:
          $ref: '#/components/schemas/schema-service-documentName'
        priority:
          $ref: '#/components/schemas/schema-service-DocumentPriority'
        content:
          $ref: '#/components/schemas/schema-service-documentContentRaw'
        slug:
          $ref: '#/components/schemas/schema-service-DocumentSlug'
        schema:
          $ref: '#/components/schemas/schema-service-DocumentSchema'
        groupId:
          $ref: '#/components/schemas/schema-service-documentGroupId'
        audience:
          $ref: '#/components/schemas/schema-service-Audience'
        schedule:
          $ref: '#/components/schemas/schema-service-EntrySchedule'
        directoryId:
          $ref: '#/components/schemas/schema-service-directoryId'
    schema-service-EntrySchedule:
      type: object
      description: Configuration of the schedule
      properties:
        enabled:
          type: boolean
          description: Defines if the schedule configuration is enabled. A schedule must be enabled in order to become active at the selected time.
        endDate:
          type: string
          format: date-time
          description: Time when the schedule stops being active. If `endType` is NEVER, this field is null.
          nullable: true
        endType:
          type: string
          description: |
            - NEVER: schedule never becomes inactive.

            - DATE: schedule becomes inactive at the time set by `endDate`.
          enum:
          - NEVER
          - DATE
        parts:
          type: array
          description: "\nAn 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). \n\nIf `periodType` is ENTIRE, this array is empty.\n"
          items:
            $ref: '#/components/schemas/schema-service-EntryScheduleRepeatPart'
        periodType:
          type: string
          description: |
            Defines when the schedule applies within its activity period.

            - ENTIRE: schedule is applied at all time since it becomes active until it becomes inactive.


            - WEEKLY: schedule is applied at specified days of the week (and optionally at specific times during those days)

            - MONTHLY: schedule is applied at specified days of the month (and optionally at specific times during those days)
          enum:
          - ENTIRE
          - WEEKLY
          - MONTHLY
        startDate:
          type: string
          format: date-time
          description: Time when the schedule becomes active. If `startType` is NOW, this field is null.
        startType:
          type: string
          enum:
          - NOW
          - SCHEDULED
        timezone:
          type: string
          example: Europe/Warsaw
          description: Time zone according to the [tz database](https://en.wikipedia.org/wiki/Tz_database)
    schema-service-EntryScheduleRepeatPart:
      type: object
      properties:
        startDay:
          type: integer
          format: int32
          example: 1
          description: |
            If `periodType` is:


            - WEEKLY, the values are 1-7 (1 is Monday).

            - MONTHLY, the values are 1-31 (days of the month).

            **Note:**<br/>
            If you want to define two time rules for a day (for example, the schedule is active on Monday at 06:00-07:00 and 15:00-16:00), create a separate object for each time period in the `parts` array.
        startTime:
          type: string
          example: 08:18:03
          description: The hour when the schedule becomes active.
        endDay:
          type: integer
          format: int32
          example: 1
          description: Must be identical to `startDay`.
        endTime:
          type: string
          example: 44283
          description: The hour when the schedule becomes inactive.
    schema-service-DocumentScheduled:
      type: boolean
      description: Informs if the document has a defined schedule. Documents scheduled to be published immediately after activation are considered to be scheduled, so only a draft document can have this property at `false`. Copied documents inherit the schedule of their source document.
    schema-service-CreateScreenViewRequest:
      type: object
      required:
      - priority
      - directoryId
      - content
      - audience
      - feedId
      properties:
        priority:
          $ref: '#/components/schemas/schema-service-screenViewPriority'
        name:
          $ref: '#/components/schemas/schema-service-screenViewName'
        directoryId:
          $ref: '#/components/schemas/schema-service-directoryId'
        content:
          $ref: '#/components/schemas/schema-service-ScreenViewContent'
        audience:
          $ref: '#/components/schemas/schema-service-Audience'
        schedule:
          $ref: '#/components/schemas/schema-service-EntrySchedule'
        feedId:
          $ref: '#/components/schemas/schema-service-feedId'
    schema-service-feedId:
      type: string
      format: uuid
      description: UUID of the feed where this screen view is assigned.
    schema-service-identifierValue:
      type: string
      description: Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)
    schema-service-screenViewId:
      type: string
      format: uuid
      description: UUID of the screen view
    schema-service-screenViewVersion:
      type: string
      description: Version of the screen view
    schema-service-screenViewStatus:
      type: string
      enum:
      - DRAFT
      - ACTIVE
      - SCHEDULED
      - PAUSED
      - FINISHED
      description: |
        Status of the screen view

        - DRAFT: a screen view that is a work in progress, not complete for activation
        - ACTIVE: a screen view that can be displayed to customers
        - SCHEDULED: a screen view scheduled to activate later
        - PAUSED: a screen view that is temporarily stopped and cannot be displayed
        - FINISHED: a screen view that is stopped and cannot be displayed
    schema-service-screenViewParentVersion:
      type: string
      description: If the current was created from another version, this is is the UUID of the parent version.
    schema-service-ScreenViewFeed:
      type: object
      required:
      - name
      - slug
      properties:
        slug:
          $ref: '#/components/schemas/schema-service-FeedSlug'
        name:
          $ref: '#/components/schemas/schema-service-FeedName'
    schema-service-DocumentId:
      type: string
      format: uuid
      description: UUID of the document
    schema-service-DocumentSlugAsObject:
      type: object
      required:
      - slug
      properties:
        slug:
          type: string
          description: Slug of the document
          example: basket
          pattern: '[a-z0-9]+(?:-[a-z0-9]+)*'
    schema-service-DocumentSlug:
      type: string
      description: Slug of the document
      example: basket
      pattern: '[a-z0-9]+(?:-[a-z0-9]+)*'
    schema-service-DocumentName:
      type: string
      description: Name of the document
    schema-service-DocumentSchema:
      type: string
      description: Schema of the document (called "Type" in the Synerise Web Application)
      example: containers
    schema-service-DocumentStatus:
      type: string
      enum:
      - DRAFT
      - ACTIVE
      - SCHEDULED
      - PAUSED
      - FINISHED
      description: Filter by status
    schema-service-DocumentPriority:
      type: integer
      format: int32
      maximum: 100
      description: Priority of the document
    schema-service-CreateRequest:
      type: object
      properties:
        name:
          type: string
          description: If no name is provided, defaults to "Unnamed document" or Screen View Campaign" (depending on what you are initializing).
        directory:
          type: string
          format: uuid
          description: If no directory is provided, the default directory is used.
    schema-service-DocumentMetadata:
      type: object
      description: Data of the document
      required:
      - docId
      - name
      - status
      - scheduled
      - authorId
      - directoryId
      properties:
        docId:
          $ref: '#/components/schemas/schema-service-DocumentId'
        name:
          $ref: '#/components/schemas/schema-service-DocumentName'
        status:
          $ref: '#/components/schemas/schema-service-DocumentStatus'
        authorId:
          type: integer
          format: int64
          description: ID of the user who created the document
        directoryId:
          type: string
          format: uuid
          description: UUID of the directory where the document is saved
        scheduled:
          $ref: '#/components/schemas/schema-service-DocumentScheduled'
        createdAt:
          $ref: '#/components/schemas/schema-service-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/schema-service-UpdatedAt'
        deletedAt:
          $ref: '#/components/schemas/schema-service-DeletedAt'
    schema-service-DocumentContent:
      type: object
      description: Content of the document
      required:
      - priority
      - content
      - slug
      - schema
      properties:
        priority:
          $ref: '#/components/schemas/schema-service-DocumentPriority'
        content:
          type: object
          description: JSON structure of the document
          additionalProperties:
            $ref: '#/components/schemas/schema-service-anyProp'
        slug:
          $ref: '#/components/schemas/schema-service-DocumentSlug'
        schema:
          $ref: '#/components/schemas/schema-service-DocumentSchema'
        groupId:
          $ref: '#/components/schemas/schema-service-DocumentGroupId'
    schema-service-Audience:
      type: object
      description: The profiles (clients) which have access to this resource
      required:
      - targetType
      properties:
        targetType:
          type: string
          description: |
            The method of defining the audience:
            - SEGMENT sets the audience to segmentations whose UUIDs are provided in `segments`
            - QUERY sets the audience to an analytics query provided in `query`
            - ALL sets the audience to all profiles in the database
          enum:
          - SEGMENT
          - QUERY
          - ALL
        segments:
          type: array
          description: 'An array of segmentation IDs. Used with `targetType: SEGMENT`'
          items:
            type: string
        query:
          type: string
          description: 'Stringified `analysis` object for the segmentation analytics engine. Used with `targetType: QUERY`. Refer to the [Analytics API Reference](https://developers.synerise.com/#operation/addSegmentationPOST_v2).'
          example: '{"analysis":{"title":"Unnamed segmentation","description":"","unique":true,"segments":[{"title":"Segmentation A","description":"","filter":{"matching":true,"expressions":[{"_id":"a9b76c8e-34bd-4ac3-be8f-f37041d126bd","name":"","type":"FUNNEL","matching":true,"funnel":{"_id":"5c759d73-49c6-409f-96a3-b569dff8f8ff","title":"Unnamed","completedWithin":null,"dateFilter":{"type":"RELATIVE","offset":{"type":"DAYS","value":0},"duration":{"type":"DAYS","value":30}},"steps":[{"_id":"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff","title":"","action":{"id":944,"name":"page.visit"},"eventName":"page.visit","expressions":[]}],"exact":false}}]}}]}}'
    schema-service-Group:
      type: object
      description: Details of the document group
      required:
      - id
      - bpId
      - name
      - createdAt
      properties:
        id:
          $ref: '#/components/schemas/schema-service-DocumentGroupId'
        name:
          type: string
          description: Name of the group
        createdAt:
          type: string
          format: date-time
          description: Date and time when the group was created
        deletedAt:
          type: string
          format: date-time
          description: Date and time when the group was deleted, if applicable
          nullable: true
        nr:
          description: The number of documents in this group with status other than FINISHED
          type: integer
          format: int32
    schema-service-DocumentGroupId:
      type: string
      format: uuid
      example: 43c97b25-4a10-45d0-99b7-d472eea2bb24
      description: UUID of the group
    schema-service-RenameDirectory:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          description: New name for the directory
    schema-service-NewDirectory:
      type: object
      required:
      - name
      properties:
        name:
          $ref: '#/components/schemas/schema-service-DirectoryName'
    schema-service-PreviewDocumentByProfile:
      type: object
      required:
      - identifierValue
      - content
      properties:
        identifierValue:
          $ref: '#/components/schemas/schema-service-identifierValue'
        content:
          $ref: '#/components/schemas/schema-service-documentContentRaw'
        params:
          type: object
          description: Additional parameters
          additionalProperties:
            $ref: '#/components/schemas/schema-service-additionalPropertiesForGenerate'
    schema-service-Feed:
      type: object
      description: Feeds are used to group screen views, similar to document groups.
      required:
      - id
      - slug
      - name
      - createdAt
      - default
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the screen view feed
        slug:
          $ref: '#/components/schemas/schema-service-FeedSlug'
        name:
          $ref: '#/components/schemas/schema-service-FeedName'
        createdAt:
          $ref: '#/components/schemas/schema-service-CreatedAt'
        default:
          type: boolean
          description: Informs if this is the default screen view feed
    schema-service-FeedName:
      type: string
      description: Name of the screen view feed
    schema-service-FeedSlug:
      type: string
      description: Unique slug of the screen view feed
    schema-service-Directory:
      type: object
      description: Details of the directory where the resource is assigned
      required:
      - id
      - name
      - createdAt
      - default
      properties:
        id:
          $ref: '#/components/schemas/schema-service-directoryId'
        name:
          $ref: '#/components/schemas/schema-service-DirectoryName'
        createdAt:
          type: string
          format: date-time
          description: Date and time when the directory was created
        default:
          type: boolean
          description: '`true` if this is the default directory'
    schema-service-DirectoryName:
      type: string
      description: Name of the directory
    schema-service-SchedulerRequest:
      type: object
      description: Schedule object
      properties:
        externalId:
          $ref: '#/components/schemas/schema-service-ScheduleExternalId'
        type:
          $ref: '#/components/schemas/schema-service-ScheduleType'
        schedule:
          $ref: '#/components/schemas/schema-service-EntrySchedule'
    schema-service-SchedulerResponse:
      type: object
      description: Details of the schedule
      properties:
        active:
          type: boolean
          description: '`true` if the conditions of the schedule match the current time. This is not related to document/screen view status.'
        externalId:
          $ref: '#/components/schemas/schema-service-ScheduleExternalId'
        type:
          $ref: '#/components/schemas/schema-service-ScheduleType'
        finished:
          type: boolean
          description: '`true` if the conditions of the schedule mean it ended in the past. This is not related to document/screen view status.'
        schedule:
          $ref: '#/components/schemas/schema-service-EntrySchedule'
    schema-service-ScheduleType:
      type: string
      description: Type of the scheduled object
      enum:
      - SCREENVIEW
      - DOCUMENT
    schema-service-ScheduleExternalId:
      type: string
      format: uuid
      description: UUID of the screen view or document that the schedule applies to
    schema-service-Document:
      type: object
      title: Documents
      required:
      - id
      - name
      - priority
      - status
      - scheduled
      - createdAt
      - updatedAt
      - author
      - content
      - audience
      properties:
        id:
          $ref: '#/components/schemas/schema-service-DocumentId'
        name:
          $ref: '#/components/schemas/schema-service-DocumentName'
        priority:
          $ref: '#/components/schemas/schema-service-DocumentPriority'
        content:
          $ref: '#/components/schemas/schema-service-documentContentRaw'
        slug:
          $ref: '#/components/schemas/schema-service-DocumentSlug'
        schema:
          $ref: '#/components/schemas/schema-service-DocumentSchema'
        scheduled:
          $ref: '#/components/schemas/schema-service-DocumentScheduled'
        status:
          $ref: '#/components/schemas/schema-service-DocumentStatus'
        audience:
          $ref: '#/components/schemas/schema-service-Audience'
        author:
          $ref: '#/components/schemas/schema-service-Author'
        directory:
          $ref: '#/components/schemas/schema-service-Directory'
        group:
          $ref: '#/components/schemas/schema-service-Group'
        createdAt:
          $ref: '#/components/schemas/schema-service-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/schema-service-UpdatedAt'
        deletedAt:
          $ref: '#/components/schemas/schema-service-DeletedAt'
    schema-service-Author:
      type: object
      description: Author of the resource
      required:
      - id
      - name
      properties:
        id:
          type: integer
          format: int32
          description: ID of the author
        name:
          type: string
          description: Name of the author
        avatar:
          type: string
          description: URL of the author's avatar
    schema-service-DocumentsListResponse:
      type: object
      required:
      - meta
      - data
      properties:
        meta:
          $ref: '#/components/schemas/schema-service-Meta'
        data:
          type: array
          description: Array of analytics
          items:
            oneOf:
            - $ref: '#/components/schemas/schema-service-Document'
    schema-service-ScreenViewsListResponse:
      type: object
      required:
      - meta
      - data
      properties:
        meta:
          $ref: '#/components/schemas/schema-service-Meta'
        data:
          type: array
          description: Array of analytics
          items:
            oneOf:
            - $ref: '#/components/schemas/schema-service-screenView'
    schema-service-Meta:
      type: object
      description: Pagination metadata
      properties:
        links:
          type: array
          description: Links to the neighboring pages and the first page
          items:
            $ref: '#/components/schemas/schema-service-Link'
        limit:
          type: integer
          format: int32
          description: Limit of items per page
        count:
          type: number
          nullable: true
          description: Currently unused
    schema-service-Link:
      type: object
      required:
      - url
      - rel
      properties:
        url:
          type: string
          description: URL of the page, used for navigation
        rel:
          type: string
          description: The type of relation to the current page. `first` is always the first page.
          enum:
          - first
          - prev
          - next
    schema-service-screenViewMetadata:
      type: object
      description: Data of the screen view
      properties:
        id:
          $ref: '#/components/schemas/schema-service-screenViewId'
        version:
          $ref: '#/components/schemas/schema-service-screenViewVersion'
        status:
          $ref: '#/components/schemas/schema-service-screenViewStatus'
        hash:
          $ref: '#/components/schemas/schema-service-hashId'
        parentVersion:
          $ref: '#/components/schemas/schema-service-screenViewParentVersion'
        authorId:
          type: string
          description: ID of the user who created the screen view
        businessProfileId:
          $ref: '#/components/schemas/schema-service-screenViewBpId'
        priority:
          $ref: '#/components/schemas/schema-service-screenViewPriority'
        name:
          $ref: '#/components/schemas/schema-service-screenViewName'
        description:
          $ref: '#/components/schemas/schema-service-screenViewDescription'
        isActive:
          $ref: '#/components/schemas/schema-service-screenViewActive'
        createdAt:
          $ref: '#/components/schemas/schema-service-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/schema-service-UpdatedAt'
        deletedAt:
          $ref: '#/components/schemas/schema-service-DeletedAt'
    schema-service-documentId:
      type: object
      required:
      - slug
      properties:
        slug:
          type: string
          description: Slug of the document
        version:
          type: string
          description: Version of the document
    schema-service-ScreenViewContentLegacy:
      type: object
      description: Content of the screen view. It's possible to create a screen view without any documents (`documents` and `groups` arrays are both empty in that case).
      required:
      - json
      - documents
      - groups
      properties:
        json:
          $ref: '#/components/schemas/schema-service-ScreenViewJsonContent'
        documents:
          type: array
          minItems: 0
          description: An array of [documents](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `groups` is used or the SV contains no documents, this array must be empty.
          items:
            $ref: '#/components/schemas/schema-service-documentId'
        groups:
          type: array
          minItems: 0
          description: An array of [document groups](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `documents` is used or the SV contains no documents, this array must be empty.
          items:
            $ref: '#/components/schemas/schema-service-DocumentGroupId'
        groupsOrder:
          type: boolean
          default: false
          description: By default, group are ordered for display by their priority. When this field is set to `true`, they are displayed according to their order in the `groups` array instead.
    schema-service-BrickworksRecord:
      type: object
      description: Object represents brickworks record id.
      required:
      - schemaId
      - objectId
      properties:
        schemaId:
          type: string
          format: uuid
        objectId:
          type: string
    schema-service-ScreenViewContent:
      type: object
      title: With document groups
      description: Content of the screen view
      required:
      - json
      - documents
      - groups
      properties:
        json:
          $ref: '#/components/schemas/schema-service-ScreenViewJsonContent'
        documents:
          type: array
          description: An array of [documents](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `groups` is used, this array must be empty.
          items:
            type: string
        data:
          type: array
          description: An array of documents or Brickworks records
          items:
            oneOf:
            - $ref: '#/components/schemas/schema-service-DocumentSlugAsObject'
            - $ref: '#/components/schemas/schema-service-BrickworksRecord'
        groups:
          type: array
          description: An array of [document groups](https://help.synerise.com/docs/assets/documents/introduction-to-documents/), If `documents` is used, this array must be empty.
          items:
            $ref: '#/components/schemas/schema-service-DocumentGroupId'
        groupsOrder:
          type: boolean
          default: false
          description: By default, group are ordered for display by their priority. When this field is set to `true`, they are displayed according to their order in the `groups` array instead.
    schema-service-ScreenViewJsonContent:
      type: object
      description: |
        JSON structure of the screen view. By default, a newly created screen view has the following `json` value:

        ```
        "collection": "{% screenviewcollection %}"
        ```
        The `{% screenviewcollection %}` insert is used to pick and display the documents from the documents in `documents` or `groups`.

        If this insert is not used, you must manually insert each document with `{% document slug%}`.
      additionalProperties:
        $ref: '#/components/schemas/schema-service-anyProp'
    schema-service-standardApiResponse:
      type: object
      required:
      - status
      - body
      properties:
        status:
          type: string
          description: Status of the request
        body:
          type: string
          description: Additional information, if applicable.
    schema-service-publishRequest:
      type: object
      required:
      - overwrite
      properties:
        overwrite:
          description: Currently unused
          type: boolean
    schema-service-screenViewPriority:
      type: integer
      description: Priority determines which screen view to show to a customer if their profile matches the conditions of more than one screen view. `1` is the highest priority.
      default: 99
    schema-service-screenViewActive:
      type: boolean
      description: Defines if the screen view is active.
    schema-service-screenViewBpId:
      type: integer
      description: ID of the workspace where this screen view is saved
    schema-service-screenViewName:
      type: string
      description: Name of the screen view
    schema-service-screenViewDescription:
      type: string
      description: Description of the screen view
    schema-service-versionsOfScreenView:
      type: object
      properties:
        draft:
          $ref: '#/components/schemas/schema-service-screenViewMetadata'
        currentlyPublished:
          $ref: '#/components/schemas/schema-service-screenViewMetadata'
        previouslyPublished:
          $ref: '#/components/schemas/schema-service-paginatedScreenViewMetadata'
    schema-service-paginatedScreenViews:
      type: object
      required:
      - data
      - pagination
      properties:
        data:
          type: array
          description: A page of screen views
          items:
            $ref: '#/components/schemas/schema-service-screenView'
        pagination:
          $ref: '#/components/schemas/schema-service-pagination'
    schema-service-paginatedScreenViewMetadata:
      type: object
      description: Paginated list of previously published screen views
      required:
      - data
      - pagination
      properties:
        data:
          type: array
          description: A page of screen views
          items:
            $ref: '#/components/schemas/schema-service-screenViewMetadata'
        pagination:
          $ref: '#/components/schemas/schema-service-pagination'
    schema-service-versionedScreenViewKey:
      type: object
      properties:
        screenViewId:
          $ref: '#/components/schemas/schema-service-screenViewId'
        screenViewVersion:
          $ref: '#/components/schemas/schema-service-screenViewVersion'
    schema-service-screenViewAuthor:
      type: object
      description: Information about the user who created this screen view
      required:
      - id
      properties:
        id:
          type: integer
          description: ID of the user
        name:
          type: string
          description: Name of the user
        avatar:
          type: string
          description: URL of the author's avatar image
    schema-service-UpdatedAt:
      type: string
      format: date-time
      description: Last update time
    schema-service-CreatedAt:
      type: string
      description: Creation date
      format: date-time
    schema-service-hashId:
      type: string
      description: Hash ID of the version. Consists of the UUID of the screen view and and the version ID.
      example: bb6639b2-a98e-49d9-804f-ed6c0e2a0d2f:2019-12-05T08:22:10.094
    schema-service-path:
      type: string
      description: Url Path.
      example: /screenView
    schema-service-DeletedAt:
      type: string
      format: date-time
      description: Deletion time, if applicable
      nullable: true
    schema-service-GenerateScreenViewResponse:
      type: object
      required:
      - id
      - version
      - hash
      - businessProfileId
      - name
      - priority
      - audience
      - createdAt
      - updatedAt
      - path
      - data
      properties:
        id:
          $ref: '#/components/schemas/schema-service-screenViewId'
        version:
          $ref: '#/components/schemas/schema-service-screenViewVersion'
        parentVersion:
          $ref: '#/components/schemas/schema-service-screenViewParentVersion'
        name:
          $ref: '#/components/schemas/schema-service-screenViewName'
        priority:
          $ref: '#/components/schemas/schema-service-screenViewPriority'
        audience:
          $ref: '#/components/schemas/schema-service-Audience'
        createdAt:
          $ref: '#/components/schemas/schema-service-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/schema-service-UpdatedAt'
        hash:
          $ref: '#/components/schemas/schema-service-hashId'
        path:
          $ref: '#/components/schemas/schema-service-path'
        data:
          type: object
    schema-service-screenViewLegacy:
      type: object
      required:
      - id
      - businessProfileId
      - name
      - status
      - priority
      - scheduled
      - author
      - content
      - audience
      - createdAt
      - updatedAt
      - directory
      - feed
      properties:
        id:
          $ref: '#/components/schemas/schema-service-screenViewId'
        version:
          $ref: '#/components/schemas/schema-service-screenViewVersion'
        parentVersion:
          $ref: '#/components/schemas/schema-service-screenViewParentVersion'
        businessProfileId:
          $ref: '#/components/schemas/schema-service-screenViewBpId'
        name:
          $ref: '#/components/schemas/schema-service-screenViewName'
        description:
          $ref: '#/components/schemas/schema-service-screenViewDescription'
        status:
          $ref: '#/components/schemas/schema-service-screenViewStatus'
        priority:
          $ref: '#/components/schemas/schema-service-screenViewPriority'
        scheduled:
          $ref: '#/components/schemas/schema-service-screenViewScheduled'
        author:
          $ref: '#/components/schemas/schema-service-screenViewAuthor'
        content:
          $ref: '#/components/schemas/schema-service-ScreenViewContentLegacy'
        audience:
          $ref: '#/components/schemas/schema-service-Audience'
        createdAt:
          $ref: '#/components/schemas/schema-service-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/schema-service-UpdatedAt'
        deletedAt:
          $ref: '#/components/schemas/schema-service-DeletedAt'
        directory:
          $ref: '#/components/schemas/schema-service-Directory'
        feed:
          $ref: '#/components/schemas/schema-service-Feed'
    schema-service-screenView:
      type: object
      required:
      - id
      - businessProfileId
      - name
      - status
      - priority
      - scheduled
      - author
      - content
      - audience
      - createdAt
      - updatedAt
      - directory
      - feed
      properties:
        id:
          $ref: '#/components/schemas/schema-service-screenViewId'
        businessProfileId:
          $ref: '#/components/schemas/schema-service-screenViewBpId'
        name:
          $ref: '#/components/schemas/schema-service-screenViewName'
        description:
          $ref: '#/components/schemas/schema-service-screenViewDescription'
        status:
          $ref: '#/components/schemas/schema-service-screenViewStatus'
        priority:
          $ref: '#/components/schemas/schema-service-screenViewPriority'
        scheduled:
          $ref: '#/components/schemas/schema-service-screenViewScheduled'
        author:
          $ref: '#/components/schemas/schema-service-screenViewAuthor'
        content:
          $ref: '#/components/schemas/schema-service-ScreenViewContent'
        audience:
          $ref: '#/components/schemas/schema-service-Audience'
        createdAt:
          $ref: '#/components/schemas/schema-service-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/schema-service-UpdatedAt'
        deletedAt:
          $ref: '#/components/schemas/schema-service-DeletedAt'
        directory:
          $ref: '#/components/schemas/schema-service-Directory'
        feed:
          $ref: '#/components/schemas/schema-service-Feed'
    schema-service-pagination:
      type: object
      description: Pagination metadata
      required:
      - limit
      - page
      - pages
      - total
      properties:
        limit:
          type: integer
          description: The number of items per page
        page:
          type: integer
          description: The current page
        pages:
          type: integer
          description: The total number of pages
        total:
          type: integer
          description: The total number of items on all pages
    schema-service-documentsResponse:
      type: object
      properties:
        data:
          type: array
          description: A list of documents that match the request
          items:
            $ref: '#/components/schemas/schema-service-documentView'
        total:
          type: integer
          description: The total number of documents that match the request
        offset:
          type: integer
          description: The current offset
        limit:
          type: integer
          description: The maximum number of items to retrieve for pagination
    schema-service-documentView:
      type: object
      properties:
        author:
          $ref: '#/components/schemas/schema-service-documentAuthor'
        content:
          $ref: '#/components/schemas/schema-service-documentContent'
        createdAt:
          $ref: '#/components/schemas/schema-service-CreatedAt'
        description:
          $ref: '#/components/schemas/schema-service-documentDescription'
        id:
          type: integer
          description: Document ID. Generated automatically.
        isActive:
          $ref: '#/components/schemas/schema-service-documentIsActive'
        name:
          $ref: '#/components/schemas/schema-service-documentName'
        published:
          $ref: '#/components/schemas/schema-service-documentPublished'
        schema:
          $ref: '#/components/schemas/schema-service-DocumentSchema'
        slug:
          $ref: '#/components/schemas/schema-service-DocumentSlug'
        uuid:
          type: string
          format: uuid
          description: Document UUID. Generated automatically.
        version:
          $ref: '#/components/schemas/schema-service-documentVersion'
    schema-service-screenViewScheduled:
      type: boolean
      description: Informs if the screen view has a defined schedule. Screen views scheduled to be published immediately after activation are considered to be scheduled, so only a draft screen view can have this property at `false`. Copied screen views inherit the schedule of their source.
    schema-service-documentIsActive:
      type: boolean
      description: Informs if the document is isActive
      default: true
    schema-service-documentPublished:
      type: boolean
      description: Publishing status
      default: false
    schema-service-documentAuthor:
      type: integer
      description: ID of the user who created this version of the document
    schema-service-documentName:
      type: string
      description: Document name
    schema-service-documentDescription:
      type: string
      description: Document description. Can be an empty string.
    schema-service-documentContent:
      type: object
      description: JSON content of the document
    schema-service-documentContentRaw:
      description: Content of the document. It can contain inserts.
      anyOf:
      - type: object
        example:
          someBoolean: true
          someString: Lorem ipsum
          aNestedDocument: '{% document exampleslug %}'
        additionalProperties: true
      - type: string
        example: '{% document exampleslug %}'
    schema-service-documentContentProcessed:
      description: Content of the document
      anyOf:
      - type: object
        description: The processed JSON content of the document
        additionalProperties:
          description: JSON keys in the document and their values
        example:
          someBoolean: true
          someString: Lorem ipsum
          aNestedDocument:
            uuid: 772d94f7-a604-409a-bfa9-24a64b8a5051
            slug: apple
            schema: fruit
            content:
              color: red
      - type: string
        description: Processed string value of a document (for example, a small document which only includes an insert to return an expression result)
    schema-service-documentGroupId:
      type: string
      format: uuid
      description: UUID of a document group. Groups can be used to organize documents. When creating a screen view campaign, entire groups can be included instead of selecting each document separately.
    schema-service-directoryId:
      type: string
      format: uuid
      description: |
        UUID of a directory. Directories can be used to organize documents and screen views for display in the Synerise Web Application.
        - If you want to organize documents for screen view campaigns, use document groups instead.
        - If you want to organize screen views for display, use screen view feeds instead.
    schema-service-documentVersion:
      type: string
      description: Document version
    schema-service-createDocumentReq:
      type: object
      required:
      - name
      - slug
      - schema
      - content
      - version
      - description
      properties:
        slug:
          $ref: '#/components/schemas/schema-service-DocumentSlug'
        schema:
          $ref: '#/components/schemas/schema-service-DocumentSchema'
        name:
          $ref: '#/components/schemas/schema-service-documentName'
        description:
          $ref: '#/components/schemas/schema-service-documentDescription'
        content:
          $ref: '#/components/schemas/schema-service-documentContent'
        version:
          $ref: '#/components/schemas/schema-service-documentVersion'
    schema-service-previewReq:
      type: object
      required:
      - content
      properties:
        content:
          $ref: '#/components/schemas/schema-service-documentContent'
        schema:
          $ref: '#/components/schemas/schema-service-DocumentSchema'
    schema-service-anyProp:
      description: Any JSON entity or entities
    schema-service-groupUuid:
      type: string
      format: uuid
      description: UUID of a document group
    schema-service-groupName:
      type: string
      description: Group name
    schema-service-ErrorSchemaService:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        errorCode:
          type: string
          description: |
            Code of the error, needed for troubleshooting

            See error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
        status:
          type: integer
          description: Error's HTTP status code
        message:
          type: string
          description: Description of the problem
    schema-service-AuthError:
      type: object
      properties:
        timestamp:
          type: string
          description: Time when the error occurred
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        status:
          type: integer
          format: int32
          description: HTTP status code
    synonyms-crud-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
      required:
      - timestamp
      - status
      - message
    synonyms-crud-PaginatedSynonyms:
      type: object
      properties:
        data:
          type: array
          description: A list of synonyms
          items:
            $ref: '#/components/schemas/synonyms-crud-SingleSynonym'
        meta:
          $ref: '#/components/schemas/synonyms-crud-PaginationMeta'
    synonyms-crud-PaginationMeta:
      type: object
      description: 'Optional pagination metadata (sent if `"includeMeta": true`)'
      properties:
        totalPages:
          type: number
          description: The total number of pages
        totalCount:
          type: number
          description: The total number of campaigns
        page:
          type: number
          description: The current page
        limit:
          type: number
          description: The maximal number of items on a page
        sortedBy:
          type: string
          description: The column (attribute) that the campaigns were sorted by
        ordering:
          type: string
          description: Sorting order
        code:
          type: number
          description: HTTP response code
        link:
          type: array
          description: Links to neighboring pages, first page, and last page in pagination
          items:
            type: object
            properties:
              url:
                description: Page URL
                type: string
              rel:
                type: string
                description: Position of the linked page
                enum:
                - first
                - next
                - prev
                - last
    synonyms-crud-SingleSynonym:
      type: object
      description: Details of a single synonym
      properties:
        id:
          $ref: '#/components/schemas/synonyms-crud-SynonymId'
        type:
          $ref: '#/components/schemas/synonyms-crud-Type'
        word:
          $ref: '#/components/schemas/synonyms-crud-Word'
        synonyms:
          $ref: '#/components/schemas/synonyms-crud-Synonyms'
        createdAt:
          type: string
          description: Creation timestamp
        updatedAt:
          type: string
          description: Last update timestamp
        confidence:
          $ref: '#/components/schemas/synonyms-crud-Confidence'
        reason:
          $ref: '#/components/schemas/synonyms-crud-Reason'
        source:
          $ref: '#/components/schemas/synonyms-crud-SynonymSource'
        state:
          $ref: '#/components/schemas/synonyms-crud-SynonymState'
    synonyms-crud-BatchResponse:
      type: object
      properties:
        attemptedInserts:
          type: integer
          description: The number of attempted insertions
        actualInserts:
          type: integer
          description: The number of successful insertions
        errors:
          type: array
          description: A list of errors
          items:
            type: string
    synonyms-crud-SynonymId:
      type: integer
      description: Identifier of the synonym
    synonyms-crud-Word:
      type: string
      description: 'The phrase that the synonym relates to. If `type: synonyms`, do not send this value.'
    synonyms-crud-Synonyms:
      type: array
      description: A list of synonyms
      items:
        type: string
    synonyms-crud-Type:
      type: string
      description: |
        Type of the synonym.

          - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.
          - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.
      enum:
      - oneway
      - synonyms
      default: oneway
    synonyms-crud-SynonymSource:
      type: string
      description: Origin of the synonym
      enum:
      - User
      - Agent
      - Import
      default: User
    synonyms-crud-SynonymState:
      type: string
      description: Current state of the synonym
      enum:
      - New
      - Accepted
      - Pending
      - Rejected
      default: Accepted
    synonyms-crud-Confidence:
      type: number
      format: float
      minimum: 0.0
      maximum: 1.0
      nullable: true
      description: Confidence score of the synonym (0.0 to 1.0)
    synonyms-crud-Reason:
      type: string
      nullable: true
      maxLength: 1024
      description: Reason or explanation for the synonym suggestion
    tags-collector-CreatedAt-collector:
      type: string
      format: date-time
      description: Creation time
    tags-collector-DirectoryCreateRequest-collector:
      type: object
      required:
      - name
      properties:
        name:
          $ref: '#/components/schemas/tags-collector-DirectoryName-collector'
        params:
          $ref: '#/components/schemas/tags-collector-DirectoryParams-collector'
        type:
          $ref: '#/components/schemas/tags-collector-DirectoryTypeHash-collector'
    tags-collector-DirectoryDto-collector:
      type: object
      description: Information about the directory where the tag is assigned. Can be `null`.
      properties:
        createdAt:
          $ref: '#/components/schemas/tags-collector-CreatedAt-collector'
        hash:
          type: string
          description: HashID of the directory
        name:
          $ref: '#/components/schemas/tags-collector-DirectoryName-collector'
        params:
          $ref: '#/components/schemas/tags-collector-DirectoryParams-collector'
        type:
          $ref: '#/components/schemas/tags-collector-DirectoryTypeDto-collector'
    tags-collector-DirectoryName-collector:
      type: string
      description: Name of the directory
    tags-collector-DirectoryParams-collector:
      type: object
      description: Free-form parameters
      additionalProperties:
        anyOf:
        - type: string
        - type: number
        - type: boolean
    tags-collector-DirectoryTypeHash-collector:
      type: string
      description: HashID of the directory type
    tags-collector-DirectoryTypeCreateRequest-collector:
      type: object
      required:
      - name
      properties:
        name:
          $ref: '#/components/schemas/tags-collector-DirectoryTypeName-collector'
    tags-collector-DirectoryTypeDto-collector:
      type: object
      description: Details of the directory type
      properties:
        createdAt:
          $ref: '#/components/schemas/tags-collector-CreatedAt-collector'
        hash:
          $ref: '#/components/schemas/tags-collector-DirectoryTypeHash-collector'
        name:
          $ref: '#/components/schemas/tags-collector-DirectoryTypeName-collector'
    tags-collector-DirectoryTypeName-collector:
      type: string
      description: Name of the directory type
    tags-collector-DirectoryTypeUpdateRequest-collector:
      type: object
      properties:
        directoryTypeHash:
          type: string
          description: HashID of the directory type
    tags-collector-DirectoryUpdateRequest-collector:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/tags-collector-DirectoryName-collector'
        params:
          $ref: '#/components/schemas/tags-collector-DirectoryParams-collector'
    tags-collector-TagHash-collector:
      type: string
      description: HashID of a tag
    tags-collector-PaginatedDirectoryDto-collector:
      type: object
      description: Details of the directory where the tag is assigned
      properties:
        createdAt:
          $ref: '#/components/schemas/tags-collector-CreatedAt-collector'
        hash:
          type: string
          description: Hash ID of the directory
        name:
          $ref: '#/components/schemas/tags-collector-DirectoryName-collector'
        type:
          $ref: '#/components/schemas/tags-collector-DirectoryTypeDto-collector'
    tags-collector-PaginatedTagDto-collector:
      type: object
      properties:
        authorId:
          $ref: '#/components/schemas/tags-collector-UserId-collector'
        color:
          $ref: '#/components/schemas/tags-collector-TagColor-collector'
        createdAt:
          $ref: '#/components/schemas/tags-collector-CreatedAt-collector'
        description:
          type: string
          description: Description of the tag
        directory:
          $ref: '#/components/schemas/tags-collector-PaginatedDirectoryDto-collector'
        hash:
          $ref: '#/components/schemas/tags-collector-TagHash-collector'
        icon:
          $ref: '#/components/schemas/tags-collector-TagIcon-collector'
        priority:
          $ref: '#/components/schemas/tags-collector-TagPriority-collector'
        value:
          $ref: '#/components/schemas/tags-collector-TagValue-collector'
    tags-collector-PaginationInfo-collector:
      type: object
      description: Pagination details
      properties:
        limit:
          type: integer
          format: int32
          description: Limit of items per page
          default: 10
        page:
          type: integer
          format: int32
          description: Current page number
          default: 0
        pages:
          type: integer
          format: int32
          description: Total number of pages
        total:
          type: integer
          format: int64
          description: Total number of items on all pages
    tags-collector-TagColor-collector:
      type: string
      description: Hex code of the tag color
      nullable: true
    tags-collector-TagCreateRequest-collector:
      type: object
      required:
      - value
      - priority
      properties:
        color:
          $ref: '#/components/schemas/tags-collector-TagColor-collector'
        description:
          $ref: '#/components/schemas/tags-collector-TagDescription-collector'
        directory:
          $ref: '#/components/schemas/tags-collector-TagDirectory-collector'
        icon:
          $ref: '#/components/schemas/tags-collector-TagIcon-collector'
        priority:
          $ref: '#/components/schemas/tags-collector-TagPriority-collector'
        value:
          $ref: '#/components/schemas/tags-collector-TagValue-collector'
    tags-collector-TagDescription-collector:
      type: string
      description: Description of the tag
    tags-collector-TagDirectory-collector:
      type: string
      description: Hash ID of the directory where the tag is assigned
      nullable: true
    tags-collector-TagDto-collector:
      type: object
      properties:
        authorId:
          $ref: '#/components/schemas/tags-collector-UserId-collector'
        color:
          $ref: '#/components/schemas/tags-collector-TagColor-collector'
        createdAt:
          $ref: '#/components/schemas/tags-collector-CreatedAt-collector'
        description:
          $ref: '#/components/schemas/tags-collector-TagDescription-collector'
        directory:
          $ref: '#/components/schemas/tags-collector-DirectoryDto-collector'
        hash:
          type: string
          description: Hash ID of the tag
        icon:
          $ref: '#/components/schemas/tags-collector-TagIcon-collector'
        priority:
          $ref: '#/components/schemas/tags-collector-TagPriority-collector'
        value:
          $ref: '#/components/schemas/tags-collector-TagValue-collector'
    tags-collector-TagIcon-collector:
      type: string
      description: URL of the tag's icon
      nullable: true
    tags-collector-TagPriority-collector:
      type: integer
      description: Tag priority. Lower values mean higher priority.
      default: 0
    tags-collector-TagUpdateRequest-collector:
      type: object
      properties:
        color:
          $ref: '#/components/schemas/tags-collector-TagColor-collector'
        description:
          $ref: '#/components/schemas/tags-collector-TagDescription-collector'
        directory:
          $ref: '#/components/schemas/tags-collector-TagDirectory-collector'
        icon:
          $ref: '#/components/schemas/tags-collector-TagIcon-collector'
        priority:
          $ref: '#/components/schemas/tags-collector-TagPriority-collector'
        value:
          $ref: '#/components/schemas/tags-collector-TagValue-collector'
    tags-collector-TagValue-collector:
      type: string
      description: Name of the tag
    tags-collector-UserId-collector:
      type: integer
      description: ID of the user who created the tag
    tags-collector-PaginationResponse_PaginatedTagDto_:
      type: object
      properties:
        data:
          type: array
          description: A list of tags on the retrieved page
          items:
            $ref: '#/components/schemas/tags-collector-PaginatedTagDto-collector'
        pagination:
          $ref: '#/components/schemas/tags-collector-PaginationInfo-collector'
    template-backend-TemplateId:
      type: integer
      format: int64
      description: Template ID
    template-backend-TemplateHashId:
      type: string
      description: Template hashId (UUID)
      example: e0326a2d-7697-4ae9-b490-31f97041adcb
    template-backend-BusinessProfileId:
      type: integer
      description: Workspace ID
      example: 594
    template-backend-TemplateType:
      type: string
      description: Template type
      example: EMAIL
      default: null
      nullable: true
      enum:
      - SMS
      - MOBILE_PUSH
      - WEB_PUSH
      - DYNAMIC_CONTENT
      - LANDING_PAGE
      - EMAIL
      - SOCIAL_MEDIA
      - IN_APP
      - null
    template-backend-Source:
      type: integer
      format: int64
      description: |
        Information about used editor. Currently accepted builder are
        - `LACK_OF_INFORMATION` = 0
        - `BEE_FREE_EDITOR` = 1
        - `DYNAMIC_CONTENT_CODE_EDITOR` = 2
        - `MAIL_EDITOR` = 3
        - `SMS_EDITOR` = 4
        - `WEB_PUSH_EDITOR` = 5
        - `MOBILE_SIMPLE_PUSH_VISUAL_EDITOR` = 6
        - `MOBILE_SILENT_PUSH_CODE_EDITOR` = 7
        - `FACEBOOK_POST_EDITOR` = 13
        - `IMPORT_FROM_ZIP` = 14
        - `IMPORT_FROM_URL` = 15
        - `GRAPES_EDITOR` = 16
        - `VISUAL_BUILDER` = 17
        - `LANDING_PAGE_ADVANCED_DRAG_AND_DROP` = 18
        - `WEB_BEE_FREE_EDITOR` = 19
        - `MOBILE_SIMPLE_PUSH_CODE_EDITOR` = 20
        - `LANDING_PAGE_CODE_EDITOR` = 21
        - `LANDING_PAGE_BASIC_DRAG_AND_DROP` = 22
    template-backend-IncludeSafeArea:
      type: boolean
      description: Define if in_app template should include safe area
      default: false
      nullable: true
    template-backend-TemplateSubType:
      type: string
      description: |
        Template subtype. Currently accepted subtypes are
        - `BANNER` (can be used with mobile push)
        - `TOP_BAR`, `BOTTOM_BAR`, `MODAL` (can be used with in app notifications)
        - `null`.
      example: BANNER
      nullable: true
      default: null
      enum:
      - BANNER
      - TOP_BAR
      - BOTTOM_BAR
      - MODAL
      - null
    template-backend-TemplateContentType:
      type: string
      enum:
      - TEMPLATE
      - BLOCK
      example: TEMPLATE
    template-backend-CreatedAt:
      type: string
      description: Time of creation
      format: date-time
      example: '2019-03-21T12:31:26Z'
    template-backend-UpdateAt:
      type: string
      description: Time of last update
      example: '2019-03-21T12:31:26Z'
    template-backend-ThumbnailUrl:
      type: string
      description: URL of the template's thumbnail
      example: https://foo.bar
    template-backend-Author:
      type: integer
      format: int64
      description: Author ID
      example: 123
    template-backend-TemplateContent:
      type: string
      description: |
        Template content as a **stringified, escaped object**.

        This includes HTML, JS, CSS, and other data, depending on the template type.
      example: '{"json":"","html":"<p>some text</p>","css":"p {\n    font-weight: bold\n}","js":"console.log(\"test\")","raw":"<html><head><style type=\"text/css\">p {\n    font-weight: bold\n}</style></head><body><p>some text</p></body></html>","source":2}'
    template-backend-TemplateName:
      type: string
      description: Name of the template
      default: null
      nullable: true
    template-backend-TemplateStatus:
      type: string
      description: Approval status of the template. If approvals are disabled, the status is null.
      nullable: true
      enum:
      - DRAFT
      - REVIEW
      - APPROVED
      - REJECTED
    template-backend-ParsedData:
      type: object
      properties:
        links:
          type: object
    template-backend-ParsedContent:
      type: string
    template-backend-FunctionType:
      type: string
      description: Function type
      example: Password Change
    template-backend-DirectoryIdForSave:
      type: string
      format: uuid
      description: UUID of the directory where the template will be saved
      example: e0326a2d-7697-4ae9-b490-31f97041adcb
    template-backend-TemplateOverviewResponse:
      type: object
      required:
      - id
      - hashId
      - name
      - businessProfileId
      - type
      - subtype
      - contentType
      - createdAt
      - updatedAt
      - directory
      - thumbnailUrl
      - author
      - status
      - source
      properties:
        id:
          $ref: '#/components/schemas/template-backend-TemplateId'
        hashId:
          $ref: '#/components/schemas/template-backend-TemplateHashId'
        name:
          $ref: '#/components/schemas/template-backend-TemplateName'
        businessProfileId:
          $ref: '#/components/schemas/template-backend-BusinessProfileId'
        type:
          $ref: '#/components/schemas/template-backend-TemplateType'
        subtype:
          $ref: '#/components/schemas/template-backend-TemplateSubType'
        contentType:
          $ref: '#/components/schemas/template-backend-TemplateContentType'
        createdAt:
          $ref: '#/components/schemas/template-backend-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/template-backend-UpdateAt'
        directory:
          $ref: '#/components/schemas/template-backend-DirectoryResponse'
        thumbnailUrl:
          $ref: '#/components/schemas/template-backend-ThumbnailUrl'
        author:
          $ref: '#/components/schemas/template-backend-Author'
        status:
          $ref: '#/components/schemas/template-backend-TemplateStatus'
        source:
          $ref: '#/components/schemas/template-backend-Source'
    template-backend-TemplateDetailsResponse:
      type: object
      required:
      - id
      - hashId
      - businessProfileId
      - name
      - templateContent
      - type
      - subtype
      - thumbnailUrl
      - directory
      - createdAt
      - updatedAt
      - parsedData
      - parsedContent
      - functionType
      - author
      - status
      - source
      properties:
        id:
          $ref: '#/components/schemas/template-backend-TemplateId'
        hashId:
          $ref: '#/components/schemas/template-backend-TemplateHashId'
        businessProfileId:
          $ref: '#/components/schemas/template-backend-BusinessProfileId'
        name:
          $ref: '#/components/schemas/template-backend-TemplateName'
        templateContent:
          $ref: '#/components/schemas/template-backend-TemplateContent'
        type:
          $ref: '#/components/schemas/template-backend-TemplateType'
        subtype:
          $ref: '#/components/schemas/template-backend-TemplateSubType'
        contentType:
          $ref: '#/components/schemas/template-backend-TemplateContentType'
        thumbnailUrl:
          $ref: '#/components/schemas/template-backend-ThumbnailUrl'
        directory:
          $ref: '#/components/schemas/template-backend-DirectoryResponse'
        createdAt:
          $ref: '#/components/schemas/template-backend-CreatedAt'
        updatedAt:
          $ref: '#/components/schemas/template-backend-UpdateAt'
        parsedData:
          $ref: '#/components/schemas/template-backend-ParsedData'
        parsedContent:
          $ref: '#/components/schemas/template-backend-ParsedContent'
        functionType:
          $ref: '#/components/schemas/template-backend-FunctionType'
        author:
          $ref: '#/components/schemas/template-backend-Author'
        status:
          $ref: '#/components/schemas/template-backend-TemplateStatus'
        source:
          $ref: '#/components/schemas/template-backend-Source'
        includeSafeArea:
          $ref: '#/components/schemas/template-backend-IncludeSafeArea'
    template-backend-TemplateResponse:
      type: object
      required:
      - html
      - css
      - date
      properties:
        html:
          nullable: true
          type: string
          description: Template content in HTML
        css:
          nullable: true
          type: string
          description: Template CSS
        date:
          $ref: '#/components/schemas/template-backend-CreatedAt'
    template-backend-DirectoryResponse:
      type: object
      description: Details of the directory that includes this template
      required:
      - hashId
      - name
      - readOnly
      - createdAt
      - default
      - type
      properties:
        hashId:
          type: string
          format: uuid
          example: e0326a2d-7697-4ae9-b490-31f97041adcb
          description: Directory hashId (UUID)
        name:
          type: string
          description: Name of the directory
        readOnly:
          type: boolean
          example: true
          description: '`true` when the directory is read-only'
        createdAt:
          $ref: '#/components/schemas/template-backend-CreatedAt'
        type:
          nullable: true
          type: string
          description: Directory type
          example: EMAIL
        contentType:
          $ref: '#/components/schemas/template-backend-TemplateContentType'
        default:
          type: boolean
          example: true
          description: When `true`, this template belongs to one of the default folders
        predefined:
          type: boolean
          example: true
    template-backend-TemplateCreateRequest:
      type: object
      required:
      - content
      - directory
      - source
      properties:
        name:
          $ref: '#/components/schemas/template-backend-TemplateName'
        type:
          $ref: '#/components/schemas/template-backend-TemplateType'
        subtype:
          $ref: '#/components/schemas/template-backend-TemplateSubType'
        contentType:
          $ref: '#/components/schemas/template-backend-TemplateContentType'
        directory:
          $ref: '#/components/schemas/template-backend-DirectoryIdForSave'
        content:
          $ref: '#/components/schemas/template-backend-TemplateContent'
        source:
          $ref: '#/components/schemas/template-backend-Source'
        includeSafeArea:
          $ref: '#/components/schemas/template-backend-IncludeSafeArea'
        hidden:
          type: boolean
          description: Define if the template is hidden
          default: false
          nullable: true
        temporal:
          type: boolean
          description: Define if template can be deleted if was not used in any place
          default: false
          nullable: true
    template-backend-FunctionTemplateCreateRequest:
      type: object
      required:
      - directory
      - content
      - functionType
      properties:
        name:
          type: string
          description: Template name
          example: name
          default: null
        content:
          type: string
          description: Template content
          example: <html><h1>Content</h1></html>
        functionType:
          $ref: '#/components/schemas/template-backend-FunctionType'
        directory:
          $ref: '#/components/schemas/template-backend-DirectoryIdForSave'
    template-backend-DefaultTemplateDetailsResponse:
      type: object
      required:
      - id
      - hashId
      - businessProfileId
      - type
      - subtype
      - functionType
      - thumbnailUrl
      - createdAt
      - createdBy
      properties:
        id:
          $ref: '#/components/schemas/template-backend-TemplateId'
        hashId:
          $ref: '#/components/schemas/template-backend-TemplateHashId'
        businessProfileId:
          $ref: '#/components/schemas/template-backend-BusinessProfileId'
        type:
          $ref: '#/components/schemas/template-backend-TemplateType'
        subtype:
          $ref: '#/components/schemas/template-backend-TemplateSubType'
        functionType:
          nullable: true
          type: string
          description: Function type
          example: Password Change
        thumbnailUrl:
          $ref: '#/components/schemas/template-backend-ThumbnailUrl'
        createdAt:
          $ref: '#/components/schemas/template-backend-CreatedAt'
        createdBy:
          $ref: '#/components/schemas/template-backend-Author'
    template-backend-TemplateUpdateRequest:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/template-backend-TemplateName'
        content:
          $ref: '#/components/schemas/template-backend-TemplateContent'
        includeSafeArea:
          $ref: '#/components/schemas/template-backend-IncludeSafeArea'
    template-backend-MoveTemplatesRequest:
      type: object
      required:
      - templateHashIds
      - directoryHash
      properties:
        templateHashIds:
          type: array
          description: List of templates to move, identified by hashIds (UUIDs)
          items:
            type: string
            format: uuid
            example: 2ede34f8-1c27-4131-bfb1-5c88856882e1
        directoryHash:
          type: string
          description: UUID of the directory where the template will be moved
          example: 2ede34f8-1c27-4131-bfb1-5c88856882e1
    template-backend-DirectoryCreateRequest:
      type: object
      required:
      - type
      - name
      properties:
        name:
          type: string
          description: Name of the directory
        type:
          $ref: '#/components/schemas/template-backend-TemplateType'
        readOnly:
          type: boolean
          description: Define if the directory is read-only
          default: false
        contentType:
          $ref: '#/components/schemas/template-backend-TemplateContentType'
    template-backend-PreviewHashId:
      type: string
      description: Preview hashId (UUID)
      example: e0326a2d-7697-4ae9-b490-31f97041adcb
    template-backend-Html:
      type: string
      description: Html of the preview
    template-backend-Css:
      type: string
      description: Css of the preview
    template-backend-Js:
      type: string
      description: Js of the preview
    template-backend-PreviewCreateRequest:
      type: object
      required:
      - html
      - css
      - js
      properties:
        html:
          $ref: '#/components/schemas/template-backend-Html'
        css:
          $ref: '#/components/schemas/template-backend-Css'
        js:
          $ref: '#/components/schemas/template-backend-Js'
        previewContext:
          $ref: '#/components/schemas/template-backend-PreviewContext'
    template-backend-PreviewContext:
      type: object
      required:
      - campaignId
      - variantId
      properties:
        campaignId:
          type: string
        variantId:
          type: string
    template-backend-PreviewUpdateRequest:
      type: object
      required:
      - html
      - css
      - js
      properties:
        html:
          $ref: '#/components/schemas/template-backend-Html'
        css:
          $ref: '#/components/schemas/template-backend-Css'
        js:
          $ref: '#/components/schemas/template-backend-Js'
        previewContext:
          $ref: '#/components/schemas/template-backend-PreviewContext'
    template-backend-PreviewGetResponse:
      type: object
      required:
      - html
      - css
      - js
      properties:
        html:
          $ref: '#/components/schemas/template-backend-Html'
        css:
          $ref: '#/components/schemas/template-backend-Css'
        js:
          $ref: '#/components/schemas/template-backend-Js'
        previewContext:
          $ref: '#/components/schemas/template-backend-PreviewContext'
    template-backend-PreviewResponse:
      type: object
      required:
      - id
      - html
      - css
      - js
      properties:
        id:
          $ref: '#/components/schemas/template-backend-PreviewHashId'
        html:
          $ref: '#/components/schemas/template-backend-Html'
        css:
          $ref: '#/components/schemas/template-backend-Css'
        js:
          $ref: '#/components/schemas/template-backend-Js'
        previewContext:
          $ref: '#/components/schemas/template-backend-PreviewContext'
    uauth-Error:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Time when the error occurred
        status:
          type: integer
          description: Status code
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        path:
          type: string
          description: URL of the requested resource
    uauth-BusinessProfileAuthenticationRequest:
      required:
      - apiKey
      type: object
      properties:
        apiKey:
          type: string
          description: |
            Workspace API key

            <span style="color:red"><strong>WARNING:</strong></span> Workspace API keys can be used to access all customer data and manage the workspace. They should only be used for server-to-server communication in integrations. **DO NOT use workspace API keys in your mobile applications or websites**.
          example: 64c09614-1b2a-42f7-804d-f647243eb1ab
    uauth-TokenResponse:
      type: object
      properties:
        token:
          type: string
          description: '[JWT](https://jwt.io) token'
    uauth-ApiConsumer:
      type: object
      description: Details of the authenticated user
      properties:
        type:
          type: string
          enum:
          - USER
        businessProfileId:
          type: integer
          description: ID of the selected workspace
        name:
          type: string
          description: The user's login
        id:
          type: integer
          description: ID of the user
        authorities:
          type: array
          description: A list of permissions
          items:
            type: string
        roles:
          type: string
          description: IDs of the roles assigned to the user
    uauth-AuthenticationResponse:
      required:
      - consumer
      type: object
      properties:
        consumer:
          $ref: '#/components/schemas/uauth-ApiConsumer'
        mfaMethods:
          type: array
          items:
            type: string
            enum:
            - TOTP_AUTHENTICATOR
            - EMAIL
            - SMS
        authorizationError:
          $ref: '#/components/schemas/uauth-AuthorizationError'
        multiFactorCodeSent:
          $ref: '#/components/schemas/uauth-MultiFactorSendCodeResponse'
        defaultMfaMethod:
          type: string
          enum:
          - TOTP_AUTHENTICATOR
          - EMAIL
          - SMS
        forcedToSetMfa:
          type: boolean
    uauth-AuthorizationError:
      type: string
      enum:
      - USER_FORCED_TO_CHANGE_PASSWORD
    uauth-BusinessProfileGuid:
      type: string
      description: UUID of the workspace
    uauth-BusinessProfileId:
      type: integer
      description: ID of the workspace
    uauth-BusinessProfileAccessRestriction:
      type: string
      enum:
      - 'OFF'
      - PASS
      - FAIL
      - ENFORCED
    uauth-BusinessProfileInvitationResponse:
      type: object
      properties:
        success:
          type: array
          items:
            type: string
          description: List of successfully invited email addresses
        fail:
          type: array
          items:
            $ref: '#/components/schemas/uauth-BusinessProfileInvitationFail'
          description: List of failed invitations
    uauth-BusinessProfileInvitationFail:
      type: object
      properties:
        email:
          type: string
        cause:
          type: string
    uauth-BusinessProfileInvitationRequest:
      type: object
      properties:
        email:
          $ref: '#/components/schemas/uauth-UserEmail'
        firstName:
          $ref: '#/components/schemas/uauth-UserFirstName'
        lastName:
          $ref: '#/components/schemas/uauth-UserLastName'
        roles:
          $ref: '#/components/schemas/uauth-UserRoles'
    uauth-BusinessProfileBulkInvitationRequest:
      type: object
      properties:
        invitations:
          type: array
          description: An array of users to invite
          items:
            $ref: '#/components/schemas/uauth-BusinessProfileInvitationRequest'
    uauth-BusinessProfilePasswordSettingsData:
      type: object
      properties:
        attempts:
          $ref: '#/components/schemas/uauth-PasswordAttempts'
        block:
          $ref: '#/components/schemas/uauth-PasswordBlock'
        businessProfileId:
          $ref: '#/components/schemas/uauth-BusinessProfileId'
        different:
          $ref: '#/components/schemas/uauth-PasswordDifferent'
        digits:
          $ref: '#/components/schemas/uauth-PasswordDigits'
        expiration:
          $ref: '#/components/schemas/uauth-PasswordExpiration'
        lowerLetters:
          $ref: '#/components/schemas/uauth-PasswordLowerLetters'
        maxIdleTime:
          $ref: '#/components/schemas/uauth-PasswordMaxIdleTime'
        maxLength:
          $ref: '#/components/schemas/uauth-PasswordMaxLength'
        minLength:
          $ref: '#/components/schemas/uauth-PasswordMinLength'
        nextChange:
          $ref: '#/components/schemas/uauth-PasswordNextChange'
        specialChars:
          $ref: '#/components/schemas/uauth-PasswordSpecialChars'
        upperLetters:
          $ref: '#/components/schemas/uauth-PasswordUpperLetters'
    uauth-CurrentBusinessProfileResponse:
      type: object
      properties:
        selected:
          type: boolean
        data:
          $ref: '#/components/schemas/uauth-BusinessProfileWithLabelsResponse'
    uauth-MarkUserFavoriteBusinessProfile:
      type: object
      properties:
        businessProfileGuid:
          type: string
        favorite:
          type: boolean
    uauth-BusinessProfileWithLabelsResponse:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        logo:
          type: string
        businessProfileGuid:
          type: string
        created:
          type: string
          format: date-time
        subdomain:
          type: string
        ipRestriction:
          $ref: '#/components/schemas/uauth-BusinessProfileAccessRestriction'
        mfaRestriction:
          $ref: '#/components/schemas/uauth-BusinessProfileAccessRestriction'
        labels:
          type: array
          items:
            type: string
        emailAttributeName:
          type: string
        organizationGuid:
          type: string
        businessProfileGroup:
          $ref: '#/components/schemas/uauth-BusinessProfileGroupSimpleResponse'
    uauth-BusinessProfileGroupSimpleResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        profileIdentifier:
          type: string
    uauth-BusinessProfileResponse:
      type: object
      properties:
        businessProfileGuid:
          $ref: '#/components/schemas/uauth-BusinessProfileGuid'
        logo:
          type: string
          description: URL of the logo
        name:
          type: string
          description: Name of the workspace
        id:
          type: integer
          description: ID of the workspace
        created:
          type: string
          format: date-time
          description: Creation date
        subdomain:
          type: string
          description: Sub-domain of the workspace
        ipRestricted:
          type: boolean
          description: Informs if the workspace has IP access restrictions.
        mfaRequired:
          type: boolean
          description: Informs if the workspace is only accessible to users with multi-factor authentication enabled.
    uauth-BusinessProfileUserSpecific:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/uauth-BusinessProfileId'
        ipRestriction:
          $ref: '#/components/schemas/uauth-BusinessProfileAccessRestriction'
        mfaRestriction:
          $ref: '#/components/schemas/uauth-BusinessProfileAccessRestriction'
        favorite:
          type: boolean
    uauth-ChangePasswordRequest:
      type: object
      properties:
        currentPassword:
          type: string
          description: The current password
        newPassword:
          type: string
          description: The new password
    uauth-ChangePasswordResponse:
      type: object
      properties:
        status:
          type: string
          enum:
          - OK
    uauth-InvitationResponse:
      type: object
      properties:
        email:
          $ref: '#/components/schemas/uauth-UserEmail'
        firstName:
          $ref: '#/components/schemas/uauth-UserFirstName'
        lastName:
          $ref: '#/components/schemas/uauth-UserLastName'
    uauth-InvitationUpdateRequest:
      type: object
      properties:
        firstName:
          $ref: '#/components/schemas/uauth-UserFirstName'
        lastName:
          $ref: '#/components/schemas/uauth-UserLastName'
        roles:
          $ref: '#/components/schemas/uauth-UserRoles'
    uauth-OptionalInvitationToken:
      type: string
      description: Invitation token, received from another user
    uauth-PasswordResetConfirmation:
      type: object
      properties:
        token:
          $ref: '#/components/schemas/uauth-PasswordResetToken'
        password:
          type: string
          description: The new password
    uauth-PasswordResetRequest:
      required:
      - email
      type: object
      properties:
        email:
          $ref: '#/components/schemas/uauth-UserEmail'
    uauth-PasswordResetToken:
      type: string
      description: Password reset token received by email
    uauth-PasswordSettingsData:
      type: object
      properties:
        attempts:
          $ref: '#/components/schemas/uauth-PasswordAttempts'
        block:
          $ref: '#/components/schemas/uauth-PasswordBlock'
        different:
          $ref: '#/components/schemas/uauth-PasswordDifferent'
        digits:
          $ref: '#/components/schemas/uauth-PasswordDigits'
        expiration:
          $ref: '#/components/schemas/uauth-PasswordExpiration'
        lowerLetters:
          $ref: '#/components/schemas/uauth-PasswordLowerLetters'
        maxIdleTime:
          $ref: '#/components/schemas/uauth-PasswordMaxIdleTime'
        maxLength:
          $ref: '#/components/schemas/uauth-PasswordMaxLength'
        minLength:
          $ref: '#/components/schemas/uauth-PasswordMinLength'
        nextChange:
          $ref: '#/components/schemas/uauth-PasswordNextChange'
        specialChars:
          $ref: '#/components/schemas/uauth-PasswordSpecialChars'
        upperLetters:
          $ref: '#/components/schemas/uauth-PasswordUpperLetters'
    uauth-PermissionGroupDetailsDTO:
      type: object
      description: 'This schema is **recursive**: the `children` array can include more groups, which include more groups, etc.'
      properties:
        id:
          type: integer
          description: ID of the group
          format: int64
        name:
          $ref: '#/components/schemas/uauth-PermissionGroupName'
        slug:
          $ref: '#/components/schemas/uauth-PermissionGroupSlug'
        path:
          type: string
          description: Permission group path (uses names)
          example: Ancestor Group < Parent Group < This Group
        left:
          type: integer
          format: int32
          description: Used by the frontend
        right:
          type: integer
          description: Used by the frontend
        deep:
          type: integer
          description: Used by the frontend
        canCreate:
          type: boolean
          description: When TRUE, the `create` permission exists in this group.
        canRead:
          type: boolean
          description: When TRUE, the `read` permission exists in this group.
        canUpdate:
          type: boolean
          description: When TRUE, the `update` permission exists in this group.
        canDelete:
          type: boolean
          description: When TRUE, the `delete` permission exists in this group.
        canExecute:
          type: boolean
          description: When TRUE, the `execute` permission exists in this group.
        create:
          type: boolean
          description: When TRUE, the `create` permission is enabled.
        read:
          type: boolean
          description: When TRUE, the `read` permission is enabled.
        update:
          type: boolean
          description: When TRUE, the `update` permission is enabled.
        delete:
          type: boolean
          description: When TRUE, the `delete` permission is enabled.
        execute:
          type: boolean
          description: When TRUE, the `execute` permission is enabled.
        createDisabled:
          type: boolean
          description: When TRUE, the `create` permission cannot be changed.
        readDisabled:
          type: boolean
          description: When TRUE, the `read` permission cannot be changed.
        updateDisabled:
          type: boolean
          description: When TRUE, the `update` permission cannot be changed.
        deleteDisabled:
          type: boolean
          description: When TRUE, the `delete` permission cannot be changed.
        executeDisabled:
          type: boolean
          description: When TRUE, the `execute` permission cannot be changed.
        children:
          type: array
          description: 'An array of rule groups in this group. This schema is **recursive**: the `children` array can include more groups, which include more groups, etc.'
          items:
            $ref: '#/components/schemas/uauth-PermissionGroupDetailsDTO'
    uauth-ReactUserEditRequest:
      type: object
      properties:
        firstName:
          $ref: '#/components/schemas/uauth-UserFirstName'
        lastName:
          $ref: '#/components/schemas/uauth-UserLastName'
        avatar:
          $ref: '#/components/schemas/uauth-AvatarUrl'
        phone:
          $ref: '#/components/schemas/uauth-UserPhone'
        language:
          $ref: '#/components/schemas/uauth-UserLanguage'
        organizationRole:
          $ref: '#/components/schemas/uauth-UserOrganizationRole'
        introduction:
          $ref: '#/components/schemas/uauth-UserIntroduction'
        confirmed:
          $ref: '#/components/schemas/uauth-UserConfirmed'
        mailAccountId:
          $ref: '#/components/schemas/uauth-UserMailAccountId'
        description:
          $ref: '#/components/schemas/uauth-UserDescription'
        dateFormatNotation:
          type: string
          enum:
          - US
          - EU
        timeFormatNotation:
          type: string
          enum:
          - US
          - EU
        numberFormatNotation:
          type: string
          enum:
          - US
          - EU
    uauth-ReactOtherUserEditRequest:
      required:
      - roles
      allOf:
      - $ref: '#/components/schemas/uauth-ReactUserEditRequest'
      - type: object
        properties:
          roles:
            $ref: '#/components/schemas/uauth-UserRoles'
    uauth-ReactUserProlongAccessRequest:
      type: object
      properties:
        expirationDate:
          type: string
          description: New access expiration time (ISO 8601, UTC time unless timezone is specified)
          format: date-time
    uauth-ActivationRequest:
      type: object
      properties:
        ids:
          type: array
          description: An array of user IDs
          items:
            $ref: '#/components/schemas/uauth-UserIdInteger'
    uauth-ReactUserResponse:
      type: object
      properties:
        avatar:
          $ref: '#/components/schemas/uauth-AvatarUrl'
        confirmed:
          $ref: '#/components/schemas/uauth-UserConfirmed'
        created:
          $ref: '#/components/schemas/uauth-UserCreated'
        description:
          $ref: '#/components/schemas/uauth-UserDescription'
        displayName:
          $ref: '#/components/schemas/uauth-UserDisplayName'
        email:
          $ref: '#/components/schemas/uauth-UserEmail'
        firstName:
          $ref: '#/components/schemas/uauth-UserFirstName'
        id:
          $ref: '#/components/schemas/uauth-UserIdInteger'
        introduction:
          $ref: '#/components/schemas/uauth-UserIntroduction'
        isTheSameUserAsLoggedIn:
          $ref: '#/components/schemas/uauth-IsTheSameUserAsLoggedIn'
        language:
          $ref: '#/components/schemas/uauth-UserLanguage'
        lastLogin:
          $ref: '#/components/schemas/uauth-UserLastLogin'
        lastName:
          $ref: '#/components/schemas/uauth-UserLastName'
        mailAccountId:
          $ref: '#/components/schemas/uauth-UserMailAccountId'
        organizationRole:
          $ref: '#/components/schemas/uauth-UserOrganizationRole'
        phone:
          $ref: '#/components/schemas/uauth-UserPhone'
        roles:
          $ref: '#/components/schemas/uauth-UserRoles'
        status:
          $ref: '#/components/schemas/uauth-UserStatus'
        superAdmin:
          $ref: '#/components/schemas/uauth-UserSuperAdmin'
        updated:
          $ref: '#/components/schemas/uauth-UserUpdated'
        isMfaEnabled:
          $ref: '#/components/schemas/uauth-UserIsMfaEnabled'
        passwordLastModificationDate:
          $ref: '#/components/schemas/uauth-UserPasswordLastModificationDate'
        dateFormatNotation:
          type: string
          enum:
          - US
          - EU
        timeFormatNotation:
          type: string
          enum:
          - US
          - EU
        numberFormatNotation:
          type: string
          enum:
          - US
          - EU
    uauth-ReactUsersListing:
      type: object
      properties:
        data:
          type: array
          description: A list of users
          items:
            $ref: '#/components/schemas/uauth-ReactUsersListingEntry'
        meta:
          $ref: '#/components/schemas/uauth-PaginationMeta'
    uauth-ReactUsersListingEntry:
      type: object
      properties:
        avatar:
          $ref: '#/components/schemas/uauth-AvatarUrl'
        created:
          $ref: '#/components/schemas/uauth-UserCreated'
        displayName:
          $ref: '#/components/schemas/uauth-UserDisplayName'
        email:
          $ref: '#/components/schemas/uauth-UserEmail'
        firstName:
          $ref: '#/components/schemas/uauth-UserFirstName'
        id:
          $ref: '#/components/schemas/uauth-UserIdInteger'
        lastLogin:
          $ref: '#/components/schemas/uauth-UserLastLogin'
        lastName:
          $ref: '#/components/schemas/uauth-UserLastName'
        roleNames:
          $ref: '#/components/schemas/uauth-UserRoleNames'
        roles:
          $ref: '#/components/schemas/uauth-UserRoles'
        status:
          $ref: '#/components/schemas/uauth-UserStatus'
        updated:
          $ref: '#/components/schemas/uauth-UserUpdated'
    uauth-PaginationMeta:
      type: object
      description: Metadata of the request
      properties:
        pagination:
          $ref: '#/components/schemas/uauth-PaginationMetaPagination'
    uauth-PaginationMetaPagination:
      type: object
      description: Pagination metadata
      properties:
        limit:
          type: integer
          format: int32
          description: The number of entries per page
        page:
          type: integer
          format: int32
          description: Page number, starting with `0`
        pages:
          type: integer
          format: int32
          description: The total number of pages
        total:
          type: integer
          format: int32
          description: The total number of entries on all pages
    uauth-ResendConfirmationPayload:
      type: object
      properties:
        email:
          $ref: '#/components/schemas/uauth-UserEmail'
    uauth-RoleDataRequest:
      type: object
      required:
      - name
      - group
      properties:
        group:
          $ref: '#/components/schemas/uauth-RoleGroupId'
        name:
          $ref: '#/components/schemas/uauth-RoleName'
        description:
          $ref: '#/components/schemas/uauth-RoleDescription'
    uauth-RoleDescription:
      type: string
      description: Description of the role
    uauth-RoleName:
      type: string
      description: The name of the role
    uauth-RoleId:
      type: integer
      format: int64
      description: ID of the role
    uauth-RoleGroupId:
      type: integer
      format: int64
      description: ID of the group that includes this role
    uauth-PermissionGroupName:
      type: string
      description: Name of the permission group
    uauth-PermissionGroupSlug:
      type: string
      description: Slug of the permission group
    uauth-RoleGroupName:
      type: string
      description: Name of the role group
    uauth-RoleGroupDescription:
      type: string
      description: Description of the role group
    uauth-RoleGroupDataRequest:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/uauth-RoleGroupName'
        description:
          $ref: '#/components/schemas/uauth-RoleGroupDescription'
    uauth-RoleGroupResponse:
      type: object
      properties:
        data:
          type: array
          description: An array of roles in the group
          items:
            $ref: '#/components/schemas/uauth-RoleGroupRoleResponse'
        description:
          $ref: '#/components/schemas/uauth-RoleGroupDescription'
        editable:
          type: boolean
          description: Defines if the role group can be edited.
        id:
          type: integer
          format: int64
          description: ID of the role group
        name:
          $ref: '#/components/schemas/uauth-RoleGroupName'
    uauth-RoleGroupRoleResponse:
      type: object
      properties:
        author:
          $ref: '#/components/schemas/uauth-RoleGroupRoleUserResponse'
        description:
          $ref: '#/components/schemas/uauth-RoleDescription'
        editable:
          type: boolean
          description: Informs if the role is editable
        group:
          $ref: '#/components/schemas/uauth-RoleGroupId'
        id:
          $ref: '#/components/schemas/uauth-RoleId'
        name:
          $ref: '#/components/schemas/uauth-RoleName'
        updated:
          type: string
          format: date-time
          description: Date and time of the last update
    uauth-RoleGroupRoleUserResponse:
      type: object
      description: Details of the role's creator
      properties:
        avatar:
          $ref: '#/components/schemas/uauth-AvatarUrl'
        displayName:
          $ref: '#/components/schemas/uauth-UserDisplayName'
        firstName:
          $ref: '#/components/schemas/uauth-UserFirstName'
        id:
          $ref: '#/components/schemas/uauth-UserIdInteger'
        lastName:
          $ref: '#/components/schemas/uauth-UserLastName'
    uauth-RoleFullResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/uauth-RoleId'
        name:
          $ref: '#/components/schemas/uauth-RoleName'
        businessProfileId:
          $ref: '#/components/schemas/uauth-BusinessProfileId'
        shownAsResource:
          type: boolean
          description: Deprecated field
          deprecated: true
        manageable:
          type: boolean
          description: Defines if the role can be modified.
        pii:
          type: boolean
          description: Indicates if the role has access to personally identifiable information
        group:
          type: integer
          format: int64
          description: ID of the role group this role belongs to
        author:
          $ref: '#/components/schemas/uauth-RoleGroupRoleUserResponse'
        editable:
          type: boolean
          description: Informs if the role is editable
        description:
          type: string
          description: Description of the role
    uauth-RoleResponse:
      type: object
      properties:
        businessProfileId:
          $ref: '#/components/schemas/uauth-BusinessProfileId'
        id:
          $ref: '#/components/schemas/uauth-RoleId'
        manageable:
          type: boolean
          description: Defines if the role can be modified.
        name:
          $ref: '#/components/schemas/uauth-RoleName'
        shownAsResource:
          type: boolean
          description: Deprecated field
          deprecated: true
        pii:
          type: boolean
          description: Indicates if the role has access to personally identifiable information
    uauth-MyAccountUserResponse:
      type: object
      properties:
        id:
          type: integer
          format: int64
        email:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        displayName:
          type: string
        avatar:
          type: string
        phone:
          type: string
        language:
          $ref: '#/components/schemas/uauth-UserLanguage'
        organizationRole:
          type: string
        introduction:
          type: string
        confirmed:
          type: boolean
        mailAccountId:
          type: integer
          format: int32
        superAdmin:
          type: boolean
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
        lastLogin:
          type: string
          format: date-time
        status:
          type: string
          enum:
          - ACTIVE
          - PENDING
          - EXPIRED
          - INACTIVE
        roles:
          type: array
          items:
            type: integer
            format: int64
        isTheSameUserAsLoggedIn:
          type: boolean
        description:
          type: string
        isMfaEnabled:
          type: boolean
        passwordLastModificationDate:
          type: string
          format: date-time
        canBeEdited:
          type: boolean
        dateFormatNotation:
          type: string
          enum:
          - US
          - EU
        timeFormatNotation:
          type: string
          enum:
          - US
          - EU
        numberFormatNotation:
          type: string
          enum:
          - US
          - EU
        mfaTokenExpirationHours:
          type: integer
          format: int32
        defaultMfaMethod:
          $ref: '#/components/schemas/uauth-MultiFactorMethod'
        labels:
          type: array
          items:
            type: string
    uauth-UserAuthenticationRequest:
      required:
      - password
      - username
      type: object
      properties:
        username:
          type: string
          description: The login (email address) of the user
        password:
          type: string
          description: The user's password
        deviceId:
          type: string
          description: Identifier of user's current device
        externalProviderToken:
          type: string
        externalProviderType:
          type: string
          enum:
          - GOOGLE
        organizationName:
          type: string
          description: Optional organization name for login context
    uauth-UserAutoCompleteResponse:
      type: object
      properties:
        avatarUrl:
          $ref: '#/components/schemas/uauth-AvatarUrl'
        displayName:
          $ref: '#/components/schemas/uauth-UserDisplayName'
        email:
          $ref: '#/components/schemas/uauth-UserEmail'
        userId:
          $ref: '#/components/schemas/uauth-UserIdInteger'
    uauth-IpPolicySettings:
      type: object
      properties:
        enabled:
          type: boolean
          description: When TRUE, the policy is active and only the included addresses are allowed to connect.
        enableSupportSubnets:
          type: boolean
          description: When TRUE, the IP addresses used by Synerise for service work are added to the allowlist. These addresses depend on the configuration.
          default: true
        ipPolicy:
          $ref: '#/components/schemas/uauth-IpPolicy'
    uauth-UserRegistrationRequest:
      required:
      - email
      - password
      type: object
      properties:
        email:
          $ref: '#/components/schemas/uauth-UserEmail'
        password:
          $ref: '#/components/schemas/uauth-UserPassword'
        invitationToken:
          $ref: '#/components/schemas/uauth-OptionalInvitationToken'
        externalProviderToken:
          type: string
        externalProviderType:
          type: string
          enum:
          - GOOGLE
    uauth-MultiFactorAuthInitResponse:
      type: object
      properties:
        url:
          type: string
          description: URL of the QR code
        secret:
          type: string
          description: Multifactor authentication secret
    uauth-MultiFactorSendCodeResponse:
      type: object
      properties:
        method:
          $ref: '#/components/schemas/uauth-MultiFactorMethod'
        status:
          $ref: '#/components/schemas/uauth-MultiFactorSendCodeStatus'
        nextTryInSeconds:
          type: integer
          format: int32
    uauth-MultiFactorSendCodeStatus:
      type: string
      enum:
      - OK
      - LIMIT_REACHED
      - ERROR
    uauth-MultiFactorAuthConfirmResponse:
      type: object
      properties:
        backupCode:
          type: string
          description: Code used to recover the account if the device with the token generator is lost. Store the code in a secure way.
    uauth-MultiFactorAuthConfirmRequest:
      type: object
      required:
      - verificationCode
      properties:
        verificationCode:
          type: string
          description: Multi-factor verification code
    uauth-MultiFactorMethod:
      type: string
      enum:
      - TOTP_AUTHENTICATOR
      - EMAIL
    uauth-MultiFactorAuthVerificationRequest:
      type: object
      required:
      - verificationCode
      properties:
        verificationCode:
          type: string
          description: Multi-factor verification code
        deviceId:
          type: string
        externalProviderToken:
          type: string
        externalProviderType:
          type: string
          enum:
          - GOOGLE
        organizationName:
          type: string
          description: Optional organization name for login context
    uauth-ManagedDomainRequest:
      type: object
      required:
      - domain
      properties:
        domain:
          $ref: '#/components/schemas/uauth-ManagedDomainDomain'
    uauth-ManagedDomainVerificationRequest:
      type: object
      required:
      - domain
      - verificationMethod
      properties:
        domain:
          $ref: '#/components/schemas/uauth-ManagedDomainDomain'
        verificationMethod:
          $ref: '#/components/schemas/uauth-ManagedDomainVerificationMethod'
    uauth-ManagedDomainDomain:
      type: string
      description: Domain name
      example: synerise.com
    uauth-ManagedDomainVerificationMethod:
      type: string
      enum:
      - TXT_RECORD
      - FILE_CHECK
      - INTERNAL
      - NONE
      description: |
        Verification method. The verification string can be retrieved by using [this method](#operation/initializeManagedDomainUsingPOST).

        - TXT_RECORD: the verification string needs to be added to your DNS as a TXT record.
        - FILE_CHECK: the site must include an HTML file whose name is the verification string. The file does not need any content.
        - INTERNAL; NONE - currently not used
    uauth-ManagedDomainResponse:
      type: object
      properties:
        id:
          type: number
          format: int64
          description: ID of the managed domain
        domain:
          $ref: '#/components/schemas/uauth-ManagedDomainDomain'
        created:
          type: string
          format: date-time
          description: Creation time
        verificationMethod:
          $ref: '#/components/schemas/uauth-ManagedDomainVerificationMethod'
        verificationStatus:
          type: string
          description: Verification status
          enum:
          - VERIFIED
          - NOT_VERIFIED
        updated:
          type: string
          format: date-time
          description: Time of last update
        managedByProfile:
          $ref: '#/components/schemas/uauth-BusinessProfileId'
        usersCount:
          type: number
          format: int64
          description: Number of users who belong to the domain
    uauth-ManagedDomainCodeResponse:
      type: object
      properties:
        verificationCode:
          type: string
          description: Verification code
          format: uuid
        businessProfileId:
          $ref: '#/components/schemas/uauth-BusinessProfileId'
    uauth-ManagedDomainListing:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/uauth-PaginationMeta'
        data:
          type: array
          description: An array of domains managed by the workspace
          items:
            $ref: '#/components/schemas/uauth-ManagedDomainResponse'
    uauth-UserDisplayName:
      type: string
      description: User's display name
    uauth-UserEmail:
      type: string
      description: User's email address
    uauth-UserIdInteger:
      type: integer
      format: int64
      description: User ID
    uauth-AvatarUrl:
      type: string
      description: URL of the user's avatar
    uauth-UserFirstName:
      type: string
      description: First name of the user
    uauth-UserLastName:
      type: string
      description: Last name of the user
    uauth-UserConfirmed:
      type: boolean
      description: Informs if the account is confirmed
    uauth-UserCreated:
      type: string
      format: date-time
      description: Account creation date
    uauth-UserDescription:
      type: string
      description: User's description
    uauth-UserIntroduction:
      type: string
      description: User's introduction
    uauth-IsTheSameUserAsLoggedIn:
      type: boolean
      description: Informs if the user who made the request is the same as the subject of the request
    uauth-UserLanguage:
      type: string
      enum:
      - pl
      - es
      - pt
      - en-GB
      - en-US
      description: User's interface language
    uauth-UserLastLogin:
      type: string
      format: date-time
      description: Last login time
    uauth-UserMailAccountId:
      type: integer
      description: Unused field
    uauth-UserOrganizationRole:
      type: string
      description: User's role in the organization
    uauth-UserPhone:
      type: string
      description: User's phone number
    uauth-UserRoles:
      type: array
      description: An array of roles (IDs) assigned to the user in the currently selected workspace
      items:
        type: integer
        format: int64
    uauth-UserStatus:
      type: string
      description: Account status
      enum:
      - ACTIVE
      - PENDING
    uauth-UserSuperAdmin:
      type: boolean
      description: Informs if the user is a super admin
    uauth-UserUpdated:
      type: string
      format: date-time
      description: Last update time
    uauth-UserIsMfaEnabled:
      type: boolean
      description: Informs if multi-factor authentication for the user is active
    uauth-UserPasswordLastModificationDate:
      type: string
      format: date-time
      description: Date and time of last password change
    uauth-UserRoleNames:
      type: array
      description: An array of roles (names) assigned to the user in the currently selected workspace
      items:
        type: string
    uauth-UserPassword:
      type: string
      description: Account password
    uauth-PasswordAttempts:
      type: integer
      format: int32
      description: The number of failed sign-in attempts after which an account is blocked
    uauth-PasswordBlock:
      type: integer
      format: int32
      description: The number of days after which an account is blocked after the password expires.
    uauth-PasswordDifferent:
      type: integer
      format: int32
      description: |
        Defines how many previous passwords are compared.

        For example, if set to 3, the new password must be different than the 3 last passwords.
    uauth-PasswordDigits:
      type: integer
      format: int32
      description: The minimum number of digits in a password
    uauth-PasswordExpiration:
      type: integer
      format: int32
      description: The number of days after which the passwords expire
    uauth-PasswordLowerLetters:
      type: integer
      format: int32
      description: The minimum number of lower-case letters in a password
    uauth-PasswordMaxIdleTime:
      type: integer
      format: int32
      description: Time (in seconds) after which an idle user is signed out
    uauth-PasswordMaxLength:
      type: integer
      format: int32
      description: The maximum number of characters in a password
    uauth-PasswordMinLength:
      type: integer
      format: int32
      description: The minimum number of characters in a password
    uauth-PasswordNextChange:
      type: integer
      format: int32
      description: Currently not used
    uauth-PasswordSpecialChars:
      type: integer
      format: int32
      description: The minimum number of special characters in a password
    uauth-PasswordUpperLetters:
      type: integer
      format: int32
      description: The minimum number of upper-case letters in a password
    uauth-IpPolicy:
      type: array
      description: List of allowed IPv4 addresses
      items:
        type: string
        description: IP address
    uploader-service-ttlInMinutes:
      description: Defines the amount of time (expressed in minutes) the file or files are available. If this parameter is not sent, the default time to live of the files is 30 days.
      type: number
    uploader-service-identifierValue:
      description: Contains the value of a customer identifier a file is dedicated for. The type of the value is defined in the path parameters of the endpoint (`identifierType`). If `id` is used, it must be sent as a string.
      type: string
      example: '1234'
    uploader-service-parameters:
      description: Custom parameters of the files.
      type: object
      additionalProperties: true
    uploader-service-FileRequest:
      type: object
      required:
      - id
      - businessProfileId
      - clientId
      - ttlInMinutes
      - params
      - createdAt
      properties:
        id:
          type: string
          format: uuid
          description: Unique ID of the file or batch of files
        businessProfileId:
          type: number
          format: int32
          description: ID of the workspace where the file or files are stored
        clientId:
          type: number
          format: int64
          example: 1234
          description: ID of the profile to which the file or files are assigned
        ttlInMinutes:
          $ref: '#/components/schemas/uploader-service-ttlInMinutes'
        params:
          $ref: '#/components/schemas/uploader-service-parameters'
        createdAt:
          type: string
          format: date-time
          description: Date and time when the file or files were created
    uploader-service-AddFile:
      type: object
      required:
      - files
      - ttlInMinutes
      - identifierValue
      - parameters
      properties:
        files:
          type: array
          description: Up to 5 files can be sent at once. The order in the array is reflected in the generated `attachment.upload` event, and the files from the event can then be accessed by their index in the array.
          items:
            $ref: '#/components/schemas/uploader-service-InputFile'
        ttlInMinutes:
          $ref: '#/components/schemas/uploader-service-ttlInMinutes'
        identifierValue:
          $ref: '#/components/schemas/uploader-service-identifierValue'
        parameters:
          $ref: '#/components/schemas/uploader-service-parameters'
    uploader-service-InputFile:
      type: object
      required:
      - content
      - mimetype
      - filename
      - extension
      properties:
        content:
          type: string
          description: The file encoded into base64.
          example: 77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==
        mimetype:
          type: string
          description: The media type, in the type/type format, for example `text/csv`
          example: text/csv
        filename:
          type: string
          description: The name of the file
          example: myexamplefile
        extension:
          type: string
          description: The extension of the uploaded file
          example: csv
    uploader-service-FileInfo:
      type: object
      properties:
        author:
          description: Name of the user who uploaded the file
          type: string
        canEdit:
          description: Defines if the file can be edited
          type: boolean
        canRemove:
          description: Defines if the file can be deleted
          type: boolean
        created:
          description: Creation date
          type: string
        filename:
          description: Name of the file
          type: string
        id:
          description: ID of the file
          type: string
        uuid:
          type: string
          description: UUID of the file, without dashes
        isStarred:
          type: boolean
          description: Informs if the file is starred.
        mimetype:
          type: string
          description: The MIME type of the file.
          enum:
          - image/png
          - image/jpeg
          - image/jpg
          - image/gif
          - video/mp4
          - application/pdf
          - application/vnd.openxmlformats-officedocument.wordprocessingml.document
          - application/vnd.ms-excel
        path:
          $ref: '#/components/schemas/uploader-service-Path'
        size:
          type: number
          description: Size of the file in bytes
        storageId:
          type: string
          description: Name of the container where the file is stored
        updated:
          type: string
          description: Year of last update
        url:
          type: string
          description: URL of the file
        user_id:
          type: number
          description: ID of the user who uploaded the file
    uploader-service-FileDataV2:
      type: object
      properties:
        author:
          $ref: '#/components/schemas/uploader-service-AuthorV2'
        permissions:
          type: object
          properties:
            canEdit:
              type: boolean
            canRemove:
              type: boolean
        createdAt:
          description: Creation date
          type: string
        filename:
          description: Name of the file
          type: string
        id:
          description: ID of the file
          type: string
        uuid:
          type: string
          description: UUID of the file, without dashes
        isStarred:
          type: boolean
          description: Informs if the file is starred.
        mimetype:
          type: string
          description: The MIME type of the file.
          enum:
          - image/png
          - image/jpeg
          - image/jpg
          - image/gif
          - video/mp4
          - application/pdf
          - application/vnd.openxmlformats-officedocument.wordprocessingml.document
          - application/vnd.ms-excel
        path:
          $ref: '#/components/schemas/uploader-service-Path'
        size:
          type: number
          description: Size of the file in bytes
        storageId:
          type: string
          description: Name of the container where the file is stored
        updatedYear:
          type: integer
          description: Year of last update
        url:
          type: string
          description: URL of the file
    uploader-service-AuthorV2:
      type: object
      description: Author of a file.
      properties:
        id:
          type: number
        email:
          type: string
        displayName:
          type: string
        avatar:
          type: string
      required:
      - id
      - email
      - displayName
    uploader-service-Path:
      type: object
      description: Paths to different versions of the resource. Some MIME types only have `origin`.
      properties:
        large:
          type: string
          description: Path to the large version of the file
        origin:
          type: string
          description: Path to the original file
        thumb:
          type: string
          description: Path to the thumbnail
    uploader-service-UploadResult:
      type: object
      properties:
        result:
          type: object
          description: Information about the result
          properties:
            files:
              type: array
              description: File information
              items:
                $ref: '#/components/schemas/uploader-service-FileInfo'
            storageId:
              type: string
              description: Name of the container where the file is stored
    uploader-service-FileUuids:
      description: File UUIDs, without dashes (stringified JSON array) <br/>Example:<br/>`["0ac106beb55c401bac8bc8244e367512","03dc506041e24c3cae284fd3f6611082"]`
      type: string
    uploader-service-Error:
      type: object
      properties:
        details:
          type: string
        errorCode:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/uploader-service-Error'
        field:
          type: string
        help:
          type: string
        httpStatus:
          type: number
        message:
          type: string
        source:
          type: string
        timestamp:
          type: string
        traceId:
          type: string
    vouchers-voucherActionRequestAsProfileReq:
      required:
      - poolUuid
      - clientUuid
      type: object
      properties:
        poolUuid:
          $ref: '#/components/schemas/vouchers-inBodyPoolUuid'
        clientUuid:
          $ref: '#/components/schemas/vouchers-inBodyClientUuid'
    vouchers-voucherActionRequestByClientIdentifierAsProfileReq:
      required:
      - poolUuid
      - clientIdentifierValue
      type: object
      properties:
        poolUuid:
          $ref: '#/components/schemas/vouchers-inBodyPoolUuid'
        clientIdentifierValue:
          $ref: '#/components/schemas/vouchers-inBodyClientIdentifierValue'
    vouchers-voucherActionRequestAsClientReq:
      required:
      - poolUuid
      type: object
      properties:
        poolUuid:
          $ref: '#/components/schemas/vouchers-inBodyPoolUuid'
        clientUuid:
          $ref: '#/components/schemas/vouchers-deprecatedInBodyClientUuid'
    vouchers-voucherRedeemReq:
      required:
      - code
      type: object
      properties:
        code:
          type: string
          description: |
            Voucher code
            Must match the pattern: `^.{0,36}$`
          example: code123
          nullable: false
    vouchers-voucherCode:
      type: string
      description: |
        Voucher code
        Must match the pattern: `^.{0,36}$`
      example: code123
      nullable: true
    vouchers-voucher-HTTP400Res:
      required:
      - message
      - error
      type: object
      properties:
        message:
          type: string
          description: Description of the problem
          example: Out of scope. Pool is empty.
        error:
          type: array
          items:
            $ref: '#/components/schemas/vouchers-errorObj'
          description: Details of the problem
    vouchers-errorObj:
      type: object
      properties:
        field:
          type: string
          description: Name of the field that cause the problem (if applicable)
          example: code
        message:
          type: string
          example: code must be unique
          description: Details of the problem
        validatorKey:
          type: string
          example: not_unique
          description: System ID of the problem (if applicable)
    vouchers-voucherResponseMessage:
      required:
      - message
      type: object
      properties:
        message:
          type: string
          description: Details of the response
    vouchers-bulkCreateResponse:
      properties:
        message:
          type: string
          default: Create object with success
        data:
          type: object
          properties:
            vouchersCreated:
              type: integer
              description: Number of created vouchers
              example: 3
            duplicatedCodes:
              type: array
              items:
                type: string
                example: code123
              description: Codes which are duplicated (already exists for given workspace) and was ignored while creating vouchers
    vouchers-redeemAt:
      type: string
      format: date-time
      description: Time when the voucher was redeemed. Defaults to current time when redeeming.
      nullable: true
    vouchers-expireIn:
      type: string
      format: date-time
      description: Date when the voucher expires.
      nullable: true
    vouchers-assignedAt:
      type: string
      format: date-time
      description: Time when the voucher was assigned. Defaults to current time when assigning.
      nullable: true
    vouchers-createdAt:
      type: string
      format: date-time
      description: Time when the voucher was created.
    vouchers-updatedAt:
      type: string
      format: date-time
      description: Time when the voucher was last updated.
    vouchers-voucherStatus:
      type: string
      description: Voucher status
      enum:
      - ASSIGNED
      - UNASSIGNED
      - REDEEMED
      - CANCELED
      example: ASSIGNED
    vouchers-voucherRedeemedStatus:
      type: string
      default: REDEEMED
    vouchers-getOrAssignAndGetVoucherDataRes:
      type: object
      description: Details of the voucher
      properties:
        code:
          $ref: '#/components/schemas/vouchers-voucherCode'
        expireIn:
          $ref: '#/components/schemas/vouchers-expireIn'
        redeemAt:
          $ref: '#/components/schemas/vouchers-redeemAt'
        assignedAt:
          $ref: '#/components/schemas/vouchers-assignedAt'
        createdAt:
          $ref: '#/components/schemas/vouchers-createdAt'
        updatedAt:
          $ref: '#/components/schemas/vouchers-updatedAt'
    vouchers-inBodyPoolUuid:
      type: string
      description: UUID of the voucher pool
      example: faec32b0-c343-4362-ba32-c6148c649da4
    vouchers-inBodyClientUuid:
      type: string
      description: UUID of the Profile
      example: 07243772-008a-42e1-ba37-c3807cebde8f
    vouchers-inBodyClientIdentifierValue:
      description: Value of the profile identifier. For example `clientIdentifierValue=custom_identify_1234`
      oneOf:
      - type: string
        maxLength: 100
        example: custom_identify_1234
      - type: integer
        format: int64
        maxLength: 100
        example: 1234
    vouchers-deprecatedInBodyClientUuid:
      deprecated: true
      type: string
      nullable: true
      description: UUID of the Profile. This field is ignored.
      example: 17243772-008a-42e1-ba37-c3807cebde8f
    vouchers-inBodyClientId:
      type: integer
      description: ID of the Profile
    vouchers-data:
      required:
      - uuid
      - poolUuid
      - createdAt
      - updatedAt
      type: object
      description: Details of the voucher
      properties:
        uuid:
          type: string
          description: UUID of the voucher
        poolUuid:
          $ref: '#/components/schemas/vouchers-inBodyPoolUuid'
        clientId:
          $ref: '#/components/schemas/vouchers-inBodyClientId'
        createdAt:
          type: string
          format: date-time
          description: Time when the voucher was created
        updatedAt:
          type: string
          format: date-time
          description: Time when the voucher was last updated
    vouchers-voucherData:
      required:
      - poolUuid
      type: object
      properties:
        poolUuid:
          $ref: '#/components/schemas/vouchers-inBodyPoolUuid'
        clientUuid:
          $ref: '#/components/schemas/vouchers-inBodyClientUuid'
        clientId:
          $ref: '#/components/schemas/vouchers-inBodyClientId'
        code:
          $ref: '#/components/schemas/vouchers-voucherCode'
        expireIn:
          $ref: '#/components/schemas/vouchers-expireIn'
        redeemAt:
          $ref: '#/components/schemas/vouchers-redeemAt'
        assignedAt:
          $ref: '#/components/schemas/vouchers-assignedAt'
        status:
          $ref: '#/components/schemas/vouchers-voucherStatus'
        createdAt:
          $ref: '#/components/schemas/vouchers-createdAt'
        updatedAt:
          $ref: '#/components/schemas/vouchers-updatedAt'
    vouchers-voucherDataRedeemed:
      type: object
      properties:
        poolUuid:
          $ref: '#/components/schemas/vouchers-inBodyPoolUuid'
        clientUuid:
          $ref: '#/components/schemas/vouchers-inBodyClientUuid'
        clientId:
          $ref: '#/components/schemas/vouchers-inBodyClientId'
        code:
          $ref: '#/components/schemas/vouchers-voucherCode'
        expireIn:
          $ref: '#/components/schemas/vouchers-expireIn'
        redeemAt:
          $ref: '#/components/schemas/vouchers-redeemAt'
        assignedAt:
          $ref: '#/components/schemas/vouchers-assignedAt'
        status:
          $ref: '#/components/schemas/vouchers-voucherRedeemedStatus'
        createdAt:
          $ref: '#/components/schemas/vouchers-createdAt'
        updatedAt:
          $ref: '#/components/schemas/vouchers-updatedAt'
    vouchers-bulkCreateVouchersReq:
      required:
      - poolUuid
      - codeList
      type: object
      properties:
        poolUuid:
          $ref: '#/components/schemas/vouchers-inBodyPoolUuid'
        codeList:
          type: string
          description: A list of unique voucher codes, separated by semicolons
          example: 3845734682364756454534;384574634564545456;567868678345234346748
    vouchers-poolDataRes:
      type: object
      properties:
        uuid:
          $ref: '#/components/schemas/vouchers-poolUuid'
        name:
          $ref: '#/components/schemas/vouchers-poolName'
        description:
          $ref: '#/components/schemas/vouchers-poolDescription'
        barcodeType:
          $ref: '#/components/schemas/vouchers-poolBarcodeType'
        voucherPrefix:
          $ref: '#/components/schemas/vouchers-voucherPrefix'
        poolLimit:
          $ref: '#/components/schemas/vouchers-poolLimit'
        redeemedLimitPerClient:
          $ref: '#/components/schemas/vouchers-redeemedLimitPerClient'
        startAt:
          $ref: '#/components/schemas/vouchers-poolStartAt'
        expireIn:
          $ref: '#/components/schemas/vouchers-poolExpireIn'
        userId:
          $ref: '#/components/schemas/vouchers-userId'
        assignedCount:
          $ref: '#/components/schemas/vouchers-assignedCount'
        activeCount:
          $ref: '#/components/schemas/vouchers-activeCount'
        countAt:
          $ref: '#/components/schemas/vouchers-countAt'
        lastingTime:
          $ref: '#/components/schemas/vouchers-lastingTime'
    vouchers-poolName:
      type: string
      description: Name of the voucher pool
    vouchers-poolDescription:
      type: string
      description: A description of the pool
    vouchers-poolLimit:
      type: integer
      default: 0
      description: Maximum number of vouchers to store in the pool
    vouchers-poolBarcodeType:
      type: string
      description: The type of codes in the pool
      enum:
      - NONE
      - UPC
      - EAN-13
      - CODE-39
      - CODE-128
      - ISBN
      - ISSN
      - QR-CODE
      default: NONE
    vouchers-voucherPrefix:
      type: string
      default: '0'
      description: A prefix added to each voucher in the pool
    vouchers-redeemedLimitPerClient:
      type: integer
      default: 0
      description: Maximum number of times that one Profile can retrieve a voucher from this pool
    vouchers-poolStartAt:
      type: string
      format: date-time
      description: Time when the pool starts functioning. Defaults to current time.
    vouchers-poolExpireIn:
      type: string
      format: date-time
      description: Time when the pool stops functioning. Defaults to current time. Must be later than `startAt`.
    vouchers-poolUuid:
      type: string
      description: UUID of the voucher pool
      example: 8465c240-d38e-42f8-af29-b9fa1ed05115
    vouchers-poolData:
      type: object
      description: Voucher pool details
      properties:
        uuid:
          $ref: '#/components/schemas/vouchers-poolUuid'
        name:
          $ref: '#/components/schemas/vouchers-poolName'
        barcodeType:
          $ref: '#/components/schemas/vouchers-poolBarcodeType'
        description:
          $ref: '#/components/schemas/vouchers-poolDescription'
        voucherPrefix:
          $ref: '#/components/schemas/vouchers-voucherPrefix'
        poolLimit:
          $ref: '#/components/schemas/vouchers-poolLimit'
        redeemedLimitPerClient:
          $ref: '#/components/schemas/vouchers-redeemedLimitPerClient'
        startAt:
          $ref: '#/components/schemas/vouchers-poolStartAt'
        expireIn:
          $ref: '#/components/schemas/vouchers-poolExpireIn'
        lastingTime:
          $ref: '#/components/schemas/vouchers-lastingTime'
        userId:
          $ref: '#/components/schemas/vouchers-userId'
        assignedCount:
          $ref: '#/components/schemas/vouchers-assignedCount'
        activeCount:
          $ref: '#/components/schemas/vouchers-activeCount'
        countAt:
          $ref: '#/components/schemas/vouchers-countAt'
    vouchers-createAVoucherPoolReq:
      required:
      - name
      - expireIn
      type: object
      properties:
        name:
          $ref: '#/components/schemas/vouchers-poolName'
        barcodeType:
          $ref: '#/components/schemas/vouchers-poolBarcodeType'
        description:
          $ref: '#/components/schemas/vouchers-poolDescription'
        voucherPrefix:
          $ref: '#/components/schemas/vouchers-voucherPrefix'
        poolLimit:
          $ref: '#/components/schemas/vouchers-poolLimit'
        redeemedLimitPerClient:
          $ref: '#/components/schemas/vouchers-redeemedLimitPerClient'
        startAt:
          $ref: '#/components/schemas/vouchers-poolStartAt'
    vouchers-paginationMeta:
      type: object
      description: Optional metadata
      properties:
        link:
          type: array
          description: Links to other pages
          items:
            type: object
            description: Link to another page on the list
            properties:
              rel:
                type: string
                enum:
                - first
                - last
                - next
                - prev
                description: The type of relationship to the current page
              url:
                type: string
                description: The URL of the page
        totalCount:
          type: integer
          description: The total number of items on all pages
        totalPages:
          type: integer
          description: The total number of pages
        page:
          type: integer
          description: The current page
        limit:
          type: integer
          description: The number of items per page
        code:
          type: integer
          description: HTTP code
    vouchers-listVouchersSuccessRes:
      required:
      - data
      type: object
      properties:
        data:
          type: array
          description: An array of vouchers
          items:
            $ref: '#/components/schemas/vouchers-voucherData'
        meta:
          $ref: '#/components/schemas/vouchers-paginationMeta'
    vouchers-getVouchersCountRes:
      required:
      - data
      type: object
      properties:
        data:
          type: object
          properties:
            assignedCount:
              type: integer
              format: int32
              example: 130
              description: Number of assigned vouchers
            activeCount:
              type: integer
              format: int32
              example: 130
              description: Number of active vouchers
            countAt:
              type: string
              format: date-time
              description: Time when the calculation was made
    vouchers-vouchersDataList:
      type: object
      properties:
        data:
          type: array
          description: An array of vouchers
          items:
            $ref: '#/components/schemas/vouchers-voucherData'
    vouchers-lastingTime:
      type: integer
      format: int32
      description: Lasting time of the voucher
    vouchers-userId:
      type: integer
      format: int32
      description: ID of the User who created the pool
    vouchers-assignedCount:
      type: integer
      format: int32
      description: Number of assigned vouchers. **To refresh the counter, use [this endpoint](#operation/getVouchersCount).**
    vouchers-activeCount:
      type: integer
      format: int32
      description: Number of active vouchers. **To refresh the counter, use [this endpoint](#operation/getVouchersCount).**
    vouchers-countAt:
      type: string
      format: date-time
      description: Time when the pool starts functioning. Defaults to current time.
  responses:
    activities-api-EventResponse:
      description: Events
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/activities-api-PaginatedEvents'
    analytics-genericError:
      description: See error message for details
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/analytics-Error'
    api-service-400-apiv4:
      description: 'Bad request: input data missing or malformed'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/api-service-HTTP400-apiv4'
          example:
            timestamp: '2018-06-07T07:28:26.078+00:00'
            status: 400
            error: Bad Request
            message: Version header content is invalid
            path: /path_of_the_endpoint
    api-service-401-apiv4:
      description: 'Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/api-service-HTTP400-apiv4'
          example:
            error: Bad Request
            status: 400
            timestamp: '2020-10-29T13:08:16.235Z'
            path: /exampleEndpoint
            message: Some fields did not pass validation
            errors:
            - code: 120
              field: exampleField
              message: '120'
              rejectedValue: exampleValue
    api-service-403-apiv4:
      description: Forbidden; insufficient permissions (when PII protection is enabled, PII permissions are required in addition to the permissions listed in the method description)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/api-service-HTTP400-apiv4'
          example:
            timestamp: '2018-06-07T07:29:27.489+00:00'
            status: 403
            error: Forbidden
            message: Forbidden
            path: /path_of_the_endpoint
    api-service-404-pii:
      description: Profile not found or access blocked by PII protection settings
      content:
        application/json:
          schema:
            type: string
            description: Description of the problem. If the access is blocked by insufficient PII permissions, the message is the same as when the profile doesn't exist.
            example: Client 5005535044 not found
    api-service-415-apiv4:
      description: Unsupported Media Type
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/api-service-HTTP400-apiv4'
          example:
            timestamp: '2018-06-07T07:27:23.136+00:00'
            status: 415
            error: Unsupported Media Type
            message: Content type 'application/xml' not supported
            path: /path_of_the_endpoint
    automation-brain-SimpleError:
      description: See error message for details
      content:
        text/plain:
          schema:
            type: string
            description: Description of the problem
    automation-brain-genericError:
      description: See error message for details
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/automation-brain-Error'
    automation-brain-400:
      description: 'Bad request: input data missing or malformed'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/automation-brain-HTTP400'
    automation-brain-401:
      description: 'Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/automation-brain-HTTP400'
    automation-brain-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/automation-brain-HTTP400'
    automation-brain-404:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/automation-brain-HTTP400'
    brickworks-service-GenericError:
      description: See error message for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brickworks-service-ObjectsError'
    brickworks-service-GenericBadRequestError:
      description: Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brickworks-service-ObjectsError'
    brickworks-service-GenericUnauthorizedError:
      description: 'Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brickworks-service-GatewayError'
    brickworks-service-GenericForbiddenError:
      description: Forbidden; insufficient permissions. See error message for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brickworks-service-GatewayError'
    brickworks-service-GenericNotFoundError:
      description: Resource not found. See error message for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brickworks-service-ObjectsError'
    brickworks-service-GenericConflictError:
      description: The request could not be completed due to a conflict with the current state of the resource. See error message for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brickworks-service-ObjectsError'
    brickworks-service-GenericUnprocessableContentError:
      description: The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brickworks-service-ObjectsError'
    brickworks-service-GeneratedObject:
      description: Processed content of a record
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brickworks-service-GeneratedObject'
    brickworks-service-207Response:
      description: Some operations failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brickworks-service-207ResponseBody'
    business-profile-service-4xx-bpservice:
      description: Request failed. See response for details.
      content:
        application/json:
          schema:
            type: object
            required:
            - message
            - timestamp
            properties:
              httpStatus:
                $ref: '#/components/schemas/business-profile-service-ErrorStatus'
              errorCode:
                $ref: '#/components/schemas/business-profile-service-ErrorCode'
              timestamp:
                $ref: '#/components/schemas/business-profile-service-ErrorTimestamp'
              message:
                $ref: '#/components/schemas/business-profile-service-ErrorMessage'
              traceId:
                type: string
                description: Trace ID for troubleshooting
              errors:
                $ref: '#/components/schemas/business-profile-service-ErrorErrorsArray'
    business-profile-service-401-bpservice:
      description: 'Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/business-profile-service-AuthError'
    business-profile-service-403-bpservice:
      description: 'Unauthorized: insufficient permissions.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/business-profile-service-AuthError'
    catalogs-400generic:
      description: A problem occurred. See the error message for details.
      content:
        application/json:
          schema:
            type: object
            properties:
              timestamp:
                type: string
                description: Time when the error occurred
              errorCode:
                type: string
                description: Error code. See [API error code reference](https://developers.synerise.com/errors.html).
              httpStatus:
                type: integer
                description: HTTP code of the error
              message:
                type: string
                description: A summary of the problem
              traceId:
                type: string
                nullable: true
                description: Trace ID for troubleshooting, if applicable
    catalogs-400:
      description: Invalid or insufficient data
      content:
        text/plain:
          schema:
            type: string
    catalogs-401:
      description: 'Unauthorized: token missing/expired/invalid; invalid API key; etc.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/catalogs-ErrorResponse'
    catalogs-403:
      description: 'Forbidden: insufficient permissions; wrong consumer scope'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/catalogs-ErrorResponse'
    catalogs-404:
      description: Entity not found
      content:
        text/plain:
          schema:
            type: string
    crm-404-pii:
      description: Resource not found or access blocked by PII protection settings
      content:
        text/plain:
          schema:
            type: string
            description: Description of the problem
    items-search-FullTextSearchResponse200:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/items-search-FullTextSearchResponse'
            - $ref: '#/components/schemas/items-search-SuggestionResponse'
    items-search-FullTextSearchResponse200WithExplanation:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/items-search-FullTextSearchResponseWithExplanation'
            - $ref: '#/components/schemas/items-search-SuggestionResponseWithExplanation'
    items-search-AutocompleteSearchResponse200:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/items-search-AutocompleteResponse'
            - $ref: '#/components/schemas/items-search-SuggestionResponse'
    items-search-AutocompleteSearchResponse200WithExplanation:
      description: Search result
      content:
        application/json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/items-search-AutocompleteResponseWithExplanation'
            - $ref: '#/components/schemas/items-search-SuggestionResponseWithExplanation'
    items-search-ListingResponse200:
      description: Listing result
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/items-search-ListingResponse'
    items-search-ListingResponse200WithExplanation:
      description: Listing result
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/items-search-ListingResponseWithExplanation'
    items-search-QueryClassificationResponse200:
      description: Query classification result
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/items-search-QueryClassificationResponse'
    items-search-SearchableAttributesMatchResponse200:
      description: Searchable attributes match result
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/items-search-SearchableAttributesMatchResponse'
    morph-401:
      description: 'Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/morph-HttpErrorDetails'
    morph-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/morph-HttpErrorDetails'
    morph-BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/morph-HttpErrorDetails'
          example:
            error: Bad Request
            status: 400
            timestamp: 2021-01-04T16:15:51.703Z
            message: Message describing issue with provided request
    promotions-PromotionImportBatchPartialError:
      description: Some items failed validation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-PromotionImportBatchPartialErrorResponse'
    promotions-PromotionCreated:
      description: Promotion created
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Status of the operation
    promotions-PromotionUpdated:
      description: Promotion updated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Status of the operation
    promotions-400:
      description: Request body invalid/malformed/missing elements
      content:
        application/json:
          schema:
            anyOf:
            - $ref: '#/components/schemas/promotions-ErrorObject'
            - type: object
              title: JSON structure issue
              properties:
                message:
                  $ref: '#/components/schemas/promotions-ResponseError'
                code:
                  type: string
                  description: String-type code of the error
    promotions-Promotion404:
      description: Profile, promotion, or related resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-ErrorObject'
    promotions-WaitingForProfileLockReleaseError:
      description: Waiting for profile lock release
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-ErrorObject'
    promotions-PromotionDeactivationForbiddenError:
      description: Promotion deactivation is forbidden due to promotion setup.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-ErrorObject'
    promotions-ProfilePromotionsBlockedError:
      description: Profile promotions blocked
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-ErrorObject'
    promotions-PromotionActivate412:
      description: Already activated/Already redeemed/Activation limit reached/Promotion not started/Promotion expired
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-ErrorObject'
    promotions-PromotionActivate422:
      description: Global Activation limit reached
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-ErrorObject'
    promotions-ProcessSale428:
      description: Property discountSourceType in sale settings is not defined
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-ErrorObject'
    promotions-Validation422:
      description: Request payload failed schema validation
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                example: 422
              error:
                type: string
                example: Unprocessable Entity
              message:
                type: string
                example: validation failed
    promotions-500:
      description: General error
    promotions-401:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: '#/components/schemas/promotions-ErrorCode'
              error:
                $ref: '#/components/schemas/promotions-ResponseError'
              message:
                $ref: '#/components/schemas/promotions-ResponseErrorMessage'
              timestamp:
                $ref: '#/components/schemas/promotions-ErrorTimestamp'
    promotions-403:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: '#/components/schemas/promotions-ErrorCode'
              error:
                $ref: '#/components/schemas/promotions-ResponseError'
              message:
                $ref: '#/components/schemas/promotions-ResponseErrorMessage'
              timestamp:
                $ref: '#/components/schemas/promotions-ErrorTimestamp'
    promotions-404:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: '#/components/schemas/promotions-ErrorCode'
              error:
                $ref: '#/components/schemas/promotions-ResponseError'
              message:
                $ref: '#/components/schemas/promotions-ResponseErrorMessage'
              timestamp:
                $ref: '#/components/schemas/promotions-ErrorTimestamp'
    promotions-ClientNotFoundError:
      description: Profile not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-PromotionResponseMessage'
          example:
            message: Profile not found
    promotions-ClientNotFoundErrorResponseV2:
      description: Profile not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-ClientNotFoundError'
    promotions-InvalidDataErrorResponseV2:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-InvalidDataErrorV2'
    promotions-ClientPointsLockErrorResponseV2:
      description: Profile points lock error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-ClientPointsLockErrorV2'
    promotions-LockAlreadyExistsError:
      description: Lock already exists
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-PromotionResponseMessage'
          example:
            message: Lock already exits
    promotions-VouchersRedeemedResponse:
      description: Vouchers redeemed
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Status of the operation
              data:
                $ref: '#/components/schemas/promotions-VoucherList'
    promotions-VouchersRedeemedResponseWithErrors:
      description: Some vouchers couldn't be redeemed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/promotions-VouchersListWithErrors'
    push-devices-service-4xx:
      description: See error message for details
      content:
        application/json:
          schema:
            type: object
            properties:
              httpStatus:
                type: integer
                description: HTTP status of the error
              errorCode:
                type: string
                description: Code of the error. See [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
              timestamp:
                type: string
                format: date/time
                description: Time when the error occurred
              message:
                type: string
                description: Short summary of the error
              traceId:
                type: string
                description: Trace ID for debugging
    push-devices-service-401:
      description: 'Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/push-devices-service-HTTP400'
          example:
            error: Bad Request
            status: 400
            timestamp: '2020-10-29T13:08:16.235Z'
            path: /exampleEndpoint
            message: Some fields did not pass validation
            errors:
            - code: 120
              field: exampleField
              message: '120'
              rejectedValue: exampleValue
    push-devices-service-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/push-devices-service-HTTP400'
          example:
            timestamp: '2018-06-07T07:29:27.489+00:00'
            status: 403
            error: Forbidden
            message: Forbidden
            path: /path_of_the_endpoint
    push-devices-service-415:
      description: Unsupported Media Type
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/push-devices-service-HTTP400'
          example:
            timestamp: '2018-06-07T07:27:23.136+00:00'
            status: 415
            error: Unsupported Media Type
            message: Content type 'application/xml' not supported
            path: /path_of_the_endpoint
    recommendations-api-materializer-404cannotGenerate:
      description: No recommendations could be generated for the specified campaign and context.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/recommendations-api-materializer-Error'
    recommendations-api-materializer-429toManyRequestsError:
      description: The user has sent too many requests in a given amount of time ("rate limiting").
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/recommendations-api-materializer-Error'
    recommendations-api-materializer-500error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/recommendations-api-materializer-Error'
    recommendations-config-400:
      description: 'Bad request: input data missing or malformed'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/recommendations-config-SyneriseError'
    recommendations-config-401:
      description: 'Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/recommendations-config-Error'
    recommendations-config-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/recommendations-config-Error'
    recommendations-config-500:
      description: Service not available
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/recommendations-config-Error'
    recommendations-rust-all-404-no-recommendation:
      description: No recommendations could be generated for the specified profile and filters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/recommendations-rust-all-Error'
    recommendations-rust-all-500-error-occurred:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/recommendations-rust-all-Error'
    sauth-403-login:
      description: Authentication failed, see error message for details
      content:
        application/json:
          schema:
            allOf:
            - $ref: '#/components/schemas/sauth-4xx-base'
            - type: object
              properties:
                errorCode:
                  type: string
                  description: |
                    Error code, if applicable.
                      - `SAU-302`: Email confirmation by hash code (activation link) required
                      - `SAU-303`: Email confirmation by PIN code required
    sauth-400-malformed:
      description: Request body malformed/invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sauth-4xx-base'
    sauth-401-unauthorized:
      description: JWT missing, expired, or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sauth-4xx-base'
    sauth-403-invalid-credentials-in-body:
      description: Invalid credentials in request body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sauth-4xx-base'
    sauth-403-forbidden:
      description: Insufficient permissions or wrong JWT scope (for example, profile token where a workspace token was required)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sauth-4xx-base'
    sauth-406-account-locked:
      description: Account is locked, password reset required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sauth-4xx-base'
          example:
            timestamp: '2021-09-15T10:01:16.203120Z'
            status: 406
            error: Banned
            message: Log in has been blocked
            path: /v2/auth/login/client
            traceId: 61b4aa7c0cb1167a
    sauth-423-device-control-enabled:
      description: Device control is enabled, device must be authorized (link sent by email)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sauth-4xx-base'
          example:
            timestamp: '2021-09-15T10:01:16.203120Z'
            status: 423
            error: Locked
            message: Device login blocked
            path: /v2/auth/login/client
            traceId: 61b4aa7c0cb1167a
    schema-service-genericError:
      description: See error message for details
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/schema-service-ErrorSchemaService'
    schema-service-processedDocumentJsonResponse:
      description: Processed document
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/schema-service-documentContentProcessed'
    schema-service-rawDocumentJsonResponse:
      description: Details of the document (content isn't processed)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/schema-service-Document'
    schema-service-401:
      description: 'Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/schema-service-AuthError'
    schema-service-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/schema-service-AuthError'
    schema-service-404:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/schema-service-ErrorSchemaService'
    uauth-423:
      description: Access denied by IP policy
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/uauth-Error'
  requestBodies:
    ai-stats-RecoStatsRequest:
      description: Request for recommendation campaigns stats.
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              campaignIds:
                type: array
                minItems: 1
                items:
                  type: string
                description: List of campaign IDs for which the statistics are requested. Must not be empty.
              from:
                type: string
                format: date
                description: "Upper bound of the interval for which the statistics will be retrieved.  \nMust be provided with `to`, otherwise the filter is treated as unspecified.  \nIf not specified, the interval is last 7 days.\n"
              to:
                type: string
                format: date
                description: "Lower bound of the interval for which the statistics will be retrieved.  \nMust be provided with `from`, otherwise the filter is treated as unspecified.  \nIf not specified, the interval is last 7 days.\n"
              timeZone:
                type: string
                description: Time zone identifier.
                default: UTC
                example: Europe/Warsaw
            required:
            - campaignIds
    api-service-CreateClient-apiv4:
      description: "\nIn the request body, you must provide at least one of those identifiers: \n- `email`  \n  If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.\n- `phone`  \n  Phone is treated as an identifier only if no other identifier is provided. If this is the case and non-unique emails are disabled, an anonymous profile is created with a randomized email placeholder.\n- `customId`\n- `uuid`\n"
      content:
        application/json:
          schema:
            type: object
            allOf:
            - $ref: '#/components/schemas/api-service-CreateClientRequestBody-apiv4'
    items-search-ListingJsonBody:
      description: Request for item listing
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/items-search-ListingRequest'
    items-search-ExplainListingJsonBody:
      description: Request for item listing with explanation
      required: true
      content:
        application/json:
          schema:
            allOf:
            - $ref: '#/components/schemas/items-search-ListingRequest'
            - type: object
              properties:
                crossWorkspaceMode:
                  $ref: '#/components/schemas/items-search-CrossWorkspaceMode'
    items-search-FullTextSearchJsonBody:
      description: Request for performing full-text search
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/items-search-FullTextSearchRequest'
    items-search-ExplainFullTextSearchJsonBody:
      description: Request for performing full-text search with explanation
      required: true
      content:
        application/json:
          schema:
            allOf:
            - $ref: '#/components/schemas/items-search-FullTextSearchRequest'
            - type: object
              properties:
                crossWorkspaceMode:
                  $ref: '#/components/schemas/items-search-CrossWorkspaceMode'
    items-search-AutocompleteJsonBody:
      description: Request for performing an autocomplete search
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/items-search-AutocompleteRequest'
    items-search-ExplainAutocompleteJsonBody:
      description: Request for performing an autocomplete search with explanation
      required: true
      content:
        application/json:
          schema:
            allOf:
            - $ref: '#/components/schemas/items-search-AutocompleteRequest'
            - type: object
              properties:
                crossWorkspaceMode:
                  $ref: '#/components/schemas/items-search-CrossWorkspaceMode'
    items-search-VisualSearchJsonBody:
      description: Request for performing visual search
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/items-search-VisualSearchRequest'
        multipart/form-data:
          schema:
            type: object
            properties:
              image:
                type: string
                format: binary
                description: Uploaded image to be used in the visual search
              params:
                type: object
                description: Parameters of the search
                properties:
                  page:
                    $ref: '#/components/schemas/items-search-PaginationPage'
                  limit:
                    $ref: '#/components/schemas/items-search-PaginationLimit'
                  sortBy:
                    $ref: '#/components/schemas/items-search-PaginationSortBy'
                  ordering:
                    $ref: '#/components/schemas/items-search-PaginationOrdering'
                  includeMeta:
                    $ref: '#/components/schemas/items-search-PaginationIncludeMeta'
                  clientUUID:
                    $ref: '#/components/schemas/items-search-ClientUUID'
                  correlationId:
                    $ref: '#/components/schemas/items-search-CorrelationId'
                  searchId:
                    $ref: '#/components/schemas/items-search-SearchId'
                  sortByMetric:
                    $ref: '#/components/schemas/items-search-SortByMetric'
                  sortByGeoPoints:
                    $ref: '#/components/schemas/items-search-SortByGeoPoint'
                  filterGeoPoints:
                    $ref: '#/components/schemas/items-search-FilterGeoPoints'
                  filterAroundRadius:
                    $ref: '#/components/schemas/items-search-FilterAroundRadius'
                  filterAnchor:
                    $ref: '#/components/schemas/items-search-FilterAnchor'
                  filters:
                    $ref: '#/components/schemas/items-search-Filters'
                  facets:
                    $ref: '#/components/schemas/items-search-Facets'
                  facetsSize:
                    $ref: '#/components/schemas/items-search-FacetsSize'
                  maxValuesPerFacet:
                    $ref: '#/components/schemas/items-search-MaxValuesPerFacet'
                  caseSensitiveFacetValues:
                    $ref: '#/components/schemas/items-search-CaseSensitiveFacetValues'
                  includeFacets:
                    $ref: '#/components/schemas/items-search-IncludeFacets'
                  facetsOrderBy:
                    $ref: '#/components/schemas/items-search-FacetsOrdering'
                  context:
                    $ref: '#/components/schemas/items-search-Context'
                  displayAttributes:
                    $ref: '#/components/schemas/items-search-DisplayAttributes'
                  ignoreQueryRules:
                    $ref: '#/components/schemas/items-search-IgnoreQueryRules'
                  excludeQueryRules:
                    $ref: '#/components/schemas/items-search-ExcludeQueryRules'
                  params:
                    $ref: '#/components/schemas/items-search-Params'
    items-search-ExplainVisualSearchJsonBody:
      description: Request for performing visual search with explanation
      required: true
      content:
        application/json:
          schema:
            allOf:
            - $ref: '#/components/schemas/items-search-VisualSearchRequest'
            - type: object
              properties:
                crossWorkspaceMode:
                  $ref: '#/components/schemas/items-search-CrossWorkspaceMode'
    items-search-QueryClassificationJsonBody:
      description: Request for query classification
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              query:
                $ref: '#/components/schemas/items-search-SearchQuery'
              clientUUID:
                $ref: '#/components/schemas/items-search-ClientUUID'
              config:
                $ref: '#/components/schemas/items-search-QueryClassificationConfig'
    items-search-config-PutSearchConfigJsonBody:
      description: Request for posting search configuration
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
            - indexName
            - itemsCatalogId
            - language
            - searchableAttributes
            - enabled
            properties:
              indexName:
                $ref: '#/components/schemas/items-search-config-IndexNameSchema'
              description:
                $ref: '#/components/schemas/items-search-config-IndexDescriptionSchema'
              itemsCatalogId:
                $ref: '#/components/schemas/items-search-config-ItemsCatalogIdSchema'
              language:
                $ref: '#/components/schemas/items-search-config-LanguageSchema'
              enabled:
                $ref: '#/components/schemas/items-search-config-EnabledSchema'
              ignoreUnavailableItems:
                $ref: '#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema'
              scoring:
                $ref: '#/components/schemas/items-search-config-ScoringSchema'
              suggestions:
                $ref: '#/components/schemas/items-search-config-Suggestions'
              tokenizer:
                $ref: '#/components/schemas/items-search-config-Tokenizer'
              analyzers:
                $ref: '#/components/schemas/items-search-config-Analyzers'
              attributesWithoutPrefixSearch:
                $ref: '#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema'
              attributesWithoutTypoTolerance:
                $ref: '#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema'
              valuesWithoutTypoTolerance:
                $ref: '#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema'
              typoToleranceOnNumericValues:
                $ref: '#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema'
              searchableAttributes:
                $ref: '#/components/schemas/items-search-config-SearchableAttributesSchema'
              displayableAttributes:
                $ref: '#/components/schemas/items-search-config-DisplayableAttributesSchema'
              facetableAttributes:
                $ref: '#/components/schemas/items-search-config-FacetableAttributesSchema'
              filterableAttributes:
                $ref: '#/components/schemas/items-search-config-FilterableAttributesSchema'
              sortableAttributes:
                $ref: '#/components/schemas/items-search-config-SortableAttributesSchema'
              distinctFilterAttributes:
                $ref: '#/components/schemas/items-search-config-DistinctFilterAttributesSchema'
              recentSearches:
                $ref: '#/components/schemas/items-search-config-RecentSearchesConfig'
              reranking:
                $ref: '#/components/schemas/items-search-config-RerankingSchema'
              optimization:
                $ref: '#/components/schemas/items-search-config-OptimizationSchema'
              geoSearch:
                $ref: '#/components/schemas/items-search-config-GeoSearchSchema'
              queryRules:
                $ref: '#/components/schemas/items-search-config-QueryRulesSchema'
    items-search-config-SuggestionIndexConfigBody:
      content:
        application/json:
          schema:
            type: object
            properties:
              indexName:
                $ref: '#/components/schemas/items-search-config-SuggestionIndexNameSchema'
              description:
                $ref: '#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema'
              author:
                $ref: '#/components/schemas/items-search-config-SuggestionIndexAuthorSchema'
              enabled:
                $ref: '#/components/schemas/items-search-config-SuggestionIndexEnabledSchema'
              sources:
                $ref: '#/components/schemas/items-search-config-SuggestionIndexSourcesSchema'
              denylist:
                $ref: '#/components/schemas/items-search-config-SuggestionIndexDenylistSchema'
            required:
            - indexName
            - enabled
            - sources
    items-search-recent-DeletedSearchBody:
      description: Request for deleting search query
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/items-search-recent-DeletedSearch'
    query-rules-v2-postRuleBody:
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                $ref: '#/components/schemas/query-rules-v2-RuleName'
              author:
                $ref: '#/components/schemas/query-rules-v2-RuleAuthor'
              activeFrom:
                $ref: '#/components/schemas/query-rules-v2-RuleActiveFromDatetime'
              activeTo:
                $ref: '#/components/schemas/query-rules-v2-RuleActiveToDatetime'
              timezone:
                $ref: '#/components/schemas/query-rules-v2-RuleTimezoneSchema'
              data:
                $ref: '#/components/schemas/query-rules-v2-RuleDataSchema'
      description: Request for posting a new rule or updating an existing one
      required: true
    recommendations-config-PatchRecommendationConfigV3JsonBody:
      description: Request for updating AI Engine configuration
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              distinctAttributes:
                $ref: '#/components/schemas/recommendations-config-DistinctAttributesSchema'
              previewAttributes:
                $ref: '#/components/schemas/recommendations-config-PreviewAttributesSchema'
              displayedAttributes:
                $ref: '#/components/schemas/recommendations-config-DisplayedAttributesSchema'
              linkAttributes:
                $ref: '#/components/schemas/recommendations-config-LinkAttributesSchema'
              models:
                $ref: '#/components/schemas/recommendations-config-ModelsSchema'
              crossWorkspaceMode:
                $ref: '#/components/schemas/recommendations-config-CrossWorkspaceMode'
              personalizedPromotions:
                $ref: '#/components/schemas/recommendations-config-PersonalizedPromotionsSchema'
    schema-service-createDocumentReq:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/schema-service-createDocumentReq'
    schema-service-generateDocumentReq:
      content:
        application/json:
          schema:
            type: object
            example:
              customer.firstName: Joe
            additionalProperties:
              $ref: '#/components/schemas/schema-service-additionalPropertiesForGenerate'
    synonyms-crud-PostSynonymBody:
      content:
        application/json:
          schema:
            type: object
            properties:
              type:
                $ref: '#/components/schemas/synonyms-crud-Type'
              word:
                $ref: '#/components/schemas/synonyms-crud-Word'
              synonyms:
                $ref: '#/components/schemas/synonyms-crud-Synonyms'
              confidence:
                $ref: '#/components/schemas/synonyms-crud-Confidence'
              reason:
                $ref: '#/components/schemas/synonyms-crud-Reason'
              source:
                $ref: '#/components/schemas/synonyms-crud-SynonymSource'
              state:
                $ref: '#/components/schemas/synonyms-crud-SynonymState'
            required:
            - synonyms
      description: Request for creating new synonym
      required: true
    synonyms-crud-CsvBody:
      description: "\nThe CSV has three columns: \n- `word`: the phrase to replace with a synonym\n- `synonyms`: the synonyms of the word (if more than one, the list is comma-separated and enclosed with `\"\"`)\n- `type`: the relation type:\n  - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.\n  - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.\n"
      required: true
      content:
        text/csv:
          schema:
            type: object
            properties:
              word:
                $ref: '#/components/schemas/synonyms-crud-Word'
              synonyms:
                $ref: '#/components/schemas/synonyms-crud-Synonyms'
              type:
                $ref: '#/components/schemas/synonyms-crud-Type'
          example: |
            word,synonyms,type
            dog,"doggy,puppy",oneway
            small horse,pony,oneway
            ,"cat,kitten,kitty,tabby cat",synonyms
        multipart/form-data:
          schema:
            type: object
            properties:
              synonyms:
                type: string
                format: binary
                description: Uploaded CSV file to be used in synonyms update
    tags-collector-HashArray-collector:
      content:
        application/json:
          schema:
            type: array
            items:
              type: string
              description: Hash ID of a tag
      required: true
