x-explorer-enabled: false
openapi: 3.0.3
servers:
  - url: 'https://resources.uk.eagleeye.com/2.0'
    description: UK Production.
  - url: 'https://resources.us.eagleeye.com/2.0'
    description: US Production.
  - url: 'https://resources.us2.eagleeye.com/2.0'
    description: US2 Production.
  - url: 'https://resources.au.eagleeye.com/2.0'
    description: AU Production.
  - url: 'https://resources.sandbox.uk.eagleeye.com'
    description: UK Sandbox.
info:
  version: 1.29.0
  title: Resource API
  description: >-
    # These APIs are used for integration with the Eagle Eye AIR platform when interacting with resources.
tags:
  - name: Audiences
    description: These APIs are used for managing the Audiences in the AIR platform.
  - name: Campaigns
    description: These APIs are used for integration with the Eagle Eye AIR platform when using Campaigns.
  - name: Schemes
    description: These APIs are used for integration with the Eagle Eye AIR platform when using Schemes.
  - name: Reward Bank
    description: Set of RESTful API endpoints allowing Clients to integrate with EES AIR and use Reward Bank functionality.
  - name: Inventory List
    description: API endpoints exposed in this section provide functionality to query and retrieve product information regarding Inventory Lists.
  - name: Product Inventory
    description: Set of RESTful API endpoints allowing Clients to integrate with EES AIR and use Product Inventory functionality.
  - name: Token Formats
    description: These APIs are used for integration with the Eagle Eye AIR platform when using Token Formats.
  - name: Units
    description: These APIs are used for managing Company and Outlet units in the AIR platform.
  - name: Tiers
    description: These APIs are used for managing Loyalty Tiers as part of Schemes with the AIR platform.
paths:
  /schemes/points:
    get:
      summary: Search for Points Schemes
      description: This method allows the calling application to retrieve all Schemes.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/eesReferenceParam'
        - $ref: '#/components/parameters/eesBarcodeParam'
        - $ref: '#/components/parameters/eesStatusParam'
        - $ref: '#/components/parameters/eesAccountClientTypeParam'
        - $ref: '#/components/parameters/eesEndDateParam'
        - $ref: '#/components/parameters/eesStartDateParam'
        - $ref: '#/components/parameters/eesTagParam'
        - $ref: '#/components/parameters/eesOffsetParam'
        - $ref: '#/components/parameters/eesLimitParam'
      operationId: getSchemes
      tags:
        - Schemes
      responses:
        '200':
          description: Result of Schemes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemesEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
    post:
      summary: Create Points Scheme
      description: This method allows the calling application to create a Scheme.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: postSchemes
      tags:
        - Schemes
      requestBody:
        $ref: '#/components/requestBodies/postSchemePayload'
      responses:
        '201':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemeEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
  /schemes/points/{schemeId}:
    get:
      summary: Get Points Scheme
      description: This method allows the calling application to retrieve a Scheme by Id.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/eesSchemeId'
      operationId: getSchemeById
      tags:
        - Schemes
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemeEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
    put:
      summary: Replace Points Scheme
      description: This method allows the calling application to update a Scheme by Scheme Id.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/eesSchemeId'
      operationId: putSchemeById
      tags:
        - Schemes
      requestBody:
        $ref: '#/components/requestBodies/putSchemePayload'
      responses:
        '201':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemeEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
  /scheme/points/{schemeId}:
    get:
      deprecated: true
      summary: Get Points Scheme
      description: >-
        This endpoint is deprecated - See GET By Id - GET /schemes/points/{schemeId} 
        This method allows the calling application to retrieve a Scheme by Id.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/eesSchemeId'
      operationId: z-getSchemeById
      tags:
        - Schemes
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemeEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
  /scheme/points/reference/{reference}:
    get:
      deprecated: true
      summary: Get Points Scheme by Reference
      description: >-
        This endpoint is deprecated - Please use Get By Id - GET /schemes/points?reference={reference}
        This method allows the calling application to retrieve a Scheme by Reference.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/eesSchemeReference'
      operationId: z-getSchemeByReference
      tags:
        - Schemes
      responses:
        '201':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemeEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'

  /campaigns:
    get:
      summary: Search for Campaigns
      description: This method allows the calling application to retrieve Campaigns.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/eesCampaignIdArrayParam'
        - $ref: '#/components/parameters/eesReferenceParam'
        - $ref: '#/components/parameters/eesBarcodeParam'
        - $ref: '#/components/parameters/eesCampaignTypeParam'
        - $ref: '#/components/parameters/eesStatusParam'
        - $ref: '#/components/parameters/eesAccountClientTypeParam'
        - $ref: '#/components/parameters/eesEndDateParam'
        - $ref: '#/components/parameters/eesStartDateParam'
        - $ref: '#/components/parameters/eesTagParam'
        - $ref: '#/components/parameters/eesOffsetParam'
        - $ref: '#/components/parameters/eesLimitParam'
      operationId: getCampaigns
      tags:
        - Campaigns
      responses:
        '200':
          description: Result of Campaigns.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignsEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'

    post:
      summary: Create Campaign
      description: This method allows the calling application to create a Campaign.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: postCampaigns
      tags:
        - Campaigns
      requestBody:
        $ref: '#/components/requestBodies/postCampaignPayload'
      responses:
        '201':
          $ref: '#/components/responses/responseCampaignPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
  /campaigns/{campaignId}:
    get:
      summary: Get Campaign
      description: This method allows the calling application to retrieve a Campaign by Campaign Id.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/eesCampaignId'
      operationId: getCampaign
      tags:
        - Campaigns
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignEntity'
            response:
              examples:
                response:
                  value:
                    payload:
                      id: '173'
                      relationships:
                        objective:
                          campaign:
                            - campaignId: '170'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                            - campaignId: '171'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        objectiveOf:
                          campaign:
                            - campaignId: '173'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                            - campaignId: '184'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        promotion:
                          campaign:
                            - campaignId: '95'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                            - campaignId: '96'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        promotionOf:
                          campaign:
                            - campaignId: '173'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        entitlement:
                          campaign:
                            - campaignId: '125'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        entitlementOf:
                          plan:
                            - campaignId: '173'
                              dateCreated: '2022-11-01T14:53:07+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'

    put:
      summary: Replace Campaign
      description: This method allows the calling application to update a Campaign by Campaign Id.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/eesCampaignId'
      operationId: putCampaign
      tags:
        - Campaigns
      requestBody:
        $ref: '#/components/requestBodies/campaignPayload'
      responses:
        '201':
          $ref: '#/components/responses/responseCampaignPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'

    patch:
      summary: Update Campaign
      description: >-
        This method allows the calling application to partial update a Campaign by Campaign Id.

        If you are updating an array it is recommended to use the PUT /campaigns endpoint instead.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/eesCampaignId'
      operationId: patchCampaign
      tags:
        - Campaigns
      requestBody:
        $ref: '#/components/requestBodies/campaignPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseCampaignPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'

    delete:
      summary: Delete Campaign
      description: This method allows the calling application to delete a Campaign.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/eesCampaignId'
      operationId: deleteCampaign
      tags:
        - Campaigns
      responses:
        200:
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/campaignEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
  /programmes:
    get:
      summary: Search for Programmes
      description: This method allows the calling application to retrieve all Programmes.
      operationId: getProgrammes
      tags:
        - Programmes
      parameters:
        - $ref: '#/components/parameters/programmeIdQuery'
        - $ref: '#/components/parameters/programmeStatusQuery'
        - $ref: '#/components/parameters/programmeTypeQuery'
        - $ref: '#/components/parameters/programmeTagQuery'
        - $ref: '#/components/parameters/eesAccountClientTypeParam'
        - $ref: '#/components/parameters/programmeStartDateQuery'
        - $ref: '#/components/parameters/programmeEndDateQuery'
        - $ref: '#/components/parameters/programmeDateCreatedQuery'
        - $ref: '#/components/parameters/programmeLastUpdatedQuery'
        - $ref: '#/components/parameters/programmeOrderByQuery'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      responses:
        '200':
          $ref: '#/components/responses/responseProgrammesSearchPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        404:
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    post:
      summary: Create Programme
      description: This method allows the calling application to create a Programme.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: postProgrammes
      tags:
        - Programmes
      requestBody:
        $ref: '#/components/requestBodies/postProgrammesPayload'
      responses:
        '201':
          $ref: '#/components/responses/responseProgrammesPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
  /programmes/{id}:
    get:
      summary: Get Programme
      description: This method allows the calling application to retrieve a Programme by id.
      parameters:
        - $ref: '#/components/parameters/programmeIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: getProgrammeById
      tags:
        - Programmes
      responses:
        '200':
          $ref: '#/components/responses/responseProgrammesPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    delete:
      summary: Delete Programme
      description: This method allows the calling application to delete a Programme by id.
      parameters:
        - $ref: '#/components/parameters/programmeIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: deleteProgrammeById
      tags:
        - Programmes
      responses:
        '200':
          $ref: '#/components/responses/responseProgrammesPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    put:
      summary: Update Programme
      description: This method allows the calling application to update a Programme.
      parameters:
        - $ref: '#/components/parameters/programmeIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: putProgrammeById
      tags:
        - Programmes
      requestBody:
        $ref: '#/components/requestBodies/putProgrammesPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseProgrammesPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
  /inventoryLists:
    get:
      summary: Search for Inventory Lists
      operationId: getAllInventoryLists
      tags:
        - Inventory List
      description: >-
        This API endpoint allows the calling application to retrieve all Inventory List products that includes optional criteria filtering.
      parameters:
        - name: status
          in: query
          required: false
          description: >-
            Optional Filtering criteria (e.g. `status=ACTIVE`) allowing the calling application to narrow down returned results by list status
          schema:
            type: string
            format: string
            enum:
              - ACTIVE
              - SUSPENDED
          allowEmptyValue: false
        - name: type
          in: query
          required: false
          description: >-
            Optional Filtering criteria (e.g. `type=EXCLUDE`) allow the calling application to narrow down returned results by list type
          schema:
            type: string
            format: string
            enum:
              - INCLUDE
              - EXCLUDE
        - name: 'orderBy[]'
          in: query
          required: false
          description: >-
            This optional request parameter allows the calling application to request a specific sorting order for a result set. Currently supported field names are&#58; `inventoryListId`, `type` and `status`
          schema:
            type: string
            format: string
            enum:
              - "inventoryListId,ASC"
              - "inventoryListId,DESC"
              - "type,ASC"
              - "type,DESC"
              - "status,ASC"
              - "status,DESC"
            default: "inventoryListId,ASC"
          allowEmptyValue: false
        - name: offset
          in: query
          required: false
          description: >-
            This optional request parameter allows the calling application to request a specific page (pagination offset)
          schema:
            type: string
            format: int32
            default: 0
            minimum: 0
          allowEmptyValue: false
        - name: limit
          in: query
          required: false
          description: >-
            This optional request parameter allows the calling application to influence a length of returned result-set (pagination items per page)
          schema:
            type: string
            format: int32
            default: 100
            minimum: 1
            maximum: 100
          allowEmptyValue: false
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/getInventoryListsPayload'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
    post:
      summary: Create Inventory List
      operationId: postInventoryList
      tags:
        - Inventory List
      description: >-
        This API endpoint allows the calling application to create a new Inventory List.
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      requestBody:
        $ref: '#/components/requestBodies/postInventoryListPayload'
      responses:
        201:
          $ref: '#/components/responses/postInventoryListResponse'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
  /inventoryLists/{inventoryListId}:
    get:
      summary: Get Inventory List
      operationId: getInventoryListById
      tags:
        - Inventory List
      description: >-
        This API endpoint allows the calling application to retrieve details for an Inventory List's products by Inventory List Id.
      parameters:
        - $ref: '#/components/parameters/inventoryListId'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/getInventoryListPayload'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
    put:
      summary: Replace Inventory List
      operationId: putInventoryList
      tags:
        - Inventory List
      description: >-
        This API endpoint allows the calling application to update an existing Inventory List.
      parameters:
        - $ref: '#/components/parameters/inventoryListId'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      requestBody:
        $ref: '#/components/requestBodies/postInventoryListPayload'
      responses:
        200:
          $ref: '#/components/responses/postInventoryListResponse'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
    delete:
      summary: Delete Inventory List
      operationId: deleteInventoryList
      tags:
        - Inventory List
      description: >-
        This API endpoint allows the calling application to delete an Inventory List's products by Inventory List Id.
      parameters:
        - $ref: '#/components/parameters/inventoryListId'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/getInventoryListPayload'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
  /inventory:
    get:
      summary: Search the Product Inventory
      operationId: getproductinventory
      tags:
        - Product Inventory
      description: >
        This API endpoint allows the calling application to retrieve a list of Products based on a number of parameters.


        Below is a list of the 5 combinations of parameters that can be be passed in to filter the returned Products:
         * groupReference & parentIncomingIdentifier.
         * upc & parentIncomingIdentifier.
         * sku & parentIncomingIdentifier.
         * parentIncomingIdentifier & tag & matchAll.
         * parentIncomingIdentifier & name.
      parameters:
        - $ref: '#/components/parameters/groupReference'
        - $ref: '#/components/parameters/incomingIdentifier'
        - $ref: '#/components/parameters/upc'
        - $ref: '#/components/parameters/sku'
        - $ref: '#/components/parameters/tag'
        - $ref: '#/components/parameters/name'
        - $ref: '#/components/parameters/supplierId'
        - $ref: '#/components/parameters/supplierName'
        - $ref: '#/components/parameters/brand'
        - $ref: '#/components/parameters/brandType'
        - $ref: '#/components/parameters/lastSoldDate'
        - $ref: '#/components/parameters/matchAll'
        - $ref: '#/components/parameters/parentIncomingIdentifier'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'

      responses:
        200:
          $ref: '#/components/responses/getProductInventoryListsPayload'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
  /banks/pointsreward:
    get:
      summary: Search for Reward Banks
      operationId: getPointsExchangeBanks
      tags:
        - Reward Bank
      description: >-
        This API endpoint allows the calling application to retrieve a set of Points Exchange Banks details fulfilling an optional filtering criteria
      parameters:
        - name: mode
          in: query
          required: false
          description: >-
            This optional parameter allows the calling application to request results filtering by a Rewards Bank mode (e.g. `mode=PUBLIC`).
          schema:
            type: string
            format: string
            enum:
              - PUBLIC
              - PERSONAL
          allowEmptyValue: false
        - name: status
          in: query
          required: false
          description: >-
            This optional parameter allows the calling application to request results filtering by a Rewards Bank status (e.g. `status=ACTIVE`). Please note&#58; to achieve filtering on multiple status values this request parameter has to be provided as array items (e.g.  `status[]=SUSPENDED&status[]=INACTIVE`)
          schema:
            oneOf:
              - type: string
                format: string
              - type: array
                items:
                  type: string
                  format: string

          allowEmptyValue: false
        - name: reference
          in: query
          required: false
          description: >-
            This optional parameter allows the calling application to request results filtering by a Rewards Bank reference (e.g. `reference=0001234`). Please note&#58; only full reference filtering is supported.
          schema:
            type: string
            format: string
          allowEmptyValue: false
        - name: 'orderBy[]'
          in: query
          required: false
          description: >-
            This optional request parameter allows the calling application to request a specific sorting order for returned result set. Currently supported field is&#58; `pointsRewardBankId`
          schema:
            type: string
            format: string
            default: pointsRewardBankId,ASC
            enum:
              - pointsRewardBankId,ASC
              - pointsRewardBankId,DESC
          allowEmptyValue: false
        - name: offset
          in: query
          required: false
          description: >-
            This optional request parameter allows the calling application to request a specific page from a full result set (pagination offset)
          schema:
            type: string
            format: int32
            default: 0
          allowEmptyValue: false
        - name: limit
          in: query
          required: false
          description: >-
            This optional request parameter allows the calling application to influence returned result set results (pagination results per page)
          schema:
            type: string
            format: int32
            default: 100
            minimum: 1
            maximum: 100
          allowEmptyValue: false
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/getBanksPayload'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        409:
          $ref: '#/components/responses/error409Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
    post:
      summary: Create a Reward Bank with Rewards
      operationId: postPointsExchangeBanks
      tags:
        - Reward Bank
      description: >-
        This API endpoint allows the calling application to create a Reward Bank with Rewards
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      requestBody:
        $ref: '#/components/requestBodies/postRewardBankPayload'
      responses:
        201:
          $ref: '#/components/responses/createBankRewardResponse'
        207:
          $ref: '#/components/responses/207createBankRewardResponse'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        409:
          $ref: '#/components/responses/error409Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
  /banks/pointsreward/{bankId}:
    get:
      summary: Get Reward Bank
      operationId: getPointsRewardBankById
      tags:
        - Reward Bank
      description: >-
        This API endpoint allows the calling application to retrieve a Points Exchange Bank details by Bank ID
      parameters:
        - $ref: '#/components/parameters/bankId'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/getBankPayload'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        409:
          $ref: '#/components/responses/error409Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
    patch:
      summary: Update Reward Bank
      operationId: patchPointsRewardBankById
      tags:
        - Reward Bank
      description: >-
        This API endpoint allows the calling application to update a Points Exchange Bank details by Bank ID.
      parameters:
        - $ref: '#/components/parameters/bankId'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      requestBody:
        $ref: '#/components/requestBodies/patchRewardBankPayload'
      responses:
        200:
          $ref: '#/components/responses/getBankPayload'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        409:
          $ref: '#/components/responses/error409Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
    delete:
      summary: Delete Reward Bank
      operationId: deletePointsRewardBankById
      tags:
        - Reward Bank
      description: This method allows the calling application to delete a Reward Bank. Any associated Rewards will also be deleted.
      parameters:
        - $ref: '#/components/parameters/bankId'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/getBankPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
  /banks/pointsreward/{bankId}/rewards:
    get:
      summary: Search for Rewards From a Reward Bank
      operationId: getPointsExchangeBankRewards
      tags:
        - Reward Bank
      description: >-
        This API endpoint allows the calling application to retrieve a Points Exchange Bank Reward details by Bank ID and optionally by other filtering criteria
      parameters:
        - $ref: '#/components/parameters/bankId'
        - name: threshold[to]
          in: query
          required: false
          description: >-
            Optional Filtering criteria (e.g. `threshhold[to]=100`) allowing the calling application to narrow down returned results by reward threshold
          schema:
            type: string
            format: string
          allowEmptyValue: false
        - name: threshold[from]
          in: query
          required: false
          description: >-
            Optional Filtering criteria (e.g. `threshhold[from]=10`) allowing the calling application to narrow down returned results by reward threshold
          schema:
            type: string
            format: string
          allowEmptyValue: false
        - name: status
          in: query
          required: false
          description: >-
            Optional Filtering criteria (e.g. `status=ACTIVE`) allowing the calling application to narrow down returned results by reward status
          schema:
            type: string
            format: string
          allowEmptyValue: false
        - name: 'orderBy[]'
          in: query
          required: false
          description: >-
            This optional request parameter allows the calling application to request a specific sorting order for a result set. Currently supported field names are&#58; `pointsRewardBankRewardId` and `threshold`
          schema:
            type: string
            format: string
            enum:
              - "pointsRewardBankRewardId,ASC"
              - "pointsRewardBankRewardId,DESC"
              - "threshold,ASC"
              - "threshold,DESC"
            default: "pointsRewardBankRewardId,ASC"
          allowEmptyValue: false
        - name: offset
          in: query
          required: false
          description: >-
            This optional request parameter allows the calling application to request a specific page (pagination offset)
          schema:
            type: string
            format: int32
            default: 0
            minimum: 0
          allowEmptyValue: false
        - name: limit
          in: query
          required: false
          description: >-
            This optional request parameter allows the calling application to influence a length of returned result-set (pagination items per page)
          schema:
            type: string
            format: int32
            default: 100
            minimum: 1
            maximum: 100
          allowEmptyValue: false
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/getBankRewardsPayload'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        409:
          $ref: '#/components/responses/error409Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
    post:
      summary: Add Reward to Existing Reward Bank
      operationId: postPointsExchangeBankRewards
      tags:
        - Reward Bank
      description: >-
        This API endpoint allows the calling application to create one or more Rewards for an existing Points Exchange Bank
      parameters:
        - $ref: '#/components/parameters/bankId'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    resourceType:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/resourceType'
                    resourceId:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/resourceId'
                    threshold:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/threshold'
                    cost:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/cost'
                    status:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/status'
                    reasonCode:
                      type: string
                  required:
                    - resourceId
                    - resourceType
                    - cost
                - type: array
                  items:
                    type: object
                    properties:
                      resourceType:
                        $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/resourceType'
                      resourceId:
                        $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/resourceId'
                      threshold:
                        $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/threshold'
                      cost:
                        $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/cost'
                      status:
                        $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/status'
                      reasonCode:
                        type: string
                    required:
                      - resourceId
                      - resourceType
                      - cost
            example:
              - resourceType: CAMPAIGN
                resourceId: '2'
                threshold: 30
                cost: 20
                status: ACTIVE
                reasonCode: null
              - resourceType: CAMPAIGN
                resourceId: '3'
                cost: 20
                status: ACTIVE
                reasonCode: null
      responses:
        201:
          $ref: '#/components/responses/createBankRewardResponse'
        207:
          $ref: '#/components/responses/207createBankRewardResponse'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        409:
          $ref: '#/components/responses/error409Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
  /banks/pointsreward/{bankId}/rewards/{rewardId}:
    get:
      summary: Get a Reward from a Reward Bank
      operationId: getBankReward
      tags:
        - Reward Bank
      description: >-
        This API endpoint allows the calling application to retrieve a Reward details by Bank ID and Reward ID
      parameters:
        - $ref: '#/components/parameters/bankId'
        - $ref: '#/components/parameters/rewardId'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'

      responses:
        200:
          $ref: '#/components/responses/getRewardPayload'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        409:
          $ref: '#/components/responses/error409Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
    patch:
      summary: Update a Reward in a Reward Bank
      operationId: patchBankReward
      tags:
        - Reward Bank
      description: >-
        This API endpoint allows the calling application to update a Reward's details by Bank ID and Reward ID.
      parameters:
        - $ref: '#/components/parameters/bankId'
        - $ref: '#/components/parameters/rewardId'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                threshold:
                  $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/threshold'
                cost:
                  $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/cost'
                status:
                  $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/status'
                reasonCode:
                  type: string
            example:
              threshold: 30
              cost: 20
              status: ACTIVE
              reasonCode: null
      responses:
        200:
          $ref: '#/components/responses/getRewardPayload'
        400:
          $ref: '#/components/responses/error400Response'
        401:
          $ref: '#/components/responses/error401Response'
        403:
          $ref: '#/components/responses/error403Response'
        404:
          $ref: '#/components/responses/error404Response'
        409:
          $ref: '#/components/responses/error409Response'
        415:
          $ref: '#/components/responses/error415Response'
        429:
          $ref: '#/components/responses/error429Response'
        500:
          $ref: '#/components/responses/error500Response'
        503:
          $ref: '#/components/responses/error503Response'
        504:
          $ref: '#/components/responses/error504Response'
    delete:
      summary: Delete Reward from a Reward Bank
      operationId: deleteBankReward
      tags:
        - Reward Bank
      description: This method allows the calling application to delete a Reward Bank Reward.
      parameters:
        - $ref: '#/components/parameters/bankId'
        - $ref: '#/components/parameters/rewardId'
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/getRewardPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'

  /tokenFormats/{id}:
    get:
      summary: Get a Token Format
      description: This method allows the calling application to fetch a Token Format by ID.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/tokenFormatId'

      operationId: getTokenFormatsById
      tags:
        - Token Formats
      responses:
        '200':
          $ref: '#/components/responses/responseTokenFormatPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /tokenFormats:
    get:
      summary: Search for Token Formats
      description: This method allows the calling application to search token formats using query parameters.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/tokenFormatIdArrayParam'
        - $ref: '#/components/parameters/tokenFormatSafeNameParam'
        - $ref: '#/components/parameters/tokenFormatNameParam'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/orderByParam'
      operationId: getTokenFormats
      tags:
        - Token Formats
      responses:
        '200':
          $ref: '#/components/responses/responseTokenFormatSearch'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

    post:
      summary: Create Token Format
      description: This method allows the calling application to create a Token Format and attach it to the calling unit.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: postTokenFormats
      tags:
        - Token Formats
      requestBody:
        $ref: '#/components/requestBodies/postTokenFormatPayload'
      responses:
        '201':
          $ref: '#/components/responses/responseTokenFormatPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /tokenFormat/{id}:
    get:
      deprecated: true
      summary: Get a Token Format
      description: >-
        This endpoint is deprecated - please see /tokenFormats/{id}
        This method allows the calling application to fetch a Token Format by ID.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/tokenFormatId'

      operationId: z-getTokenFormatsById
      tags:
        - Token Formats
      responses:
        '200':
          $ref: '#/components/responses/responseTokenFormatPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /units:
    get:
      summary: Search for Units (BETA)
      description: This method allows the calling application to search units using query parameters.
      parameters:
        - $ref: '#/components/parameters/unitIdQuery'
        - $ref: '#/components/parameters/unitStatusQuery'
        - $ref: '#/components/parameters/unitTypeQuery'
        - $ref: '#/components/parameters/parentUnitIdQuery'
        - $ref: '#/components/parameters/unitTagQuery'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/unitsOrderByParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: getUnits
      tags:
        - Units
      responses:
        '200':
          $ref: '#/components/responses/responseUnitsSearchPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    post:
      summary: Create Unit (BETA)
      description: This method allows the calling application to create a Banner or a Store/Outlet unit.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: postUnits
      tags:
        - Units
      requestBody:
        $ref: '#/components/requestBodies/postUnitsPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseUnitsPostPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
  /units/{unitId}:
    get:
      summary: Get Unit (BETA)
      description: This method allows the calling application to retrieve a unit by id.
      parameters:
        - $ref: '#/components/parameters/unitIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: getUnitById
      tags:
        - Units
      responses:
        '200':
          $ref: '#/components/responses/responseUnitsPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    patch:
      summary: Update Unit (BETA)
      description: This method allows the calling application to update a unit.
      parameters:
        - $ref: '#/components/parameters/unitIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: patchUnitById
      tags:
        - Units
      requestBody:
        $ref: '#/components/requestBodies/patchUnitsPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseUnitsPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /units/{unitId}/walletConfig/identityTypes:
    post:
      summary: Create Identity Type (BETA)
      description: This method allows calling application to create an identity type for the calling unit.
      parameters:
        - $ref: '#/components/parameters/unitIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: postIdentityTypes
      tags:
        - Units
      requestBody:
        $ref: '#/components/requestBodies/identityTypesPayload'
      responses:
        '201':
          $ref: '#/components/responses/identityTypesPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /units/{unitId}/walletConfig/identityTypes/{identityTypeId}:
    put:
      summary: Replace Identity Type (BETA)
      description: This method allows calling application to update an identity type for the calling unit.
      parameters:
        - $ref: '#/components/parameters/unitIdParam'
        - $ref: '#/components/parameters/identityTypeIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: putIdentityTypes
      tags:
        - Units
      requestBody:
        $ref: '#/components/requestBodies/identityTypesPayload'
      responses:
        '200':
          $ref: '#/components/responses/identityTypesPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /units/{unitId}/fileTransferConfig:
    get:
      summary: Get Unit File Transfer Configuration (BETA)
      description: This method allows the calling application to retrieve a unit's file transfer configuration.
      parameters:
        - $ref: '#/components/parameters/unitIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: getUnitFileTransferConfigById
      tags:
        - Units
      responses:
        '200':
          $ref: '#/components/responses/responseFileTransferConfig'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    post:
      summary: Create Unit File Transfer Configuration (BETA)
      description: This method allows the calling application to create a unit file transfer configuration.
      parameters:
        - $ref: '#/components/parameters/unitIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: postUnitFileTransferConfigById
      tags:
        - Units
      requestBody:
        $ref: '#/components/requestBodies/postUnitFileTransferConfigPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseFileTransferConfig'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    patch:
      summary: Update Unit File Transfer Configuration (BETA)
      description: This method allows the calling application to update the key associated with the file transfer configuration
      parameters:
        - $ref: '#/components/parameters/unitIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: patchUnitFileTransferConfigById
      tags:
        - Units
      requestBody:
        $ref: '#/components/requestBodies/patchUnitFileTransferConfigPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseFileTransferConfig'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    delete:
      summary: Delete Unit File Transfer Configuration (BETA)
      description: >- 
        This method allows the calling application to permanently delete the file transfer configuration associated with
        the specified unit. Once deleted, all settings related to file transfers for this unit will be removed and 
        cannot be recovered. File transfers for this unit will be disabled until a new configuration is created.
      parameters:
        - $ref: '#/components/parameters/unitIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: deleteUnitFileTransferConfigById
      tags:
        - Units
      responses:
        '204':
          description: No Content.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /units/{unitId}/walletConfig/walletTypes:
    post:
      summary: Create Wallet Type (BETA)
      description: This method allows calling application to create a wallet type for the calling unit.
      parameters:
        - $ref: '#/components/parameters/unitIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: postWalletTypes
      tags:
        - Units
      requestBody:
        $ref: '#/components/requestBodies/walletTypesPayload'
      responses:
        '200':
          $ref: '#/components/responses/walletTypesPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /units/{unitId}/walletConfig/walletTypes/{walletTypeId}:
    put:
      summary: Replace Wallet Type (BETA)
      description: This method allows calling application to update a wallet type for the calling unit.
      parameters:
        - $ref: '#/components/parameters/unitIdParam'
        - $ref: '#/components/parameters/walletTypeIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: putWalletTypes
      tags:
        - Units
      requestBody:
        $ref: '#/components/requestBodies/walletTypesPayload'
      responses:
        '200':
          $ref: '#/components/responses/walletTypesPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /services/units:
    post:
      summary: Create and Configure Tenant (BETA)
      description: |
        This method allows the calling application to create a new tenant unit with wallet config, POS Connect config and unit credentials.  
        __Warning:__ This API can cause issues if used from within an existing configuration on the platform. Please contact the Eagle Eye implementation teams before using this API.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: postServicesUnits
      tags:
        - Units
      requestBody:
        $ref: '#/components/requestBodies/postServicesUnitsPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseServiceUnitsPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /tiers:
    get:
      summary: Search for Tiers
      description: This method allows the calling application to search Loyalty Tiers using query parameters.
      parameters:
        - $ref: '#/components/parameters/tierIdQuery'
        - $ref: '#/components/parameters/tierStatusQuery'
        - $ref: '#/components/parameters/tierTypeQuery'
        - $ref: '#/components/parameters/tierReferenceQuery'
        - $ref: '#/components/parameters/tierSchemeIdQuery'
        - $ref: '#/components/parameters/tierPromotionTierIdQuery'
        - $ref: '#/components/parameters/tierDemotionTierIdQuery'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/tierOrderByParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: getTiers
      tags:
        - Tiers
      responses:
        '200':
          $ref: '#/components/responses/responseTiersSearchPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    post:
      summary: Create Tier
      description: This method allows the calling application to create a Loyalty Tier.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: postTiers
      tags:
        - Tiers
      requestBody:
        $ref: '#/components/requestBodies/postTierPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseTierPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /tiers/{id}:
    get:
      summary: Get Tier
      description: This method allows the calling application to retrieve a Loyalty Tier by id.
      parameters:
        - $ref: '#/components/parameters/tierIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: getTiersById
      tags:
        - Tiers
      responses:
        '200':
          $ref: '#/components/responses/responseTierPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    put:
      summary: Replace Tier
      description: This method allows the calling application to update a Loyalty Tier.
      parameters:
        - $ref: '#/components/parameters/tierIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: putTiersById
      tags:
        - Tiers
      requestBody:
        $ref: '#/components/requestBodies/putTierPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseTierPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    delete:
      summary: Delete Tier
      description: This method allows the calling application to delete a Loyalty Tier. It is not possible to delete a Loyalty Tier if it is set as the default for a Scheme.
      parameters:
        - $ref: '#/components/parameters/tierIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: deleteTiersById
      tags:
        - Tiers
      responses:
        '200':
          $ref: '#/components/responses/responseTierPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /tier:
    post:
      deprecated: true
      summary: Create Tier
      description: >-
        This endpoint is deprecated - See /tiers
        This method allows the calling application to create a Loyalty Tier.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: z-postTiers
      tags:
        - Tiers
      requestBody:
        $ref: '#/components/requestBodies/postTierPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseTierPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

  /tier/{id}:
    get:
      deprecated: true
      summary: Get Tier
      description: >-
        This endpoint is deprecated - See /tiers/{id}
        This method allows the calling application to retrieve a Loyalty Tier by id.
      parameters:
        - $ref: '#/components/parameters/tierIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: z-getTiersById
      tags:
        - Tiers
      responses:
        '200':
          $ref: '#/components/responses/responseTierPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    put:
      deprecated: true
      summary: Replace Tier
      description: >-
        This endpoint is deprecated - See /tiers/{id}
        This method allows the calling application to update a Loyalty Tier.
      parameters:
        - $ref: '#/components/parameters/tierIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: z-putTiersById
      tags:
        - Tiers
      requestBody:
        $ref: '#/components/requestBodies/putTierPayload'
      responses:
        '200':
          $ref: '#/components/responses/responseTierPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    delete:
      deprecated: true
      summary: Delete Tier
      description: >-
        This endpoint is deprecated - See /tiers/{id}
        This method allows the calling application to delete a Loyalty Tier. It is not possible to delete a Loyalty Tier if it is set as the default for a Scheme.
      parameters:
        - $ref: '#/components/parameters/tierIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      operationId: z-deleteTiers
      tags:
        - Tiers
      responses:
        '200':
          $ref: '#/components/responses/responseTierPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
  /audiences:
    get:
      tags:
        - Audiences
      operationId: getAudiences
      summary: Search for Audience (BETA)
      description: This method allows the calling application to search for Audiences on the AIR platform.
      parameters:
        - $ref: '#/components/parameters/audienceReferenceParam'
        - $ref: '#/components/parameters/audiencesLimitParam'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/audienceOrderByParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      responses:
        '200':
          description: The response of a successful Audiences request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    description: The list of Audiences found in the AIR platform matching the search criteria.
                    type: array
                    items:
                      $ref: '#/components/schemas/audiencesEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    post:
      tags:
        - Audiences
      operationId: createAudiences
      summary: Create Audience (BETA)
      description: This method allows the calling application to create an Audience on the AIR platform.
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      requestBody:
        $ref: '#/components/requestBodies/postAudiencesPayload'
      responses:
        '201':
          $ref: '#/components/responses/audiencesPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
  /audiences/{audienceId}:
    put:
      tags:
        - Audiences
      operationId: putAudiences
      summary: Replace Audience (BETA)
      description: This method allows the calling application to replace the contents of an Audience by Id.
      parameters:
        - $ref: '#/components/parameters/audienceIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      requestBody:
        $ref: '#/components/requestBodies/postAudiencesPayload'
      responses:
        '200':
          $ref: '#/components/responses/audiencesPayload'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'
    delete:
      tags:
        - Audiences
      operationId: deleteAudience
      summary: Delete Audience (BETA)
      description: This method allows the calling application to delete an Audience by Id.
      parameters:
        - $ref: '#/components/parameters/audienceIdParam'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '405':
          $ref: '#/components/responses/methodNotAllowed'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
        '501':
          $ref: '#/components/responses/notImplemented'
        '502':
          $ref: '#/components/responses/badGateway'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
        '504':
          $ref: '#/components/responses/gatewayTimeout'

components:
  parameters:
    eesSchemeId:
      name: schemeId
      in: path
      description: EES AIR Scheme ID.
      required: true
      schema:
        type: string
        format: int64
    eesSchemeReference:
      name: reference
      in: path
      description: EES AIR Scheme Reference.
      required: true
      schema:
        type: string
        format: int64
    eesAuthenticationClientId:
      name: X-EES-AUTH-CLIENT-ID
      in: header
      description: Client ID, This will be provided by EES and is unique to the company calling the API.
      required: true
      schema:
        type: string
        format: string
    eesAuthenticationRequestHash:
      name: X-EES-AUTH-HASH
      in: header
      description: Request Security Hash, calculated using SHA-256 function from concatenated full Request
        URI Path with Query String(s), Payload and Client Secret.
      required: true
      schema:
        type: string
        format: string
    eesMessageId:
      name: X-EES-TRANSACTION-ID
      in: header
      description: Unique Reference for the API transaction within the calling company.
      required: false
      schema:
        type: string
        format: string
    eesMessageRetry:
      name: X-EES-RETRY
      in: header
      description: This flag denotes the number of attempts that have been made for this request.
      required: false
      schema:
        type: string
        format: string
    httpAcceptEncoding:
      name: Accept-Encoding
      in: header
      required: false
      description: >
        This request HTTP header advertises which content encoding (usually a
        compression algorithm) the calling application is able to understand.
        The server selects one of the proposals, use it and informs the client
        of its choice with the Content-Encoding response header. Currently
        supported `gzip` and `deflate`, if request header not present no
        compression will be used.
      schema:
        type: string
        enum:
          - ''
          - gzip
          - deflate
          - 'gzip,deflate'
        default: ''
    eesCampaignId:
      name: campaignId
      in: path
      description: EES AIR CampaignId ID.
      required: true
      schema:
        type: string
        format: int64
    eesCampaignIdArrayParam:
      name: campaignId[]
      in: query
      description: Array of Campaign IDs, automatically generated and unique within Eagle Eye AIR.
      required: false
      schema:
        type: array
        items:
          type: string
          format: int64
    eesReferenceParam:
      name: reference
      in: query
      description: An external reference for the Campaign, unique to each client.
      required: false
      schema:
        type: string
    eesBarcodeParam:
      name: barcode
      in: query
      description: The value of a barcode.
      required: false
      schema:
        type: string
    eesCampaignTypeParam:
      name: campaignType
      in: query
      description: The type of Campaign this is. These types are configured as part of implementation with a client.
      required: false
      schema:
        type: string
    eesStatusParam:
      name: status
      in: query
      description: This is a status of the Campaign.
      required: false
      schema:
        type: string
        enum:
          - ACTIVE
          - INACTIVE
          - EXPIRED
          - PENDING
          - DRAFT
          - REJECTED
          - READY
          - STOPPED
          - DELETED
    eesAccountClientTypeParam:
      name: accountClientType
      in: query
      description: The default client type for an Account unless otherwise stated during individual Account creation.
      required: false
      schema:
        type: string
    eesEndDateParam:
      name: endDate
      in: query
      description: When the campaign ends.
      required: false
      schema:
        type: string
        format: date-time
        example: yyyy-mm-dd+hh:mm:ss
    eesStartDateParam:
      name: startDate
      in: query
      description: When the campaign starts.
      required: false
      schema:
        type: string
        format: date-time
        example: yyyy-mm-dd+hh:mm:ss
    eesTagParam:
      name: tag[]
      in: query
      description: This is a tag assigned to a Campaign.
      required: false
      allowReserved: true
      schema:
        type: array
        items:
          type: string
    eesOffsetParam:
      name: offset
      in: query
      description: Offset allows you to skip a number of campaigns before returning data.
      required: false
      schema:
        type: integer
    eesLimitParam:
      name: limit
      in: query
      description: The number of campaigns to return up to a maximum of 100.
      required: false
      schema:
        type: integer
    inventoryListId:
      name: inventoryListId
      in: path
      required: true
      description: EES AIR Inventory List ID
      schema:
        type: string
        format: string
      allowEmptyValue: false
    httpContentTypeRequest:
      name: Content-Type
      in: header
      required: false
      description: >-
        Standard HTTP header to inform EES API what type of content was passed
        in request payload
      schema:
        type: string
        format: string
        default: application/json
      allowEmptyValue: false
    httpAcceptEncodingRequest:
      name: Accept-Encoding
      in: header
      required: false
      description: >-
        This request HTTP header advertises which content encoding (usually a
        compression algorithm) the calling application is able to understand.
        The server selects one of the proposals, use it and informs the client
        of its choice with the `Content-Encoding` Response header. Currently
        supported `gzip` and `deflate`. Please note if this request header is
        not present, no compression will be used.
      schema:
        type: string
        format: string
        default: ''''''
        enum:
          - ''''''
          - '''gzip'''
          - '''deflate'''
          - '''gzip,deflate'''
          - '''deflate,gzip'''
      allowEmptyValue: true
    httpConnectionRequest:
      name: Connection
      in: header
      required: false
      description: >-
        This general HTTP header controls (or rather influences) whether the
        network connection stays open after the current request finishes. If the
        sent value is `keep-alive`, the connection should stay in a special
        state, allowing to be reused for subsequent requests to the same server.
        Please note these connections will be closed after reaching timeout
        threshold controlled by EES server (usually after 5 seconds).
      schema:
        type: string
        format: string
        enum:
          - keep-alive
          - close
        default: close
    customSubsystemId:
      name: X-CUSTOM-SUBSYSTEM-ID
      in: header
      description: >-
        Optional header provided by the calling application for EES AIR to
        identify what was the external Subsystem Id / Name. Please note this
        header is not essential for AIR to process a Request, this header and
        its value will be intercepted by AIR and will show up in Wallet Event
        Notifications, if applicable.
      required: false
      schema:
        type: string
        format: string
    customWildCard:
      name: X-CUSTOM-KEY
      in: header
      description: >
        Optional header(s) provided by the calling application to EES AIR.
        Please note a) this header name has to follow pattern X-CUSTOM-* (i.e.
        X-CUSTOM-EMAIL) b) this header is not essential for AIR to process a
        Request, this header and its value will be intercepted by AIR and will
        show up in Wallet Event Notifications, if applicable.
      required: false
      schema:
        type: string
        format: string
    groupReference:
      name: groupReference
      in: query
      required: false
      description: EES AIR Group Reference.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    incomingIdentifier:
      name: incomingIdentifier
      in: query
      required: false
      description: EES AIR Incoming Identifier.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    parentIncomingIdentifier:
      name: parentIncomingIdentifier
      in: query
      required: false
      description: EES AIR Parent Incoming Identifier.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    upc:
      name: upc
      in: query
      required: false
      description: EES AIR Product UPC.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    sku:
      name: sku
      in: query
      required: false
      description: EES AIR Product SKU.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    tag:
      name: tag
      in: query
      required: false
      description: EES AIR Product Tag.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    name:
      name: name
      in: query
      required: false
      description: EES AIR Product Name.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    supplierId:
      name: supplierId
      in: query
      required: false
      description: EES AIR Product Supplier ID.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    supplierName:
      name: supplierName
      in: query
      required: false
      description: EES AIR Product Supplier Name.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    brand:
      name: brand
      in: query
      required: false
      description: EES AIR Product Brand.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    brandType:
      name: brandType
      in: query
      required: false
      description: EES AIR Product Brand Type.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    lastSoldDate:
      name: lastSoldDate
      in: query
      required: false
      description: EES AIR Product Last Sold Date.
      schema:
        type: string
        format: ees-date-time
      allowEmptyValue: false
    matchAll:
      name: matchAll
      in: query
      required: false
      description: Flag denoting whether all flags must match the results.
      schema:
        type: boolean
        default: false
      allowEmptyValue: false
    bankId:
      name: bankId
      in: path
      required: true
      description: EES AIR Bank ID (of type Points Exchange)
      schema:
        type: string
        format: string
      allowEmptyValue: false
    rewardId:
      name: rewardId
      in: path
      required: true
      description: EES AIR Bank Reward ID (of type Points Exchange)
      schema:
        type: string
        format: string
      allowEmptyValue: false
    unitIdParam:
      name: unitId
      in: path
      required: true
      description: EES AIR Unit ID.
      schema:
        type: string
        format: Int64
      allowEmptyValue: false
    unitIdQuery:
      name: id
      in: query
      required: false
      description: EES AIR Unit ID.
      schema:
        type: string
        format: Int64
      allowEmptyValue: false
    unitStatusQuery:
      name: status
      in: query
      description: This is a status of a Unit.
      required: false
      schema:
        type: string
        enum:
          - ACTIVE
          - INACTIVE
      allowEmptyValue: false
    unitTagQuery:
      name: tag
      in: query
      required: false
      description: EES AIR Unit Tag.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    unitTypeQuery:
      name: type
      in: query
      description: This is a type of a Unit.
      required: false
      schema:
        type: string
        enum:
          - COMPANY
          - OUTLET
      allowEmptyValue: false
    parentUnitIdQuery:
      name: parentUnitId
      in: query
      description: This is a flag that filters the search to child units of the passed parent unit id.
      required: false
      schema:
        type: boolean
        default: false
      allowEmptyValue: false
    tierIdParam:
      name: id
      in: path
      required: true
      description: EES AIR Loyalty Tier ID.
      schema:
        type: string
        format: Int64
      allowEmptyValue: false
    tierIdQuery:
      name: id
      in: query
      required: false
      description: EES AIR Loyalty Tier ID.
      schema:
        type: string
        format: Int64
      allowEmptyValue: false
    tierStatusQuery:
      name: status
      in: query
      description: This is a status of a Loyalty Tier.
      required: false
      schema:
        type: string
        enum:
          - ACTIVE
      allowEmptyValue: false
    tierTypeQuery:
      name: type
      in: query
      description: This is the type of a Loyalty Tier.
      required: false
      schema:
        type: string
        enum:
          - STANDARD
      allowEmptyValue: false
    tierReferenceQuery:
      name: reference
      in: query
      description: This is the reference of a Loyalty Tier.
      required: false
      schema:
        type: string
      allowEmptyValue: false
    tierSchemeIdQuery:
      name: schemeId
      in: query
      required: false
      description: EES AIR Scheme ID.
      schema:
        type: string
        format: Int64
      allowEmptyValue: false
    tierPromotionTierIdQuery:
      name: promotionTierId
      in: query
      required: false
      description: This is the promotion Loyalty Tier ID.
      schema:
        type: string
        format: Int64
      allowEmptyValue: false
    tierDemotionTierIdQuery:
      name: demotionTierId
      in: query
      required: false
      description: This is the demotion Loyalty Tier ID.
      schema:
        type: string
        format: Int64
      allowEmptyValue: false
    tierOrderByParam:
      name: orderBy
      in: query
      required: false
      description: Requested result set sorting order.
      schema:
        type: string
        enum:
          - "id,ASC"
          - "id,DESC"
    programmeIdQuery:
      name: id
      in: query
      required: false
      description: >-
        Optional Filtering criteria based on one or more ids.
      schema:
        type: integer
      allowEmptyValue: false
    programmeStatusQuery:
      name: status
      in: query
      description: This is a status of the Programme.
      required: false
      schema:
        type: string
        enum:
          - ACTIVE
          - INACTIVE
          - EXPIRED
          - PENDING
          - DRAFT
          - REJECTED
          - READY
          - STOPPED
          - DELETED
    programmeTypeQuery:
      name: type
      in: query
      required: false
      description: >-
        Optional Filtering criteria (e.g. `type=VOUCHER`) allow the calling application to narrow down returned results by type.
      schema:
        type: string
        format: string
        enum:
          - VOUCHER
          - DEBIT
          - PLASTIC
    programmeTagQuery:
      name: tag
      in: query
      required: false
      description: EES AIR Programme Tag.
      schema:
        type: string
        format: string
      allowEmptyValue: false
    programmeStartDateQuery:
      name: startDate
      in: query
      description: When the Programme starts.
      required: false
      schema:
        type: string
        format: date-time
        example: yyyy-mm-dd+hh:mm:ss
    programmeEndDateQuery:
      name: endDate
      in: query
      description: When the Programme ends.
      required: false
      schema:
        type: string
        format: date-time
        example: yyyy-mm-dd+hh:mm:ss
    programmeDateCreatedQuery:
      name: dateCreated
      in: query
      description: The date the Programme was created.
      required: false
      schema:
        type: string
        format: date-time
        example: yyyy-mm-dd+hh:mm:ss
    programmeLastUpdatedQuery:
      name: lastUpdated
      in: query
      description: The date the Programme was last updated.
      required: false
      schema:
        type: string
        format: date-time
        example: yyyy-mm-dd+hh:mm:ss
    programmeOrderByQuery:
      name: 'orderBy[]'
      in: query
      required: false
      description: >-
        This optional request parameter allows the calling application to request a specific sorting order for a result set. Currently supported field names are&#58; `id`, `status` and `lastUpdated`
      schema:
        type: string
        format: string
        enum:
          - "id,ASC"
          - "id,DESC"
          - "status,ASC"
          - "status,DESC"
          - "lastUpdated,ASC"
          - "lastUpdated,DESC"
        default: "id,ASC"
      allowEmptyValue: false
    programmeIdParam:
      name: id
      in: path
      required: true
      description: EES AIR Programme ID.
      schema:
        type: string
        format: Int64
      allowEmptyValue: false
    eesDateTimeOverride:
      name: X-EES-DATETIME-OVERRIDE
      in: header
      required: false
      description: >-
        The purpose for this header is to override EES AIR's time when recoding an offline / delayed transaction. Please note requested transaction date-time has to be in the past and use ATOM Date-Time format `Y-m-d\TH:i:sP`, (e.g. 2017-12-31T23:59:59+09:00)
      schema:
        type: string
        format: eesDateTime
        nullable: false
        pattern: >-
          ^((((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00))\-02\-29|((19\d{2}|[2-9]\d{3})\-((0[13578]|1[02])\-31))|((19\d{2}|[2-9]\d{3})\-(0[13-9]|1[0-2])\-(29|30))|((19\d{2}|[2-9]\d{3})\-(0[1-9]|1[0-2])\-(0[1-9]|1[0-9]|2[0-8])))\T([01][0-9]\:[0-5][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9]\:[0-5][0-9]))(\+|\-)([01][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9])$
      allowEmptyValue: false
    eesSuppressRestBehaviourRequest:
      name: Suppress-Rest-Behaviour
      in: header
      required: false
      description: >-
        Optional HTTP header instructing EES AIR to suppress default RESTFul
        behaviour. If requested, EES AIR will always return a `200 OK` HTTP
        Status code, with a Response Body structured differently (see each
        endpoint details).
      schema:
        type: string
        format: string
        default: 'false'
        enum:
          - 'false'
          - 'true'
      allowEmptyValue: false
    httpMethodOverride:
      name: X-HTTP-Method-Override
      in: header
      required: false
      description: >-
        Optional HTTP header, if present, it will instruct EES AIR to override
        the real HTTP Method, used during this connection. This is due to some
        networking or software limitations on Client side, allowing the calling
        application to perform only `GET` or `POST` calls.
      schema:
        type: string
        format: string
        enum:
          - PUT
          - PATCH
          - DELETE
          - HEAD
          - OPTIONS
          - CONNECT
          - TRACE
      allowEmptyValue: false
    httpConnectionResponse:
      name: Connection
      in: header
      required: true
      description: >-
        This general HTTP header informs the calling application if the network
        connection stays open after the current request finishes. If the
        received value is `keep-alive`, the connection should stay in a special
        state, allowing to be reused for subsequent requests to the same server.
        Please note these connections will be closed after reaching timeout
        threshold controlled by EES server (usually after 5 seconds).
      schema:
        type: string
        format: string
        enum:
          - keep-alive
          - close
        default: close
    brandId:
      name: brandId
      in: path
      description: EES AIR brand ID.
      required: true
      schema:
        type: string
    tokenFormatId:
      name: id
      in: path
      description: EES AIR Token Format ID.
      required: true
      schema:
        type: integer
        format: int64
    tokenFormatIdArrayParam:
      name: id[]
      in: query
      description: EES AIR Token Format ID.
      required: false
      schema:
        type: integer
        format: int64
    tokenFormatSafeNameParam:
      name: safeName
      in: query
      description: EES AIR Token Format Safe Name.
      required: false
      schema:
        type: string
        format: int64
    tokenFormatNameParam:
      name: name
      in: query
      description: EES AIR Token Format Name.
      required: false
      schema:
        type: string
    offsetParam:
      name: offset
      in: query
      description: Offset allows you to skip a number of items before returning data.
      required: false
      schema:
        type: integer
        example: 51
    limitParam:
      name: limit
      in: query
      description: The number of items to return.
      required: false
      schema:
        type: integer
    orderByParam:
      name: orderBy
      in: query
      required: false
      schema:
        type: string
      description: Requested result set sorting order
    unitsOrderByParam:
      name: orderBy
      in: query
      required: false
      description: Requested result set sorting order
      schema:
        type: string
        enum:
          - "id,ASC"
          - "id,DESC"
          - "name,ASC"
          - "name,DESC"
          - "safeName,ASC"
          - "safeName,DESC"
    walletTypeIdParam:
      name: walletTypeId
      in: path
      required: true
      description: EES AIR Wallet Type ID.
      schema:
        type: string
        format: Int64
    identityTypeIdParam:
      name: identityTypeId
      in: path
      required: true
      description: EES AIR Identity Type ID.
      schema:
        type: string
        format: Int64
    audienceOrderByParam:
      name: orderBy
      in: query
      required: false
      description: >-
        This optional request parameter allows the calling application to request a specific sorting order for a result set.
      schema:
        type: string
        format: string
        enum:
          - "name,ASC"
          - "name,DESC"
        default: "name,ASC"
    audienceReferenceParam:
      name: reference
      in: query
      required: false
      description: >-
        This optional request parameter allows the calling application to request Audiences that have a specific reference.
      schema:
        type: string
        format: string
        example: "AudienceRef123"
    audiencesLimitParam:
      name: limit
      in: query
      description: The maximum number of Audiences to be returned in the result set.
      required: false
      schema:
        type: integer
        example: 50
    audienceIdParam:
      name: audienceId
      in: path
      description: The EES AIR Audience ID.
      required: true
      schema:
        type: string
        example: "504113"

  requestBodies:
    postRewardBankPayload:
      description: Json Payload.
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                $ref: '#/components/schemas/PointsRewardBankEntity/properties/name'
              reference:
                $ref: '#/components/schemas/PointsRewardBankEntity/properties/reference'
              mode:
                $ref: '#/components/schemas/PointsRewardBankEntity/properties/mode'
              status:
                $ref: '#/components/schemas/PointsRewardBankEntity/properties/status'
              exchangeLimit:
                $ref: '#/components/schemas/PointsRewardBankEntity/properties/exchangeLimit'
              rewards:
                type: array
                items:
                  type: object
                  properties:
                    resourceType:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/resourceType'
                    resourceId:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/resourceId'
                    threshold:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/threshold'
                    cost:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/cost'
                    status:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity/properties/status'
                    reasonCode:
                      type: string
                  required:
                    - resourceType
                    - resourceId
                    - cost
            required:
              - name
              - mode
              - status
    patchRewardBankPayload:
      description: Json Payload.
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                $ref: '#/components/schemas/PointsRewardBankEntity/properties/name'
              mode:
                $ref: '#/components/schemas/PointsRewardBankEntity/properties/mode'
              status:
                $ref: '#/components/schemas/PointsRewardBankEntity/properties/status'
              exchangeLimit:
                $ref: '#/components/schemas/PointsRewardBankEntity/properties/exchangeLimit'
    postCampaignPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              type:
                $ref: '#/components/schemas/campaignEntity/properties/type'
              class:
                $ref: '#/components/schemas/campaignEntity/properties/class'
              version:
                $ref: '#/components/schemas/campaignEntity/properties/version'
              reference:
                $ref: '#/components/schemas/campaignEntity/properties/reference'
              status:
                $ref: '#/components/schemas/campaignEntity/properties/status'
              details:
                $ref: '#/components/schemas/campaignEntity/properties/details'
              settings:
                $ref: '#/components/schemas/campaignEntity/properties/settings'
              suppliers:
                $ref: '#/components/schemas/campaignEntity/properties/suppliers'
              rules:
                $ref: '#/components/schemas/campaignEntity/properties/rules'
              partners:
                $ref: '#/components/schemas/campaignEntity/properties/partners'
              distributionChannels:
                $ref: '#/components/schemas/campaignEntity/properties/distributionChannels'
              windows:
                $ref: '#/components/schemas/campaignEntity/properties/windows'
              dates:
                $ref: '#/components/schemas/campaignEntity/properties/dates'
              relationships:
                $ref: '#/components/schemas/campaignRelationshipsEntity'
              compatibility:
                $ref: '#/components/schemas/campaignEntity/properties/compatibility'
              incompatibility:
                $ref: '#/components/schemas/campaignEntity/properties/incompatibility'
              offer:
                $ref: '#/components/schemas/campaignEntity/properties/offer'
              barcode:
                $ref: '#/components/schemas/campaignEntity/properties/barcode'
              custom:
                $ref: '#/components/schemas/campaignEntity/properties/custom'
    campaignPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              type:
                $ref: '#/components/schemas/campaignEntity/properties/type'
              class:
                $ref: '#/components/schemas/campaignEntity/properties/class'
              version:
                $ref: '#/components/schemas/campaignEntity/properties/version'
              status:
                $ref: '#/components/schemas/campaignEntity/properties/status'
              details:
                $ref: '#/components/schemas/campaignEntity/properties/details'
              settings:
                $ref: '#/components/schemas/campaignEntity/properties/settings'
              suppliers:
                $ref: '#/components/schemas/campaignEntity/properties/suppliers'
              rules:
                $ref: '#/components/schemas/campaignEntity/properties/rules'
              partners:
                $ref: '#/components/schemas/campaignEntity/properties/partners'
              distributionChannels:
                $ref: '#/components/schemas/campaignEntity/properties/distributionChannels'
              windows:
                $ref: '#/components/schemas/campaignEntity/properties/windows'
              dates:
                $ref: '#/components/schemas/campaignEntity/properties/dates'
              relationships:
                $ref: '#/components/schemas/campaignRelationshipsEntity'
              compatibility:
                $ref: '#/components/schemas/campaignEntity/properties/compatibility'
              incompatibility:
                $ref: '#/components/schemas/campaignEntity/properties/incompatibility'
              offer:
                $ref: '#/components/schemas/campaignEntity/properties/offer'
              barcode:
                $ref: '#/components/schemas/campaignEntity/properties/barcode'
              custom:
                $ref: '#/components/schemas/campaignEntity/properties/custom'
    putSchemePayload:
      description: OK.
      content:
        application/json:
          schema:
            type: object
            properties:
              type:
                $ref: '#/components/schemas/SchemeEntity/properties/type'
              class:
                $ref: '#/components/schemas/SchemeEntity/properties/class'
              version:
                $ref: '#/components/schemas/SchemeEntity/properties/version'
              status:
                $ref: '#/components/schemas/SchemeEntity/properties/status'
              details:
                $ref: '#/components/schemas/SchemeEntity/properties/details'
              rules:
                $ref: '#/components/schemas/SchemeEntity/properties/rules'
              relationships:
                $ref: '#/components/schemas/SchemeEntity/properties/relationships'
              services:
                $ref: '#/components/schemas/SchemeEntity/properties/services'
              rates:
                $ref: '#/components/schemas/SchemeEntity/properties/rates'
              accountClientType:
                $ref: '#/components/schemas/SchemeEntity/properties/accountClientType'
              autoReduce:
                $ref: '#/components/schemas/SchemeEntity/properties/autoReduce'
              pointsLimitPerPeriod:
                $ref: '#/components/schemas/SchemeEntity/properties/pointsLimitPerPeriod'
              negativeBalance:
                $ref: '#/components/schemas/SchemeEntity/properties/negativeBalance'
              custom:
                $ref: '#/components/schemas/SchemeEntity/properties/custom'
              timeoutOverride:
                $ref: '#/components/schemas/SchemeEntity/properties/timeoutOverride'
              pendingPoints:
                $ref: '#/components/schemas/SchemeEntity/properties/pendingPoints'
              tiers:
                $ref: '#/components/schemas/SchemeEntity/properties/tiers'
              earnTransactionLimit:
                $ref: '#/components/schemas/SchemeEntity/properties/earnTransactionLimit'
    postSchemePayload:
      description: OK.
      content:
        application/json:
          schema:
            type: object
            properties:
              type:
                $ref: '#/components/schemas/SchemeEntity/properties/type'
              class:
                $ref: '#/components/schemas/SchemeEntity/properties/class'
              version:
                $ref: '#/components/schemas/SchemeEntity/properties/version'
              reference:
                $ref: '#/components/schemas/SchemeEntity/properties/reference'
              status:
                $ref: '#/components/schemas/SchemeEntity/properties/status'
              details:
                $ref: '#/components/schemas/SchemeEntity/properties/details'
              rules:
                $ref: '#/components/schemas/SchemeEntity/properties/rules'
              relationships:
                $ref: '#/components/schemas/SchemeEntity/properties/relationships'
              services:
                $ref: '#/components/schemas/SchemeEntity/properties/services'
              rates:
                $ref: '#/components/schemas/SchemeEntity/properties/rates'
              accountClientType:
                $ref: '#/components/schemas/SchemeEntity/properties/accountClientType'
              autoReduce:
                $ref: '#/components/schemas/SchemeEntity/properties/autoReduce'
              pointsLimitPerPeriod:
                $ref: '#/components/schemas/SchemeEntity/properties/pointsLimitPerPeriod'
              negativeBalance:
                $ref: '#/components/schemas/SchemeEntity/properties/negativeBalance'
              custom:
                $ref: '#/components/schemas/SchemeEntity/properties/custom'
              timeoutOverride:
                $ref: '#/components/schemas/SchemeEntity/properties/timeoutOverride'
              pendingPoints:
                $ref: '#/components/schemas/SchemeEntity/properties/pendingPoints'
              tiers:
                $ref: '#/components/schemas/SchemeEntity/properties/tiers'
              earnTransactionLimit:
                $ref: '#/components/schemas/SchemeEntity/properties/earnTransactionLimit'
    amendRewardPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                format: string
                nullable: false
                description: Bank Reward Status
                enum:
                  - ACTIVE
                  - INACTIVE
                  - SUSPENDED
              cost:
                type: integer
                format: int32
                description: Reward Cost
                nullable: false
              threshold:
                type: integer
                format: int32
                description: Reward Threshold
                nullable: false
          example:
            cost: 120
            threshold: 150
    createPointsRewardBankRewardPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - status
              - resourceType
              - resourceId
              - threshold
            properties:
              status:
                type: string
                format: string
                nullable: false
                description: Bank Reward Status
                enum:
                  - ACTIVE
                  - INACTIVE
                  - SUSPENDED
              resourceType:
                type: string
                format: string
                nullable: false
                enum:
                  - CAMPAIGN
                  - PROGRAMME
                  - SCHEME
                  - PLAN
                description: >-
                  EES Resource Type for the reward (please note currently supported is `CAMPAIGN`)
              resourceId:
                type: string
                format: string
                nullable: false
                description: EES AIR Resource ID
              cost:
                type: integer
                format: int32
                description: Reward Cost
                nullable: false
              threshold:
                type: integer
                format: int32
                description: Reward Threshold
                nullable: false
          example:
            status: ACTIVE
            resourceId: "1749"
            resourceType: CAMPAIGN
            cost: 100
            threshold: 100
    postTokenFormatPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                $ref: '#/components/schemas/tokenFormatEntity/properties/name'
              details:
                $ref: '#/components/schemas/tokenFormatEntity/properties/details'
    postUnitsPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/unitPostRequestEntity'
    patchUnitsPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/unitPatchRequestEntity'
    postUnitFileTransferConfigPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/unitFileTransferConfigPostRequestEntity'
    patchUnitFileTransferConfigPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/unitFileTransferConfigPostRequestEntity'
    postServicesUnitsPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/servicesUnitPostRequestEntity'
    postProgrammesPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/programmePostPutRequestEntity'
    putProgrammesPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/programmePostPutRequestEntity'
    postTierPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/tierPostRequestEntity'
    putTierPayload:
      description: JSON Payload.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/tierPutRequestEntity'
    postInventoryListPayload:
      description: EES AIR has successfully processed a Request.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/InventoryListEntity'
              - type: object
              - required:
                - productsLocationIdentifier
                - status
                - type
                - name
                - dateCreated
                - lastUpdated
                - collections
                - prerequisites
          example:
            status: ACTIVE
            type: EXCLUDE
            name: My Inventory List
            description: A description of My Inventory List
            collections:
              -
                locations:
                  excluded:
                    locationIdentifiers:
                      - 'store1'
                      - 'store2'
                    locationTags:
                      - 'locationTag01'
                products:
                  excluded:
                    groups:
                      TYPE1:
                        - 'G100000001'
                        - 'G100000002'
                    skus:
                      - 'P200000010'
                      - 'P200000012'
                    tags:
                      - 'TAG16'
                      - 'TAG20'
            prerequisites:
              campaigns:
                campaignTypes:
                  - 'STANDARD_NATIONAL'
    walletTypesPayload:
      description: JSON payload.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/walletTypesEntity'
              - type: object
              - required:
                  - name
                  - configuration
    identityTypesPayload:
      description: JSON payload.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/identityTypesEntity'
              - type: object
              - required:
                  - name
                  - configuration
    postAudiencesPayload:
      description: JSON payload.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/audiencesEntity'
              - type: object
              - required:
                  - name
                  - reference

  schemas:
    SchemeEntity:
      type: object
      properties:
        id:
          type: string
          description: The Id of a Scheme automatically generated and unique within Eagle Eye AIR.
        type:
          type: string
          description: The type of Scheme this is. These types are configured as part of implementation with a client.
          enum:
            - LOYALTY
        accountClientType:
          type: string
          nullable: true
          description: The default client type for an Account unless otherwise stated during individual Account creation. The list of available options for this field are defined during client onboarding. (Not implemented for Schemes)
        status:
          type: string
          description: The status of the Scheme.
          enum:
            - ACTIVE
            - INACTIVE
            - EXPIRED
            - DELETED
            - PENDING
            - DRAFT
            - REJECTED
            - READY
            - STOPPED
            - SUSPENDED
        class:
          type: string
          description: The class of this Scheme.
          enum:
            - POINTS
            - STAMP
        reference:
          type: string
          nullable: true
          description: An external reference for this Scheme, unique to each client.
        details:
          type: object
          description: The details of the Scheme.
          properties:
            name:
              type: string
              description: The name of the Scheme.
            alternativeName:
              type: string
              nullable: true
              description: The alternative name of the Scheme.
            description:
              type: string
              nullable: true
              description: The description of the Scheme.
            alternativeDescription:
              type: string
              nullable: true
              description: The alternative description of the Scheme.
            printerMessage:
              type: string
              nullable: true
              description: The message to display on the receipt.
            screenMessage:
              type: string
              nullable: true
              description: The message to display on the screen.
            tags:
              type: array
              nullable: true
              description: The tags to assign to a Scheme.
              items:
                type: string
            startDate:
              type: string
              format: date-time
              description: The timestamp that the Scheme should start.
            endDate:
              type: string
              format: date-time
              description: The timestamp that the Scheme should end.
            mode:
              type: string
              description: >
                The mode that the Scheme is operating in:
                  * OPEN - this is a scheme available to any consumers that qualify for it.
                  * RESTRICTED - this is a scheme that has been specifically targeted at a group of consumers.
              enum:
                - OPEN
                - RESTRICTED
        relationships:
          type: object
          nullable: true
          description: Specify if this Scheme has any other related Schemes. The key of the object is relationship type of either AGGREGATE_CHILD, AGGREGATE_CHILD_OF.
          properties:
            AGGREGATE_CHILD:
              type: object
              properties:
                SCHEME:
                  type: array
                  description: Details of any related Scheme.
                  items:
                    type: object
                    properties:
                      campaignId:
                        type: integer
                        description: It contains the Id of the related Scheme.
                      dateCreated:
                        type: string
                        format: date-time
                        description: This timestamp shows the date-time in UTC when the Scheme was created. It is dynamically populated and cannot be edited.
        services:
          type: object
          nullable: true
          description: How fund balances are effected when each transaction type occurs.
          properties:
            autoTopup:
              type: object
              nullable: true
              description: How a AutoTopUp transaction is funded.
              properties:
                enabled:
                  type: boolean
                  description: A flag denoting if the rule is active or not.
                defaultFunding:
                  type: object
                  nullable: true
                  description: The default fund/s that should be used for these transaction types.
                  properties:
                    enabled:
                      type: boolean
                      description: A flag denoting if the rule is active or not.
                    funds:
                      type: array
                      description: The fund/s the points are added from.
                      items:
                        $ref: '#/components/schemas/schemesFundingAccountEntity'
                reasons:
                  type: object
                  nullable: true
                  description: Configure the reason codes that defines which fund to use for this transaction instead of the default.
                  additionalProperties:
                    $ref: '#/components/schemas/schemesFundingAccountEntity'
            credit:
              type: object
              nullable: true
              description: How a Credit transaction is funded.
              properties:
                enabled:
                  type: boolean
                  description: A flag denoting if the rule is active or not.
                defaultFunding:
                  type: object
                  nullable: true
                  description: The default fund/s that should be used for these transaction types.
                  properties:
                    enabled:
                      type: boolean
                      description: A flag denoting if the rule is active or not.
                    funds:
                      type: array
                      description: The fund/s the points are added from.
                      items:
                        $ref: '#/components/schemas/schemesFundingAccountEntity'
                reasons:
                  type: object
                  nullable: true
                  description: Configure the reason codes that defines which fund to use for this transaction instead of the default.
                  additionalProperties:
                    $ref: '#/components/schemas/schemesFundingAccountEntity'
            debit:
              type: object
              nullable: true
              description: How a Debit transaction is funded.
              properties:
                enabled:
                  type: boolean
                  description: A flag denoting if the rule is active or not.
                defaultFunding:
                  type: object
                  nullable: true
                  description: The default fund/s that should be used for these transaction types.
                  properties:
                    enabled:
                      type: boolean
                      description: A flag denoting if the rule is active or not.
                    funds:
                      type: array
                      description: The fund/s the points are added from.
                      items:
                        $ref: '#/components/schemas/schemesFundingAccountEntity'
                reasons:
                  type: object
                  nullable: true
                  description: Configure the reason codes that defines which fund to use for this transaction instead of the default.
                  additionalProperties:
                    $ref: '#/components/schemas/schemesFundingAccountEntity'
            goodwill:
              type: object
              nullable: true
              description: How a Goodwill transaction is funded.
              properties:
                enabled:
                  type: boolean
                  description: A flag denoting if the rule is active or not.
                defaultFunding:
                  type: object
                  nullable: true
                  description: The default fund/s that should be used for these transaction types.
                  properties:
                    enabled:
                      type: boolean
                      description: A flag denoting if the rule is active or not.
                    funds:
                      type: array
                      description: The fund/s the points are added from.
                      items:
                        $ref: '#/components/schemas/schemesFundingAccountEntity'
                reasons:
                  type: object
                  nullable: true
                  description: Configure the reason codes that defines which fund to use for this transaction instead of the default.
                  additionalProperties:
                    $ref: '#/components/schemas/schemesFundingAccountEntity'
                restrictions:
                  type: array
                  nullable: true
                  description: The restrictions that apply to Goodwill transactions.
                  items:
                    type: object
                    properties:
                      period:
                        type: integer
                        description: Period of time used in the rolling period rules.
                      metric:
                        type: string
                        description: Type of time period used in the rules.
                        enum:
                          - DAYS
                      transactions:
                        type: integer
                        description: Number of times that points can be issued in Goodwill during the period defined in 'Rolling Period'.
                      value:
                        type: integer
                        description: Number of points that can be issued in Goodwill during the period defined in 'Rolling Period'
                      singleValue:
                        type: integer
                        description: Number of points that can be issued in Goodwill per transaction.
            spend:
              type: object
              nullable: true
              description: How a Spend transaction is funded.
              properties:
                enabled:
                  type: boolean
                  description: A flag denoting if the rule is active or not.
                defaultFunding:
                  type: object
                  nullable: true
                  description: The default fund/s that should be used for these transaction types.
                  properties:
                    enabled:
                      type: boolean
                      description: A flag denoting if the rule is active or not.
                    funds:
                      type: array
                      description: The fund/s the points are added from.
                      items:
                        $ref: '#/components/schemas/schemesFundingAccountEntity'
                reasons:
                  type: object
                  nullable: true
                  description: Configure the reason codes that defines which fund to use for this transaction instead of the default.
                  additionalProperties:
                    $ref: '#/components/schemas/schemesFundingAccountEntity'
            exchange:
              type: object
              nullable: true
              description: How an Exchange transaction is funded.
              properties:
                enabled:
                  type: boolean
                  description: A flag denoting if the rule is active or not.
                defaultFunding:
                  type: object
                  nullable: true
                  description: The default fund/s that should be used for these transaction types.
                  properties:
                    enabled:
                      type: boolean
                      description: A flag denoting if the rule is active or not.
                    funds:
                      type: array
                      description: The fund/s the points are added from.
                      items:
                        $ref: '#/components/schemas/schemesFundingAccountEntity'
                reasons:
                  type: object
                  nullable: true
                  description: Configure the reason codes that defines which fund to use for this transaction instead of the default.
                  additionalProperties:
                    $ref: '#/components/schemas/schemesFundingAccountEntity'
            earn:
              type: object
              nullable: true
              description: How a Earn transaction is funded.
              properties:
                enabled:
                  type: boolean
                  description: A flag denoting if the rule is active or not.
                defaultFunding:
                  type: object
                  nullable: true
                  description: The default fund/s that should be used for these transaction types.
                  properties:
                    enabled:
                      type: boolean
                      description: A flag denoting if the rule is active or not.
                    funds:
                      type: array
                      description: The fund/s the points are added from.
                      items:
                        $ref: '#/components/schemas/schemesFundingAccountEntity'
                reasons:
                  type: object
                  nullable: true
                  description: Configure the reason codes that defines which fund to use for this transaction instead of the default.
                  additionalProperties:
                    $ref: '#/components/schemas/schemesFundingAccountEntity'
            gift:
              type: object
              nullable: true
              description: It contains the gift of scheme.
              properties:
                outgoingGiftLimit:
                  type: object
                  nullable: true
                  required:
                    - enabled
                    - rule
                  description: It contains an object of outgoingGiftLimit.
                  properties:
                    enabled:
                      type: boolean
                      description: This contains a boolean flag to enable/disable the outgoingGiftLimit rules.
                    rule:
                      type: object
                      required:
                        - periodCount
                        - periodType
                        - rounding
                        - points
                      description: It contains an object of rules for outgoingGiftLimit.
                      properties:
                        periodCount:
                          type: integer
                          minimum: 1
                          description: It contains integer value.
                        periodType:
                          type: string
                          description: It contains string value.
                          enum:
                            - DAY
                        points:
                          type: integer
                          minimum: 1
                          description: It contains integer value.
                        rounding:
                          type: string
                          description: It contains string value.
                          enum:
                            - ABSOLUTE
                incomingGiftLimit:
                  type: object
                  nullable: true
                  required:
                    - enabled
                    - rule
                  description: It contains an object of incomingGiftLimit.
                  properties:
                    enabled:
                      type: boolean
                      description: This contains a boolean flag to enable/disable the incomingGiftLimit rules.
                    rule:
                      type: object
                      nullable: true
                      required:
                        - periodCount
                        - periodType
                        - rounding
                        - points
                        - graceTransaction
                      description: It contains an object of rules for incomingGiftLimit.
                      properties:
                        graceTransaction:
                          type: boolean
                          description: This contains a boolean flag to enable/disable the grace transaction for Scheme.
                        periodCount:
                          type: integer
                          minimum: 1
                          description: It contains integer value.
                        periodType:
                          type: string
                          description: It contains string value.
                          enum:
                            - DAY
                        points:
                          type: integer
                          minimum: 1
                          description: It contains integer value.
                        rounding:
                          type: string
                          description: It contains string value.
                          enum:
                            - ABSOLUTE
            expiryPoints:
              $ref: '#/components/schemas/expiryPoints'
        rates:
          type: object
          required:
            - earn
          description: Redemption & earn rates for the Scheme.
          properties:
            burn:
              type: object
              nullable: true
              description: >-
                Points spend rates and product spend restrictions for the Scheme. The property keys of this object 
                are the unit safe name for the default/parent unit and the incoming identifiers for any child units.
              additionalProperties:
                type: object
                nullable: true
                pattern: '^[\\S]+$'
                additionalProperties:
                  type: object
                  pattern: '^[\\S]+$'
                  properties:
                    product:
                      $ref: '#/components/schemas/burnRateProductEntity'
                    rates:
                      type: array
                      nullable: true
                      description: Points spend rates for the Scheme.
                      items:
                        $ref: '#/components/schemas/burnRatesEntity'
            redemption:
              type: object
              nullable: true
              deprecated: true
              description: >-
                Points spend rates for the Scheme. The property keys of this object are the unit safe name for the 
                default/parent unit and the incoming identifiers for any child units. This key is deprecated as both
                points spend rules and product restrictions are now in the `burn` key.
              additionalProperties:
                type: array
                pattern: '^[\\S]+$'
                items:
                  $ref: '#/components/schemas/burnRatesEntity'
            earn:
              type: object
              nullable: true
              description: >- 
                The base earn rates for the Scheme. The property keys of this object are the unit safe name for the
                default/parent unit and the incoming identifiers for any child units.
              additionalProperties:
                type: object
                nullable: true
                pattern: '^[\\S]+$'
                additionalProperties:
                  type: object
                  pattern: '^[\\S]+$'
                  nullable: true
                  properties:
                    name:
                      type: string
                      nullable: true
                      description: The name of the base earn rate.
                    reference:
                      type: string
                      nullable: true
                      description: The reference of the base earn rate.
                    maximumQuantityPerProduct:
                      type: integer
                      nullable: true
                      description: Sets a limit on how many times an individual product SKU or UPC is allowed Base Earn at a redemption partner level.
                    type:
                      type: string
                      nullable: true
                      description: >
                        The type of base earn rate. Only 1 can be configured per Scheme from the following:
                          * STANDARD: 
                          One earn rate rule which applies to the entire transaction. Grace amount and override rules can be configured for this type.
                          e.g For every £1 spend, receive 2 points.
                          * FIXED:
                          Tiers can be configured and the transaction value will determine which tier should apply. 
                          The number of points issued is fixed, so whether the transaction value falls in the lower or higher end of the tier, the points issued will be the same.
                          e.g Tier 1: Transaction value is between £1-£10 = 1 point
                              Tier 2: Transaction value is between £11-£20 = 2 points
                          * VARIABLE:
                          Tiers can be configured and the transaction value will determine which tier should apply. 
                          The number of points issued is variable, so the higher in the tier the transaction value falls the more points will be issued.
                          e.g Tier 1: Transaction value is between £1-£10 = 1 point per £1
                              Tier 2: Transaction value is between £11-£20 = 2 points per £1
                      enum:
                        - STANDARD
                        - FIXED
                        - VARIABLE
                    description:
                      type: string
                      nullable: true
                      description: The description of the base earn rate.
                    decider:
                      type: string
                      description: >
                        The method that will be used to specify how the earn is calculated:
                          * SPEND - Will use the value of the products included in this object.
                          * UNITS - Will use the number of product units purchased calculate the earn.
                        Currently this is only present when UNITS are specified and omitted when SPEND is used.
                      enum:
                        - SPEND
                        - UNITS
                    complementaryRates:
                      type: array
                      description: >
                        Earn rate keys that are to be used as complements to the default rate.
                        SPEND is used for default rate and complement rates are used to earn points for product units while also SPEND on all other product items.
                        Will only appear on the default rate.
                      items:
                        type: string
                    product:
                      $ref: '#/components/schemas/productEntity'
                    rates:
                      type: array
                      description: Base earn rate details for the Scheme.
                      items:
                        type: object
                        pattern: '^[\\S]+$'
                        properties:
                          bonus:
                            type: integer
                            nullable: true
                            description: The bonus amount to add to the exchange value at this point. This is used if you want non-linear tiers and it determines how much you want those additional points to be worth.
                          ceiling:
                            type: integer
                            nullable: true
                            description: The upper bound for which this earn tier applies.
                          floor:
                            type: integer
                            nullable: true
                            description: The lower bound for which this earn tier applies.
                          amount:
                            type: integer
                            nullable: true
                            description: The number of points that should be issued when the spend is within this tier and the qualifying amount is met.
                          step:
                            type: integer
                            nullable: true
                            description: The increments that should cause the earn points to be issued each time it is met. e.g. if points can be earnt at 5,000, 10,000, 15,000 then the step would be 5,000.
                          offset:
                            type: integer
                            nullable: true
                            description: The amount that should be added to the transaction value when calculating the points. This could be used to give a customer more points when they are close to a threshold.
                    roundPoints:
                      type: object
                      description: The rounding rules for the base earn rate.
                      properties:
                        active:
                          type: boolean
                          description: A flag denoting if the rule is active or not.
                        toMultipleOf:
                          type: integer
                          description: The multiple that points should be rounded up to. e.g A total base earn of 197 points with a toMultipleOf would round the final base earn to 198.
        rules:
          type: object
          description: Scheme Rules. (Not implemented for Schemes)
          properties:
            creation:
              type: object
              description: Rules for Account creation. (Not implemented for Schemes)
              properties:
                schemeLimit:
                  type: integer
                  nullable: true
                  description: The maximum number of Accounts that can be created on this Scheme. Null or empty denotes unlimited. (Not implemented for Schemes)
                consumerLimit:
                  type: integer
                  nullable: true
                  description: The maximum number of Accounts an individual consumer can have in their Wallet for this Campaign. Null or empty denotes unlimited. (Not implemented for Schemes)
        timeoutOverride:
          type: integer
          nullable: true
          description: Override value the length of time that points will be locked for before automatically being released.
        custom:
          type: object
          nullable: true
          description: It contains objects of custom form json values.
          additionalProperties:
            type: object
            description: Objects of custom form json values.
        negativeBalance:
          type: object
          description: Enable if accounts related to this scheme can go into a negative balance.
          properties:
            enabled:
              type: boolean
              description: A flag denoting if the rule is active or not.
            autoTopUpFunds:
              nullable: true
              type: array
              description: Select which transaction types that the account can automatically top up to 0 after originally resulting in a negative balance.
              items:
                type: string
                enum:
                  - DEBIT
                  - EXCHANGE
                  - SPEND
                  - REFUND_DEBIT
        autoReduce:
          type: object
          properties:
            exceed:
              type: boolean
              description: A flag denoting if the points limit rule is active or not.
            limit:
              type: integer
              nullable: true
              description: The maximum number of points a consumer can accrue into their points account.
            autoReduceFunds:
              type: string
              description: It contains auto reduce for selected transaction types.
              enum:
                - CREDIT
                - EARN
                - GOODWILL
                - VOID
                - GIFT
                - DONATE
        householdSharing:
          type: object
          description: Enable Household Sharing on the Scheme.
          properties:
            enabled:
              type: boolean
              description: A flag denoting if the rule is active or not.
        pointsLimitPerPeriod:
          type: array
          nullable: true
          description: Rules for limiting points rewarded against a points account per defined period.
          items:
            type: object
            properties:
              active:
                type: boolean
                description: Indicates whether the rule is active.
              value:
                type: integer
                description: The maximum number of points that can be rewarded within the defined period.
              period:
                type: string
                description: Specifies the time period for the points limit.
                enum:
                  - ACCOUNT_POINTS_LIMIT_DAY    # Daily limit
                  - ACCOUNT_POINTS_LIMIT_WEEK   # Weekly limit
                  - ACCOUNT_POINTS_LIMIT_MONTH  # Monthly limit
        tiers:
          nullable: true
          type: object
          properties:
            enabled:
              description: Indicates whether the rule is active.
              type: boolean
            contributionRules:
              type: object
              nullable: true
              description: Defines the contribution rules for tiers balances.
              properties:
                spend:
                  type: object
                  nullable: true
                  description: Defines the rules for how spend balances are calculated towards tier progression.
                  required:
                    - enabled
                  properties:
                    enabled:
                      type: boolean
                      nullable: false
                      description: A flag to indicate if spend balance contribution is enabled at scheme level.
                    product:
                      additionalProperties:
                        type: object
                        nullable: false
                        required:
                            - enabled
                        description: Objects with redemption partner safe names, specifying which banners are enabled 
                          for spend balance contribution and any product-specific restrictions.
                        pattern: '^[a-zA-Z0-9-]+$'
                        properties:
                          enabled:
                            type: boolean
                            nullable: false
                            description: A flag to indicate if spend balance contribution is enabled for this redemption partner.
                          collections:
                            type: array
                            nullable: true
                            description: Collections of product restrictions for spend balance contribution.
                            items:
                              type: object
                              required:
                                - products
                              properties:
                                products:
                                  type: object
                                  anyOf:
                                    - required: [included]
                                    - required: [excluded]
                                  properties:
                                    included:
                                      $ref: '#/components/schemas/productEntity/properties/collections/items/properties/products/properties/included'
                                    excluded:
                                      $ref: '#/components/schemas/productEntity/properties/collections/items/properties/products/properties/excluded'

        earnTransactionLimit:
          type: object
          nullable: true
          description: Rules for Earn Transaction Limit.
          properties:
            active:
              type: boolean
              description: A flag denoting if the rule is active or not.
            amount:
              type: integer
              description: The amount of transactions allowed.
            periodType:
              type: string
              description: Specifies the time period for the transaction limit.
              enum:
                - DAY
        pendingPoints:
          type: object
          nullable: true
          description: Rules for Pending Points.
          properties:
            enabled:
              type: boolean
              description: A flag denoting if the rule is active or not.
            value:
              type: string
              description: Pending Points value.
            criteria:
              type: array
              nullable: false
              description: Criteria for Pending Points.
              items:
                type: object
                properties:
                  type:
                    type: string
                    description: The type of criteria that the value applies to.
                    enum:
                      - monetary
                      - points
                  value:
                    type: integer
                    description: The value for the criteria specified.
            reasonCodes:
              type: object
              nullable: false
              description: Reason Code details.
              properties:
                release:
                  type: array
                  nullable: false
                  items:
                    type: string
                reject:
                  type: array
                  nullable: false
                  items:
                    type: string
        dateCreated:
          type: string
          format: date-time
          description: The timestamp that the Scheme was created.
        lastUpdated:
          type: string
          format: date-time
          description: The timestamp that the Scheme was last updated.
        version:
          type: integer
          description: The version number of this Scheme that is automatically generated.
    SchemesEntity:
      type: object
      properties:
        limit:
          type: integer
          description: Results per page.
        total:
          type: integer
          description: Total Results.
        offset:
          type: integer
          description: Offset.
        orderBy:
          type: array
          description: Order by criteria.
          items:
            type: object
            properties:
              name:
                type: string
                description: The sorting key.
              order:
                type: string
                description: The sorting direction.
        results:
          type: array
          items:
            $ref: '#/components/schemas/SchemeEntity'
    schemesFundingAccountEntity:
      type: object
      description: Enable if accounts related to this scheme can go into a negative balance.
      properties:
        fundingAccountId:
          type: string
          pattern: '^[0-9]*$'
          description: The funding Account Id that the funds should be debited from.
        fundingPercentage:
          type: integer
          default: 100
          description: The percentage of the reward that should be funded by this supplier. This value should be 100 where there is only 1 supplier.
    campaignEntity:
      type: object
      properties:
        id:
          type: string
          description: The Id of a Campaign automatically generated and unique within Eagle Eye AIR.
        reference:
          type: string
          nullable: true
          description: An external reference for this Campaign, unique to each client.
        class:
          type: string
          description: The class of this Campaign.
          enum:
            - COUPON
            - CONTINUITY
            - STAMP_CARD
        type:
          type: string
          description: The type of Campaign this is. These types are configured as part of implementation with a client.
        version:
          type: integer
          description: The version number of this Campaign that is automatically generated.
        status:
          type: string
          description: The status of the Campaign.
          enum:
            - ACTIVE
            - INACTIVE
            - EXPIRED
            - DELETED
            - PENDING
            - DRAFT
            - REJECTED
            - READY
            - STOPPED
            - SUSPENDED
        dateCreated:
          type: string
          format: date-time
          description: This timestamp shows the date-time in UTC when the Campaign was created. This cannot be edited.
        lastUpdated:
          type: string
          format: date-time
          description: The timestamp shows the date-time in UTC that the Campaign was last updated. This cannot be edited.
        details:
          type: object
          properties:
            name:
              type: string
              description: The name of the Campaign.
            alternativeName:
              type: string
              nullable: true
              description: An alternative name of the Campaign.
            description:
              type: string
              nullable: true
              description: The description of the Campaign.
            alternativeDescription:
              type: string
              nullable: true
              description: An alternative description of the Campaign.
            printerMessage:
              type: string
              nullable: true
              description: The message to print on the receipt.
            screenMessage:
              type: string
              nullable: true
              description: The message to display on the screen.
            tags:
              type: array
              nullable: true
              description: The tags to assign to a Campaign.
              items:
                type: string
            startDate:
              type: string
              format: date-time
              description: When the campaign starts.
            endDate:
              type: string
              format: date-time
              description: When the campaign ends.
            mode:
              type: string
              description: >
                The mode that the Campaign is operating in:
                  * OPEN - this is a Campaign available to any consumers that qualify for it.
                  * TARGETED - this is a Campaign that has been specifically targeted at a group of consumers.
              enum:
                - OPEN
                - TARGETED
        settings:
          type: object
          properties:
            tokenProvider:
              type: string
              nullable: true
              description: The name of the token provider that is to be used when generating Account tokens if one is required.
            tokenFormat:
              type: string
              nullable: true
              description: The pre-defined token format to use when generating Account tokens if one is required.
            walletEnabled:
              type: boolean
              description: A flag to determine if a token should be generated for the Account. If true then no token will be generated and the 'tokenProvider' and 'tokenFormat' fields can be left empty or set to null.
            issuanceMethod:
              type: string
              nullable: true
              description: The type of issuance method for this Campaign.
              enum:
                - UNIQUE
                - MULTIPLE
                - null
            accountClientType:
              type: string
              description: The default client type for an Account unless otherwise stated during individual Account creation. The list of available options for this field are defined during client onboarding.
            defaultAccountClientState:
              type: string
              description: The default client state for an Account unless otherwise stated during individual Account creation.
        suppliers:
          type: array
          uniqueItems: true
          minItems: 1
          description: An array of objects containing supplier funding information.
          items:
            title: Supplier
            type: object
            properties:
              supplierUnitId:
                nullable: true
                type: string
                description: The unit identifier of the supplier that is involved with the Campaign.
              supplierCampaignReference:
                nullable: true
                type: string
                description: The suppliers reference to this Campaign.
              fundingAccountId:
                type: string
                pattern: '^[0-9]*$'
                description: The funding Account Id that the funds should be debited from.
              fundingPercentage:
                type: integer
                default: 100
                description: The percentage of the reward that should be funded by this supplier. This value should be 100 where there is only 1 supplier.
        rules:
          type: object
          properties:
            creation:
              type: object
              description: Rules for Account creation.
              properties:
                campaignLimit:
                  type: integer
                  nullable: true
                  description: The maximum number of Accounts that can be created on this Campaign. Null or empty denotes unlimited.
                consumerLimit:
                  type: integer
                  nullable: true
                  description: The maximum number of Accounts an individual consumer can have in their Wallet for this Campaign. Null or empty denotes unlimited.
                consumerLimitActive:
                  type: integer
                  nullable: true
                  description: The maximum number of Accounts in status active an individual consumer can have in their Wallet for this Campaign. Null or empty denotes unlimited.
                windows:
                  type: object
                  properties:
                    active:
                      type: boolean
                      description: A boolean flag to enable/disable the issuance windows mechanism for that Campaign.
            verification:
              type: object
              properties:
                lock:
                  type: boolean
                  description: Should Accounts of this Campaign be locked on verification.
                lockOnVerify:
                  type: boolean
                  description: This allows users to override the POS restriction which locks a Token when you send a verify request.
            graceAmount:
              type: object
              nullable: true
              description: Specify a grace amount value that allows a customer to still qualify for an offer if they only miss out by a few pence/cents. The key of the object is the unit safe name.
              additionalProperties:
                type: object
                pattern: '^[\\S]+$'
                properties:
                  active:
                    type: boolean
                    description: This contains a boolean flag to enable/disable the grace amount for that Campaign.
                  value:
                    type: integer
                    description: It contains total value of grace amount.
            redemption:
              type: object
              properties:
                maxRedemptionsPerPeriod:
                  type: object
                  nullable: true
                  description: The maximum number of times this Account can be redeemed within a period.
                  properties:
                    active:
                      type: boolean
                      description: A flag denoting if the rule is active or not.
                    period:
                      type: string
                      description: What the period is.
                      enum:
                        - ACCOUNT_REDEMPTION_LIFETIME
                        - ACCOUNT_REDEMPTION_CALENDAR_DAY
                        - ACCOUNT_REDEMPTION_CALENDAR_WEEK
                        - ACCOUNT_REDEMPTION_CALENDAR_MONTH
                        - ACCOUNT_REDEMPTION_CALENDAR_YEAR
                        - ACCOUNT_REDEMPTION_NUM_OF_DAYS
                    limit:
                      type: integer
                      description: How many Accounts can be redeemed in each period.
                    days:
                      nullable: true
                      type: integer
                      description: When period is ACCOUNT_REDEMPTION_X_DAYS this specifies what X is. Beginning from the creation of the Account.
                campaignLimit:
                  type: integer
                  nullable: true
                  description: The maximum number of Accounts that can be redeemed. Null or empty means all created Accounts can be redeemed.
                timeBetweenRedemptions:
                  type: object
                  nullable: true
                  description: If an Account is not single use this specifies the minimum amount of time that must elapse between redemptions.
                  properties:
                    active:
                      type: boolean
                      description: Flag denoting if rule is active or not.
                    value:
                      type: integer
                      minimum: 0
                      maximum: 86400
                      description: Number of seconds before an Account can be redeemed since last redemption.
                timeBetweenStamps:
                  type: object
                  nullable: true
                  description: Number of seconds before a stamp can redeemed since last redemption.
                  properties:
                    active:
                      type: boolean
                      description: Flag denoting if rule is active or not.
                    value:
                      type: integer
                      minimum: 0
                      maximum: 86400
                      description: Number of seconds before an Account can be stamped since the last stamp.
                allowMultipleRedeem:
                  nullable: true
                  type: object
                  description: A flag to denote if you generate multiple redeem events when maximumAccountUsage is > 1.
                  properties:
                    active:
                      type: boolean
                      description: A flag to denote if rule is active or not.
                couponLimit:
                  type: integer
                  nullable: true
                  description: The maximum number of times a Account can be redeemed. Null or empty denotes single use. 0 denotes unlimited.
                allowOverride:
                  type: boolean
                  nullable: true
                  description: OBSOLETE - A flag to denote if the details of the Campaign can be overridden for personalisation.
                allowAccountOverride:
                  type: boolean
                  description: A flag to denote if the Account details of the Campaign can be overridden for personalisation.
                maximumAccountUsage:
                  type: integer
                  nullable: true
                  description: The number of instances of this offer that can be completed in one transaction.
                windows:
                  type: object
                  description: Enable/disable redemption windows.
                  properties:
                    active:
                      type: boolean
                      description: A flag to denote if rule is active or not.
                dates:
                  type: object
                  description: The dates that are excluded from the redemption window.
                  properties:
                    exclusion:
                      type: object
                      properties:
                        active:
                          type: boolean
                          description: A flag to denote if rule is active or not.
                isHiddenFromRelatedWallets:
                  type: boolean
                  description: A boolean flag to enable/disable the mechanism for sharing an Account across a household.
                redeemableOutsideOwningWalletWithIdentity:
                  type: boolean
                  description: A boolean flag to enable/disable whether a paper coupon can be used by a customer that is part of a loyalty scheme but does not have the digital counterpart in their wallet.
                redeemableOutsideOwningWalletWithoutIdentity:
                  type: boolean
                  description: A boolean flag to enable/disable whether a paper coupon can be used by a customer that is not part of a loyalty scheme but does not have the digital counterpart in their wallet.
                maximumDiscountableRelatedContents:
                  type: integer
                  nullable: true
                  description: Set the number of related contents that can qualify for a discount.
                maximumAccountsPerTransaction:
                  type: integer
                  nullable: true
                  minimum: 1
                  description: Set the maximum number of Accounts from this Campaign that can be used per transaction.
            start:
              type: object
              nullable: true
              description: The start date of the Account.
              properties:
                type:
                  type: string
                  description: >
                    * IMMEDIATELY - Now.
                    * AFTER_CREATION - Account will have a start date set to X valueType after creation (requires valueType & value).
                    * DATE - Explicit Account start date (requires date).
                  enum:
                    - IMMEDIATELY
                    - AFTER_CREATION
                    - DATE
                valueType:
                  type: string
                  nullable: true
                  description: The type of value being provided.
                  enum:
                    - HOUR
                    - DAY
                value:
                  type: integer
                  nullable: true
                  description: The value to apply for the rule if the type requires a value.
                date:
                  type: string
                  format: date-time
                  description: The timestamp to apply to the rule if the type requires a timestamp.
            expiry:
              type: object
              description: The expiry date of the Account.
              properties:
                type:
                  type: string
                  description: >
                    * CAMPAIGN_END - Account will expire on Campaign end date.
                    * DATE - Account will expire on a fixed date.
                    * AFTER_CREATION - Account will have an expiry date set to X TIME_UNITS after creation.
                    * EXPIRY_PERIOD - Account will expire at the end of the current EXPIRY_PERIOD after creation
                  enum:
                    - CAMPAIGN_END
                    - DATE
                    - AFTER_CREATION
                    - EXPIRY_PERIOD
                valueType:
                  type: string
                  nullable: true
                  description: The type of value being provided.
                  enum:
                    - HOUR
                    - DAY
                    - MONTH_END
                    - ANNUAL
                value:
                  type: string
                  nullable: true
                  description: The value to apply for the rule if the type requires a value.
                date:
                  type: string
                  format: date-time
                  description: The timestamp to apply to the rule if the type requires one.
            refund:
              type: object
              description: Rules related to Refunds.
              properties:
                refundable:
                  type: boolean
                  description: A flag to denote if a customer returns an item and is no longer eligible for the Account that was redeemed in the original purchase, then the points earnt from that transaction are debited from the customers points Account.
                unredeemable:
                  type: boolean
                  description: A flag to denote if a Account that was used on the original purchase, then returned can be unredeemed and used in another transaction.
            useLocalTime:
              type: object
              nullable: true
              properties:
                active:
                  type: boolean
                  description: A flag to denote if a Campaign should treat all times as local or absolute.
            adjudication:
              type: object
              nullable: true
              properties:
                excludedProducts:
                  type: object
                  properties:
                    reuseQualifyingProducts:
                      type: boolean
                      description: Any products used to qualify can be used again in the same transaction against different promotions of matching types.
                    ignorePreviousExcludes:
                      type: boolean
                      description: Any products that have been excluded from qualifying because they have already been used in another promotion will be made available again to qualify.
        partners:
          type: object
          description: The issuance/redemption/creation partners for this Campaign.
          properties:
            issuance:
              type: array
              description: An array of objects, one for each issuance partner defined.
              items:
                type: object
                properties:
                  partner:
                    type: string
                    description: The unit id of the issuance partner.
                  issuanceLimit:
                    type: integer
                    nullable: true
                    description: The maximum number of Accounts that can be created by this partner. Null or empty denotes this partner can create unlimited Accounts against this Campaign.
            redemption:
              type: array
              description: An array of objects, one for each redemption partner defined.
              items:
                type: object
                properties:
                  partner:
                    type: string
                    description: The id of the redemption partner unit.
                  redemptionLimit:
                    type: integer
                    nullable: true
                    description: The maximum number of Accounts that can be redeemed by this partner, Null or empty denotes this partner can redeem an unlimited number of Accounts.
            creation:
              type: array
              description: An array of objects, one for each creation partner defined.
              items:
                type: object
                properties:
                  partner:
                    type: string
                    description: The id of the issuance partner unit.
        distributionChannels:
          type: object
          description: The distribution channels for this Campaign.
          items:
            type: object
            properties:
              name:
                type: string
                description: A name for the distribution channel should be unique.
              active:
                type: boolean
                description: A flag to denote if this channel is active for this Campaign.
              channelId:
                type: string
                description: A channel identifier. Is unique to the Eagle Eye system.
              partners:
                type: array
                description: The partner identifiers that can access this channel. If the partner is not defined already in the creation partners array then they will not get access to the channel.
                items:
                  type: string
              data:
                type: array
                description: Data contains the custom objects for the channel that have been defined elsewhere in the platform.
                items:
                  type: object
                  properties:
                    fieldName:
                      type: string
                      description: Data object contains fieldName.
                    fieldType:
                      type: string
                      description: Data object contains fieldType.
                    fieldData:
                      type: string
                      description: Data object contains fieldData.
        windows:
          type: object
          description: The date time windows that an Account can be created/issued/redeemed.
          properties:
            creation:
              type: array
              description: The time frame(s) that an Account can be created.
              items:
                type: object
                properties:
                  startDay:
                    type: string
                    description: Start day of the window.
                    enum:
                      - SUNDAY
                      - MONDAY
                      - TUESDAY
                      - WEDNESDAY
                      - THURSDAY
                      - FRIDAY
                      - SATURDAY
                  startTime:
                    type: string
                    description: Start time for a weekday above.
                    format: HH:mm
                    pattern: '^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$'
                  endDay:
                    type: string
                    description: End day of the window.
                    enum:
                      - SUNDAY
                      - MONDAY
                      - TUESDAY
                      - WEDNESDAY
                      - THURSDAY
                      - FRIDAY
                      - SATURDAY
                  endTime:
                    type: string
                    description: End time of the window.
                    format: HH:mm
                    pattern: '^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$'
            redemption:
              type: array
              description: The time windows that an Account can be redeemed.
              items:
                type: object
                properties:
                  startDay:
                    type: string
                    description: Start day of the window.
                    enum:
                      - SUNDAY
                      - MONDAY
                      - TUESDAY
                      - WEDNESDAY
                      - THURSDAY
                      - FRIDAY
                      - SATURDAY
                  startTime:
                    type: string
                    description: Start time for a weekday above.
                    format: HH:mm
                    pattern: '^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$'
                  endDay:
                    type: string
                    description: End day of the window.
                    enum:
                      - SUNDAY
                      - MONDAY
                      - TUESDAY
                      - WEDNESDAY
                      - THURSDAY
                      - FRIDAY
                      - SATURDAY
                  endTime:
                    type: string
                    description: End time of the window.
                    format: HH:mm
                    pattern: '^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$'
        dates:
          type: object
          description: The exceptions to the Campaign usage windows.
          properties:
            redemption:
              type: object
              properties:
                exclusion:
                  type: array
                  additionalProperties: false
                  uniqueItems: true
                  description: Redemption exclusion dates.
                  items:
                    type: object
                    properties:
                      start:
                        type: string
                        description: The exclusion start date-time.
                        pattern: '^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d$'
                      end:
                        type: string
                        description: The exclusion end date-time.
                        pattern: '^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d$'
        relationships:
          type: object
          description: The relationships between this Campaign and any others.
          nullable: true
          properties:
            objective:
              type: object
              properties:
                campaign:
                  $ref: '#/components/schemas/campaignRelationEntity/properties/campaign'
            objectiveOf:
              type: object
              properties:
                campaign:
                  $ref: '#/components/schemas/campaignRelationEntity/properties/campaign'
            promotion:
              type: object
              properties:
                campaign:
                  $ref: '#/components/schemas/campaignRelationEntity/properties/campaign'
            promotionOf:
              type: object
              properties:
                campaign:
                  $ref: '#/components/schemas/campaignRelationEntity/properties/campaign'
            entitlement:
              type: object
              properties:
                campaign:
                  $ref: '#/components/schemas/campaignRelationEntity/properties/campaign'
            entitlementOf:
              type: object
              properties:
                plan:
                  $ref: '#/components/schemas/campaignRelationEntity/properties/campaign'
        compatibility:
          type: object
          description: The Campaigns that this is compatible with.
          properties:
            active:
              type: boolean
              description: Flag denoting if rule is active or not.
            excluded:
              type: array
              nullable: true
              additionalProperties: false
              items:
                type: object
                properties:
                  type:
                    type: string
                    description: The type that is used to lookup the compatible Campaigns.
                    enum:
                      - campaignIds
                      - campaignTags
                  value:
                    type: array
                    nullable: true
                    description: The value of the specified type that is used to lookup the compatible Campaigns.
                    items:
                      anyOf:
                        - type: string
                        - type: integer
            included:
              type: array
              nullable: true
              additionalProperties: false
              items:
                type: object
                properties:
                  type:
                    type: string
                    description: The type that is used to lookup the compatible Campaigns.
                    enum:
                      - campaignIds
                      - campaignTags
                  value:
                    type: array
                    nullable: true
                    description: The value of the specified type that is used to lookup the compatible Campaigns.
                    items:
                      anyOf:
                        - type: string
                        - type: integer
            maxCouponsPerTransaction:
              type: object
              additionalProperties: false
              properties:
                active:
                  type: boolean
                  description: Flag denoting if rule is active or not.
                value:
                  type: integer
                  minimum: 1
                  description: How many Accounts from this Campaign can be used in a single transaction.
        incompatibility:
          type: object
          description: The Campaigns that this is incompatible with.
          properties:
            active:
              type: boolean
              description: It contains boolean value.
            included:
              type: array
              nullable: true
              additionalProperties: false
              items:
                type: object
                properties:
                  type:
                    type: string
                    description: The type that is used to lookup the compatible Campaigns.
                    enum:
                      - campaignIds
                      - campaignTags
                  value:
                    type: array
                    nullable: true
                    description: The value of the specified type that is used to lookup the compatible Campaigns.
                    items:
                      anyOf:
                        - type: string
                        - type: integer
        offer:
          type: object
          properties:
            offerType:
              type: string
              description: >
                The following offer types can be used within the system:
                  * FREE_PRODUCTS - An offer with one or more free products.
                  * FIXED_AMOUNT_OFF_BASKET - An offer with a fixed amount-off from a basket.
                  * VARIABLE_AMOUNT_OFF_BASKET - An offer with a variable amount-off from a basket.
                  * FIXED_AMOUNT_OFF_PRODUCTS - An offer with a fixed amount-off from one or more products.
                  * VARIABLE_AMOUNT_OFF_PRODUCTS - An offer with a variable amount-off from one or more products.
                  * FIXED_PERCENTAGE_OFF_BASKET - An offer with a percentage-off from a basket.
                  * VARIABLE_PERCENTAGE_OFF_BASKET - An offer with a variable percentage-off from a basket.
                  * FIXED_PERCENTAGE_OFF_PRODUCTS - An offer with a percentage-off one or more products.
                  * FIXED_PRICE_PRODUCTS - An offer with a fixed price for one or more products.
                  * MEAL_DEAL - A meal deal style offer where more than one product is offered for a fixed discount.
                  * FIXED_POINTS - A fixed points reward offer.
                  * FIXED_POINTS_PRODUCTS - A fixed points reward offer based on products.
                  * VARIABLE_POINTS_PRODUCTS - A variable points reward offer based on products.
                  * VARIABLE_POINTS_BASKET - A variable points reward offer based on a basket.
                  * FIXED_POINTS_BASKET - A fixed points reward offer based on a basket.
                  * STAMP_CARD - A stamp card offer where a customer receives a reward once they reach milestones.
                  * PROMO_CODE - An offer that is just triggered with an offer code being sent to the POS.
                  * POINTS_SPEND_RATE - An offer that modifies the rate of points spent.
                  * CONTINUITY - An offer where you repeat an action over time to be issued a points reward.
                  * THIRD_PARTY_POINTS - An offer provided by a third party where the provider is the points master but Eagle Eye are the Campaign master. 
                  * BOUNCE_BACK - An offer that when you qualify a new Account from a different Campaign is added to your wallet to be used at a later date.
                  * MULTI_PROMOTION_DISCOUNT - An offer that you have a single Account but it is linked to multiple different Campaigns and the customer receives all the offers that they qualify for in a single transaction.
                  * QUEST_FIXED_POINTS - An offer where you perform different actions over time to be issued a points reward.
                  * ZERO_REWARD - An offer which doesn't produce a points or discount reward.
                  * POINTS_EXCHANGE_DISCOUNT_OFF_PRODUCTS - An offer to allow the exchange of points for a discount on products.
              enum:
                - FREE_PRODUCTS
                - FIXED_AMOUNT_OFF_BASKET
                - VARIABLE_AMOUNT_OFF_BASKET
                - FIXED_AMOUNT_OFF_PRODUCTS
                - VARIABLE_AMOUNT_OFF_PRODUCTS
                - FIXED_PERCENTAGE_OFF_BASKET
                - VARIABLE_PERCENTAGE_OFF_BASKET
                - FIXED_PERCENTAGE_OFF_PRODUCTS
                - FIXED_PRICE_PRODUCTS
                - MEAL_DEAL
                - FIXED_POINTS
                - FIXED_POINTS_PRODUCTS
                - VARIABLE_POINTS_PRODUCTS
                - VARIABLE_POINTS_BASKET
                - FIXED_POINTS_BASKET
                - STAMP_CARD
                - PROMO_CODE
                - POINTS_SPEND_RATE
                - CONTINUITY
                - THIRD_PARTY_POINTS
                - BOUNCE_BACK
                - MULTI_PROMOTION_DISCOUNT
                - QUEST_FIXED_POINTS
                - ZERO_REWARD
                - POINTS_EXCHANGE_DISCOUNT_OFF_PRODUCTS
            continuity:
              type: object
              description: The qualification criteria for a continuity Account.
              properties:
                qualification:
                  type: object
                  properties:
                    totalTransactionCount:
                      nullable: true
                      type: number
                      description: A total number of transactions that must be met before the reward is triggered.
                    totalTransactionSpend:
                      nullable: true
                      type: number
                      description: The total spend across all qualifying transactions that must be met before the reward is triggered.
                    totalTransactionUnits:
                      type: integer
                      description: Total units purchased across all qualifying transactions for the reward to be triggered.
                    tenders:
                      $ref: '#/components/schemas/tendersCollectionEntity'
            issuanceQualification:
              nullable: true
              type: object
              description: The qualification criteria that a transaction must meet in order to issue an Account from this Campaign.
              properties:
                basket:
                  nullable: true
                  type: object
                  properties:
                    minimumBasketSpend:
                      nullable: true
                      type: integer
                      description: The minimum basket spend that must be reached to qualify.
                    minimumUnits:
                      nullable: true
                      type: integer
                      description: The minimum number of units that must be in the basket to qualify.
                locations:
                  nullable: true
                  type: object
                  additionalProperties:
                    type: object
                    pattern: '^[a-zA-Z0-9]+$'
                    properties:
                      included:
                        nullable: true
                        type: object
                        description: The locations where an Account from this Campaign can be issued. The key of the object is the incoming identifier of the unit.
                        properties:
                          locationIdentifiers:
                            nullable: true
                            type: object
                            description: The included location identifiers.
                            additionalProperties:
                              type: array
                              additionalProperties: false
                              uniqueItems: true
                              minItems: 1
                              pattern: '^[a-zA-Z0-9]+$'
                              items:
                                type: string
                          locationTags:
                            nullable: true
                            type: object
                            description: The location tags of included locations.
                            additionalProperties:
                              type: array
                              additionalProperties: false
                              uniqueItems: true
                              minItems: 1
                              pattern: '^[a-zA-Z0-9]+$'
                              items:
                                type: string
                      excluded:
                        nullable: true
                        type: object
                        description: Locations where an Account from this Campaign cannot be issued. The key of the object is the incoming identifier of the unit.
                        properties:
                          locationIdentifiers:
                            nullable: true
                            type: object
                            description: The excluded location identifiers.
                            additionalProperties:
                              type: array
                              additionalProperties: false
                              uniqueItems: true
                              minItems: 1
                              pattern: '^[a-zA-Z0-9]+$'
                              items:
                                type: string
                          locationTags:
                            nullable: true
                            type: object
                            description: The location tags of excluded locations.
                            additionalProperties:
                              type: array
                              additionalProperties: false
                              uniqueItems: true
                              minItems: 1
                              pattern: '^[a-zA-Z0-9]+$'
                              items:
                                type: string
                product:
                  type: object
                  additionalProperties:
                    type: object
                    description: The products that must be included in order to qualify. The key of the object is the incoming identifier of a unit.
                    pattern: '^[\S]*$'
                    properties:
                      logicalOperator:
                        type: string
                        description: The "OR" or "AND" operator defining how to compare the Product lists for qualification.
                      collections:
                        type: array
                        description: The Product lists for qualification.
                        items:
                          type: object
                          properties:
                            minimumProductSpend:
                              type: integer
                              description: The minimum amount that must be spent.
                            minimumUnits:
                              type: integer
                              description: The minimum number of units that must be in the basket for the products for qualification can pass.
                            maximumUnits:
                              type: integer
                              description: The maximum number of units that must be in the basket for the products so
                                qualification can pass.
                            products:
                              type: object
                              properties:
                                allRequired:
                                  type: boolean
                                  description: A flag to determine if all the products defined must be present or not.
                                included:
                                  nullable: true
                                  type: object
                                  properties:
                                    items:
                                      type: array
                                      description: Items elements contain.
                                      items:
                                        type: string
                                    groups:
                                      nullable: true
                                      type: object
                                      description: It contains group items.
                                    skus:
                                      type: array
                                      nullable: true
                                      description: It contains product items.
                                      items:
                                        type: string
                                    tags:
                                      type: array
                                      nullable: true
                                      description: It contains assigned tags.
                                      items:
                                        type: string
                                excluded:
                                  nullable: true
                                  type: object
                                  properties:
                                    items:
                                      type: array
                                      description: Items elements contains.
                                      items:
                                        type: string
                                    groups:
                                      nullable: true
                                      type: object
                                      description: It contains groups items.
                                    skus:
                                      type: array
                                      nullable: true
                                      description: It contains product items.
                                      items:
                                        type: string
                                    tags:
                                      type: array
                                      nullable: true
                                      description: It contains assigned tags.
                                      items:
                                        type: string
                points:
                  nullable: true
                  type: object
                  description: Information about points-related operations.
                  properties:
                    exchange:
                      nullable: true
                      type: object
                      description: Details about point exchange for rewards.
                      properties:
                        cost:
                          nullable: true
                          type: integer
                          description: The amount of points to be exchanged for a voucher printed at till.
            promoId:
              nullable: true
              type: string
              pattern: '^.{1,100}$'
              description: The offer code used by physical POS systems.
            qualification:
              type: object
              description: The required criteria for a customer to qualify for this offer.
              properties:
                basket:
                  nullable: true
                  type: object
                  properties:
                    minimumBasketSpend:
                      nullable: true
                      type: integer
                      description: The minimum basket spend that must be reached before the reward qualifies.
                    minimumUnits:
                      nullable: true
                      type: integer
                      description: The minimum number of units that must be in the basket for the reward to trigger.
                consumer:
                  nullable: true
                  type: object
                  description: The groups that each consumer can be a part of.
                  properties:
                    data:
                      nullable: true
                      type: object
                      properties:
                        segmentation:
                          nullable: true
                          type: object
                          additionalProperties:
                            type: object
                            pattern: '^[\S]+$'
                            properties:
                              included:
                                nullable: true
                                type: object
                                properties:
                                  data:
                                    nullable: true
                                    type: object
                                  labels:
                                    nullable: true
                                    type: array
                                    description: It contains items of labels.
                                    items:
                                      type: string
                              excluded:
                                nullable: true
                                type: object
                                properties:
                                  data:
                                    nullable: true
                                    type: object
                                  labels:
                                    nullable: true
                                    type: array
                                    description: It contains items of labels.
                                    items:
                                      type: string
                globalProductRestrictions:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                      description: A flag to determine if global product restrictions should apply to this Campaign or not.
                locations:
                  nullable: true
                  type: object
                  additionalProperties:
                    type: object
                    description: The locations where an Account from this Campaign can qualify. The key of the object is the incoming identifier of a unit.
                    pattern: '^[a-zA-Z0-9]+$'
                    properties:
                      included:
                        type: object
                        nullable: true
                        properties:
                          locationIdentifiers:
                            nullable: true
                            type: object
                            description: The included location identifiers.
                            additionalProperties:
                              type: array
                              additionalProperties: false
                              uniqueItems: true
                              minItems: 1
                              pattern: '^[a-zA-Z0-9]+$'
                              items:
                                type: string
                          locationTags:
                            nullable: true
                            type: object
                            description: The location tags of included locations.
                            additionalProperties:
                              type: array
                              additionalProperties: false
                              uniqueItems: true
                              minItems: 1
                              pattern: '^[a-zA-Z0-9]+$'
                              items:
                                type: string
                      excluded:
                        type: object
                        nullable: true
                        description: Locations where an Account from this Campaign cannot be issued. The key of the object is the incoming identifier of a unit.
                        properties:
                          locationIdentifiers:
                            nullable: true
                            type: object
                            description: The excluded location identifiers.
                            additionalProperties:
                              type: array
                              additionalProperties: false
                              uniqueItems: true
                              minItems: 1
                              pattern: '^[a-zA-Z0-9]+$'
                              items:
                                type: string
                          locationTags:
                            nullable: true
                            type: object
                            description: The location tags of excluded locations.
                            additionalProperties:
                              type: array
                              additionalProperties: false
                              uniqueItems: true
                              minItems: 1
                              pattern: '^[a-zA-Z0-9]+$'
                              items:
                                type: string
                multipleRedemptionPartners:
                  nullable: true
                  type: object
                  properties:
                    product:
                      nullable: true
                      type: object
                      properties:
                        totalMinimumProductSpend:
                          nullable: true
                          type: integer
                          description: Total min product spend across multiple redemption partners.
                objectives:
                  nullable: true
                  type: object
                  properties:
                    minimumRequired:
                      nullable: true
                      type: integer
                      description: The number of quest objectives that need to be completed.
                product:
                  nullable: true
                  type: object
                  additionalProperties:
                    type: object
                    description: The products that must be included in order to qualify. The key of the object is the incoming identifier of a unit.
                    pattern: '^[\S]*$'
                    properties:
                      logicalOperator:
                        type: string
                        nullable: true
                        minLength: 1
                        description: The "OR" or "AND" or "ANYOF" operator defining how to compare the Product lists for qualification.
                        enum:
                          - AND
                          - OR
                          - ANYOF
                      collections:
                        type: array
                        uniqueItems: true
                        minItems: 1
                        items:
                          type: object
                          properties:
                            minimumProductSpend:
                              nullable: true
                              type: integer
                              description: The minimum amount that must be spent.
                            minimumUnits:
                              nullable: true
                              type: integer
                              description: The minimum number of units that must be in the basket for the products for qualification can pass.
                            unitMetric:
                              type: string
                              description: The metric in which the item is measured that must match for the offer to qualify.
                              enum:
                                - LITRES
                                - GRAMS
                                - MILLILITERS
                                - KILOGRAMS
                                - POUNDS
                                - OUNCES
                                - PIECE
                            products:
                              type: object
                              properties:
                                allRequired:
                                  type: boolean
                                  description: This key is no longer used.
                                included:
                                  nullable: true
                                  type: object
                                  properties:
                                    items:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: Items elements contains.
                                      items:
                                        type: string
                                    groups:
                                      nullable: true
                                      type: object
                                      uniqueItems: true
                                      description: It contains group items.
                                    skus:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: It contains product items.
                                      items:
                                        type: string
                                    tags:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: It contains assigned tags.
                                      items:
                                        type: string
                                excluded:
                                  nullable: true
                                  type: object
                                  properties:
                                    items:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: Items elements contains.
                                      items:
                                        type: string
                                    groups:
                                      nullable: true
                                      type: object
                                      uniqueItems: true
                                      description: It contains group items.
                                    skus:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: It contains product items.
                                      items:
                                        type: string
                                    tags:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: It contains assigned tags.
                                      items:
                                        type: string
                redemptionChannels:
                  type: object
                  description: The redemptions channels that can qualify for this offer.
                  properties:
                    excluded:
                      type: array
                      description: A list of redemption channels that are excluded from the promotion.
                      items:
                        type: string
                    included:
                      type: array
                      description: A list of redemption channels that are included in the promotion.
                      items:
                        type: string
                universalCode:
                  type: object
                  additionalProperties: false
                  properties:
                    enabled:
                      type: boolean
                      description: A flag to determine if universal code should apply to this Campaign or not.
                    value:
                      type: string
                      description: The universal code value.
                    transfer:
                      type: boolean
                      description: A flag to determine if universal code should be transferred to this Campaign.
                tenders:
                  $ref: '#/components/schemas/tendersCollectionEntity'
                identityTypes:
                  nullable: true
                  description: Qualification criteria based on the type of identity defined in Wallet config. e.g email, membership Id.
                  type: object
                  additionalProperties: false
                  properties:
                    excluded:
                      type: array
                      description: It contains excluded items of identity type to qualify for the promotion.
                      items:
                        type: string
                    included:
                      type: array
                      description: It contains identity type of items to qualify for the promotion.
                      items:
                        type: string
                audiences:
                  nullable: true
                  description: Qualification criteria based on the audiences a wallet must or must not belong to.
                  type: object
                  additionalProperties: false
                  properties:
                    excluded:
                      nullable: true
                      type: array
                      description: >
                        It contains an array of audience lists that will exclude a wallet from the promotion. 
                        If the wallet is a member of at least one audience in EACH list then the promotion will be excluded.
                        Exclusion rules take priority over inclusion rules.
                      items:
                        type: array
                        description: A list of audience IDs.
                        items:
                          type: string
                    included:
                      nullable: true
                      type: array
                      description: >
                        It contains an array of audience lists that will qualify the wallet for the promotion. 
                        The wallet must be a member of at least one audience in EACH list for the promotion to qualify (and also not be excluded).
                      items:
                        type: array
                        description: A list of audience IDs.
                        items:
                          type: string
            reward:
              type: object
              properties:
                basket:
                  type: object
                  description: The basket based rewards based around the basket as a whole, such as a basket value total or the number of items purchased.
                  properties:
                    value:
                      type: object
                      description: The reward rules around a value based discount.
                      properties:
                        interval:
                          type: object
                          description: The reward rules that are based on an interval value of either a basket amount or unit quantity.
                          properties:
                            decider:
                              type: string
                              minLength: 1
                              description: >
                                The method that will be used to specify how the discount is calculated:
                                  * SPEND - Will use the basket value to calculate the discount.
                                  * UNITS - Will use the number of units in the basket to calculate the discount.
                              enum:
                                - SPEND
                                - UNITS
                            step:
                              type: integer
                              description: The interval value when the discount amount should be stepped up.
                            discountAmount:
                              type: integer
                              description: The discount amount to apply to the basket total.
                            floor:
                              type: integer
                              description: The interval value where the credit amount should start increasing from.
                            ceiling:
                              nullable: true
                              type: integer
                              description: The interval value where the credit amount should stop increasing.
                        tier:
                          type: object
                          description: The reward rules around tiers of a basket amount or unit quantities.
                          properties:
                            decider:
                              type: string
                              description: >
                                The method that will be used to specify how the discount is calculated:
                                  * SPEND - Will use the basket value to calculate the discount.
                                  * UNITS - Will use the number of units in the basket to calculate the discount.
                              enum:
                                - SPEND
                                - UNITS
                            values:
                              type: array
                              uniqueItems: true
                              minItems: 1
                              description: The array of values for each tier.
                              items:
                                type: object
                                properties:
                                  floor:
                                    nullable: false
                                    type: integer
                                    description: The minimum threshold of the value used for this tier.
                                  ceiling:
                                    nullable: false
                                    type: integer
                                    description: The maximum threshold of the value used for this tier.
                                  discountAmount:
                                    nullable: true
                                    type: integer
                                    description: The discount amount to apply to the basket total.
                                  discountPercentage:
                                    nullable: true
                                    type: integer
                                    description: The discount percentage to apply to the basket total.
                    points:
                      type: object
                      description: The reward rules around a points value-based discount
                      properties:
                        interval:
                          type: object
                          properties:
                            decider:
                              type: string
                              minLength: 1
                              description: >
                                The method that will be used to specify how the discount is calculated:
                                  * TOTAL - Will use the basket value to calculate the discount.
                                  * UNITS - Will use the number of units in the basket to calculate the discount.
                              enum:
                                - TOTAL
                                - UNITS
                            step:
                              type: integer
                              description: The value of the interval when the discount amount should be stepped up.
                            schemeId:
                              type: string
                              description: The Scheme that the points should be credited to.
                            creditAmount:
                              type: integer
                              description: The amount to increase the points credit amount by with each interval.
                            floor:
                              type: integer
                              description: The interval value where the credit amount should start increasing from.
                            ceiling:
                              nullable: true
                              type: integer
                              description: The interval value where the credit amount should stop increasing.
                        tier:
                          type: object
                          properties:
                            decider:
                              type: string
                              minLength: 1
                              description: >
                                The method that will be used to specify how the discount is calculated:
                                  * SPEND - Will use the basket value to calculate the discount.
                                  * UNITS - Will use the number of units in the basket to calculate the discount.
                                  * TOTAL - Will use the basket value to calculate the discount.
                              enum:
                                - SPEND
                                - UNITS
                                - TOTAL
                            values:
                              type: array
                              uniqueItems: true
                              minItems: 1
                              description: The array of values for each tier.
                              items:
                                type: object
                                properties:
                                  floor:
                                    type: number
                                    description: The minimum threshold of the value used for the decider for this tier.
                                  ceiling:
                                    nullable: true
                                    type: integer
                                    description: The maximum threshold of the value used for the decider for this tier.
                                  schemeId:
                                    nullable: true
                                    type: string
                                    description: The Scheme that the points should be credited to.
                                  creditAmount:
                                    type: integer
                                    description: The number of points to credit for this tier.
                                  multiplier:
                                    type: number
                                    description: The multiplier value of points base issuance to award. It cannot be used in conjunction with creditAmount.
                        percentBack:
                          type: object
                          nullable: true
                          description: The reward rule when a percentage of basket spend should be awarded in points.
                          properties:
                            percentageAmount:
                              type: number
                              description: The percentage of basket spend that should be awarded. This can be a decimal.
                            rate:
                              type: number
                              description: How much a point is worth in the lowest denomination of local currency, such
                                as pence or cent. This can be a decimal, so 0.1 would mean 10 points equal a penny or
                                cent. This is used to calculate how many points should be awarded.
                            schemeId:
                              type: string
                              description: The Scheme that the points should be credited to.
                          required:
                            - percentageAmount
                            - rate
                            - schemeId
                maxRewardValue:
                  nullable: true
                  type: integer
                  description: This refers to the maximum value of a coupon reward that can be obtained within a campaign.
                maxRewardValuePerPeriod:
                  nullable: true
                  type: array
                  description: This refers to the maximum value of a coupon reward that can be obtained within a specific period for a campaign.
                  items:
                    type: object
                    properties:
                      active:
                        type: boolean
                        description: A flag denoting if maxRewardValuePerPeriod is active or not.
                      value:
                        type: integer
                        description: This contains maximum value of a coupon reward.
                      period:
                        type: string
                        description: What the period is.
                        enum:
                          - ACCOUNT_REWARD_DAY
                          - ACCOUNT_REWARD_MONTH
                    required:
                      - active
                      - value
                      - period
                    additionalProperties: false
                maxRewardUnitsPerPeriod:
                  nullable: true
                  type: array
                  description: This refers to the maximum number of units that can be redeemed within a specific period for a campaign.
                  items:
                    type: object
                    properties:
                      active:
                        type: boolean
                        description: A flag denoting if maxRewardUnitsPerPeriod is active or not.
                      value:
                        type: integer
                        description: This contains the maximum number of units that can be redeemed in a given period.
                      period:
                        type: string
                        description: What the period is.
                        enum:
                          - ACCOUNT_REWARD_UNITS_DAY
                          - ACCOUNT_REWARD_UNITS_WEEK
                          - ACCOUNT_REWARD_UNITS_MONTH
                          - ACCOUNT_REWARD_UNITS_YEAR
                          - ACCOUNT_REWARD_UNITS_LIFETIME
                    required:
                      - active
                      - value
                      - period
                    additionalProperties: false
                standard:
                  nullable: true
                  type: object
                  description: The standard rewards where either a discount value or percentage is given or a number of points is credited.
                  properties:
                    value:
                      type: object
                      properties:
                        percentageAmount:
                          nullable: true
                          type: integer
                          description: The discount percentage to be subtracted from the basket total amount.
                        discountAmount:
                          nullable: true
                          type: integer
                          description: The discount amount to be subtracted from the basket total amount.
                    coupon:
                      type: object
                      properties:
                        campaignId:
                          nullable: true
                          type: array
                          description: The ids of campaigns to issue a coupon against as a reward.
                          items:
                            type: string
                    stamps:
                      type: array
                      description: The campaign ids and number of stamps to be stamped stamp as a reward.
                      items:
                        type: object
                        required:
                          - campaignId
                        properties:
                          campaignId:
                            type: string
                            description: Stamp card campaign to be stamped as a reward.
                          amount:
                            nullable: true
                            type: integer
                            description: The amount of stamps to be made on the campaign. Optional, defaults to 1 if not provided.
                        example:
                          - campaignId: '123'
                          - campaignId: '234'
                            amount: 2
                    zeroReward:
                      type: boolean
                      nullable: false
                      description: Flags that there is no reward for this offer. Can only be `true`.
                      enum:
                        - true
                      example: true
                    points:
                      type: object
                      properties:
                        schemeId:
                          nullable: true
                          type: string
                          description: The Scheme that the points must be credited to. If this is not provided, points are credited to the default points Account for the consumer.
                        creditAmount:
                          nullable: true
                          type: integer
                          description: The number of points to credit the points Account with.
                        multiplierValue:
                          nullable: true
                          type: integer
                          description: The multiplication value to apply to the base issuance of points that would normally be awarded for the transaction.
                    tax:
                      type: object
                      description: The rewards based on tax.
                      properties:
                        taxSaver:
                          nullable: true
                          type: boolean
                          description: Denotes whether the tax amount will be rewarded for this offer.
                    bolton-points:
                      type: object
                      properties:
                        schemeId:
                          nullable: true
                          type: string
                          description: The Scheme that the points must be credited to.
                        creditAmount:
                          nullable: true
                          type: integer
                          description: The number of points to credit the points Account with.
                        multiplierValue:
                          nullable: true
                          type: integer
                          description: The multiplication value to apply to the base issuance of points that would normally be awarded for the transaction.
                    product:
                      nullable: true
                      type: object
                      additionalProperties:
                        type: object
                        description: The products that this reward impacts.
                        pattern: '^[\S]*$'
                        additionalProperties: false
                        properties:
                          logicalOperator:
                            nullable: true
                            type: string
                            description: The "OR" or "AND" or "ANYOF" operator defining how to compare the Product lists for reward.
                            enum:
                              - AND
                              - OR
                              - ANYOF
                          collections:
                            type: array
                            uniqueItems: true
                            minItems: 1
                            description: The list of products that can be rewarded.
                            items:
                              type: object
                              properties:
                                minimumNumberOfUnits:
                                  nullable: true
                                  type: integer
                                  description: The minimum number of units.
                                maximumNumberOfUnits:
                                  nullable: true
                                  type: integer
                                  description: The maximum number of units.
                                products:
                                  nullable: true
                                  type: object
                                  properties:
                                    allRequired:
                                      type: boolean
                                      description: A flag to determine if all of the products defined must be present or not.
                                    included:
                                      nullable: true
                                      type: object
                                      properties:
                                        items:
                                          nullable: true
                                          type: array
                                          uniqueItems: true
                                          description: The included product items.
                                          items:
                                            type: string
                                        groups:
                                          nullable: true
                                          type: object
                                          uniqueItems: true
                                          description: The included product groups.
                                        skus:
                                          nullable: true
                                          type: array
                                          uniqueItems: true
                                          description: The included product sku's.
                                          items:
                                            type: string
                                        tags:
                                          nullable: true
                                          type: array
                                          uniqueItems: true
                                          description: The included product tags.
                                          items:
                                            type: string
                                    excluded:
                                      nullable: true
                                      type: object
                                      properties:
                                        items:
                                          nullable: true
                                          type: array
                                          uniqueItems: true
                                          description: The excluded product items.
                                          items:
                                            type: string
                                        groups:
                                          nullable: true
                                          type: object
                                          uniqueItems: true
                                          description: The excluded product groups.
                                        skus:
                                          nullable: true
                                          type: array
                                          uniqueItems: true
                                          description: The excluded product sku's.
                                          items:
                                            type: string
                                        tags:
                                          nullable: true
                                          type: array
                                          uniqueItems: true
                                          description: The excluded product tags.
                                          items:
                                            type: string
                                value:
                                  nullable: true
                                  type: object
                                  properties:
                                    standard:
                                      nullable: true
                                      type: object
                                      properties:
                                        discountAmount:
                                          nullable: true
                                          type: integer
                                          description: The amount should be discounted from any of the product purchased.
                                        allFree:
                                          nullable: true
                                          type: boolean
                                          description: A flag to denote if all the products that are in the customer basket should be given free or not.
                                        percentageAmount:
                                          nullable: true
                                          type: number
                                          description: The percentage amount should be discounted from any of the product purchased.
                                        finalAmount:
                                          nullable: true
                                          type: integer
                                          description: The final amount of the purchased products.
                                    interval:
                                      nullable: true
                                      type: object
                                      properties:
                                        decider:
                                          type: string
                                          minLength: 1
                                          description: >
                                            The method that will be used to specify how the discount is calculated:
                                              * SPEND - Will use the value of the products included in this object.
                                              * UNITS - Will use the number product units purchased from this group to calculate the discount.
                                              * QUALIFICATION - Will use the number of times the customer has qualified as the interval decider.
                                          enum:
                                            - SPEND
                                            - UNITS
                                            - QUALIFICATION
                                        step:
                                          type: integer
                                          description: The value of the interval when the discount amount should be stepped up.
                                        discountValue:
                                          nullable: true
                                          type: integer
                                          description: The discount value to increase with every interval.
                                        discountPercentage:
                                          nullable: true
                                          type: integer
                                          description: The percentage value to increase with every interval.
                                        floor:
                                          type: integer
                                          description: The interval to start at.
                                        ceiling:
                                          nullable: true
                                          type: integer
                                          description: The interval to stop at.
                                    tier:
                                      nullable: true
                                      type: object
                                      properties:
                                        decider:
                                          type: string
                                          minLength: 1
                                          description: >
                                            The method that will be used to specify how the discount is calculated:
                                              * SPEND - Will use the value of the products included in this object.
                                              * UNITS - Will use the number product units purchased from this group to calculate the discount.
                                            enum:
                                            - SPEND
                                            - UNITS
                                        values:
                                          type: array
                                          uniqueItems: true
                                          minItems: 1
                                          description: It contains array of values.
                                          items:
                                            type: object
                                            properties:
                                              floor:
                                                nullable: true
                                                type: integer
                                                description: The minimum threshold of the value used for the decider for this tier.
                                              ceiling:
                                                nullable: true
                                                type: integer
                                                description: The maximum threshold of the value used for the decider for this tier.
                                              discountAmount:
                                                type: integer
                                                description: The discount amount to apply to the products of this tier.
                                              discountPercentage:
                                                type: integer
                                                description: The discount percentage to apply to the products for this tier.
                                points:
                                  nullable: true
                                  type: object
                                  properties:
                                    standard:
                                      nullable: true
                                      type: object
                                      properties:
                                        schemeId:
                                          nullable: true
                                          type: string
                                          description: The Scheme that the points should be credited to.
                                        creditAmount:
                                          nullable: true
                                          type: integer
                                          description: The number of points to credit the points Account with.
                                        multiplierValue:
                                          nullable: true
                                          type: integer
                                          description: The multiplication value to apply to the base issuance of points that would normally be awarded for the products.
                                    interval:
                                      nullable: true
                                      type: object
                                      properties:
                                        decider:
                                          type: string
                                          minLength: 1
                                          description: >
                                            The method that will be used to specify how the discount is calculated:
                                              * SPEND - Will use the value of the products included in this object.
                                              * UNITS - Will use the number product units purchased from this group to calculate the discount.
                                          enum:
                                            - SPEND
                                            - UNITS
                                        step:
                                          type: integer
                                          description: The value of the interval when the discount amount should be stepped up.
                                        schemeId:
                                          nullable: true
                                          type: string
                                          description: The Scheme that the points should be credited to.
                                        creditAmount:
                                          type: integer
                                          description: The amount to increase the points credit amount by with each interval.
                                        floor:
                                          type: integer
                                          description: The interval value where the credit amount should start increasing from.
                                        ceiling:
                                          nullable: true
                                          type: integer
                                          description: The interval value where the credit amount should stop increasing.
                                    tier:
                                      nullable: true
                                      type: object
                                      properties:
                                        decider:
                                          type: string
                                          minLength: 1
                                          description: >
                                            The method that will be used to specify how the discount is calculated:
                                              * SPEND - Will use the value of the products included in this object.
                                              * UNITS - Will use the number product units purchased from this group to calculate the discount.
                                          enum:
                                            - SPEND
                                            - UNITS
                                        values:
                                          type: array
                                          uniqueItems: true
                                          minItems: 1
                                          description: The array of values for each tier.
                                          items:
                                            type: object
                                            properties:
                                              floor:
                                                type: number
                                                description: The minimum threshold of the value used for the decider for this tier.
                                              ceiling:
                                                nullable: true
                                                type: number
                                                description: The maximum threshold of the value used for the decider for this tier.
                                              schemeId:
                                                nullable: true
                                                type: string
                                                description: The Scheme that the points should be credited to.
                                              creditAmount:
                                                type: number
                                                description: The number of points to credit for this tier.
                                              multiplier:
                                                type: number
                                                description: The multiplier value of points base issuance to award. It cannot be used in conjunction with a creditAmount.
                                              bonus:
                                                type: number
                                                description: A bonus amount of points to credit for this tier. This is in addition to either multiplier or creditAmount.
                product:
                  nullable: true
                  type: object
                  additionalProperties:
                    type: object
                    description: The products that this reward impacts.
                    pattern: '^[\S]*$'
                    additionalProperties: false
                    properties:
                      logicalOperator:
                        nullable: true
                        type: string
                        description: The "OR" or "AND" or "ANYOF" operator defining how to compare the Product lists.
                        enum:
                          - AND
                          - OR
                          - ANYOF
                      collections:
                        type: array
                        uniqueItems: true
                        minItems: 1
                        description: The list of products that can be rewarded.
                        items:
                          type: object
                          properties:
                            minimumNumberOfUnits:
                              nullable: true
                              type: integer
                              description: The minimum number of units.
                            maximumNumberOfUnits:
                              nullable: true
                              type: integer
                              description: The maximum number of units.
                            products:
                              nullable: true
                              type: object
                              properties:
                                allRequired:
                                  type: boolean
                                  description: A flag to determine if all the products defined must be present or not.
                                included:
                                  nullable: true
                                  type: object
                                  properties:
                                    items:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: The included product items.
                                      items:
                                        type: string
                                    groups:
                                      nullable: true
                                      type: object
                                      uniqueItems: true
                                      description: The included product groups.
                                    skus:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: The included product sku's.
                                      items:
                                        type: string
                                    tags:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: The included product tags.
                                      items:
                                        type: string
                                excluded:
                                  nullable: true
                                  type: object
                                  properties:
                                    items:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: The excluded product items.
                                      items:
                                        type: string
                                    groups:
                                      nullable: true
                                      type: object
                                      uniqueItems: true
                                      description: The excluded product groups.
                                    skus:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: The excluded product sku's.
                                      items:
                                        type: string
                                    tags:
                                      nullable: true
                                      type: array
                                      uniqueItems: true
                                      description: The excluded product tags.
                                      items:
                                        type: string
                            value:
                              nullable: true
                              type: object
                              properties:
                                standard:
                                  nullable: true
                                  type: object
                                  properties:
                                    discountAmount:
                                      nullable: true
                                      type: integer
                                      description: The amount that should be discounted from any of the products purchased.
                                    allFree:
                                      nullable: true
                                      type: boolean
                                      description: A flag to denote that all products are in the customer basket should be given free or not.
                                    percentageAmount:
                                      nullable: true
                                      type: number
                                      description: The percentage amount should be discounted from any of the product purchased.
                                    finalAmount:
                                      nullable: true
                                      type: integer
                                      description: The final amount of the purchased products.
                                interval:
                                  nullable: true
                                  type: object
                                  properties:
                                    decider:
                                      type: string
                                      minLength: 1
                                      description: >
                                        The method that will be used to specify how the discount is calculated:
                                          * SPEND - Will use the value of the products included in this object.
                                          * UNITS - Will use the number product units purchased from this group to calculate the discount.
                                          * QUALIFICATION - Will use the number of times the customer has qualified as the interval decider.
                                      enum:
                                        - SPEND
                                        - UNITS
                                        - QUALIFICATION
                                    step:
                                      type: integer
                                      description: The value of the interval when the discount amount should be stepped up.
                                    discountValue:
                                      nullable: true
                                      type: integer
                                      description: The discount value to increase with every interval.
                                    discountPercentage:
                                      nullable: true
                                      type: integer
                                      description: The percentage value to increase with every interval.
                                    floor:
                                      type: integer
                                      description: The interval to start at.
                                    ceiling:
                                      nullable: true
                                      type: integer
                                      description: The interval to stop at.
                                tier:
                                  nullable: true
                                  type: object
                                  properties:
                                    decider:
                                      type: string
                                      minLength: 1
                                      description: >
                                        The method that will be used to specify how the discount is calculated:
                                          * SPEND - Will use the value of the products included in this object.
                                          * UNITS - Will use the number product units purchased from this group to calculate the discount.
                                        enum:
                                        - SPEND
                                        - UNITS
                                    values:
                                      type: array
                                      uniqueItems: true
                                      minItems: 1
                                      description: It contains array of values.
                                      items:
                                        type: object
                                        properties:
                                          floor:
                                            nullable: true
                                            type: integer
                                            description: The minimum threshold of the value used for the decider for this tier.
                                          ceiling:
                                            nullable: true
                                            type: integer
                                            description: The maximum threshold of the value used for the decider for this tier.
                                          discountAmount:
                                            nullable: true
                                            type: integer
                                            description: The discount amount to apply to the products of this tier.
                                          discountPercentage:
                                            nullable: true
                                            type: integer
                                            description: The discount percentage to apply to the products for this tier.
                            points:
                              nullable: true
                              type: object
                              properties:
                                standard:
                                  nullable: true
                                  type: object
                                  properties:
                                    schemeId:
                                      nullable: true
                                      type: string
                                      description: The Scheme that the points should be credited to.
                                    creditAmount:
                                      nullable: true
                                      type: integer
                                      description: The number of points to credit the points Account with.
                                    multiplierValue:
                                      nullable: true
                                      type: integer
                                      description: The multiplication value to apply to the base issuance of points that would normally be awarded for the products.
                                interval:
                                  nullable: true
                                  type: object
                                  properties:
                                    decider:
                                      type: string
                                      minLength: 1
                                      description: >
                                        The method that will be used to specify how the discount is calculated:
                                          * SPEND - Will use the value of the products included in this object.
                                          * UNITS - Will use the number product units purchased from this group to calculate the discount.
                                      enum:
                                        - SPEND
                                        - UNITS
                                    step:
                                      type: integer
                                      description: The value of the interval when the discount amount should be stepped up.
                                    schemeId:
                                      nullable: true
                                      type: string
                                      description: The Scheme that the points should be credited to.
                                    creditAmount:
                                      type: integer
                                      description: The amount to increase the points credit amount by with each interval.
                                    floor:
                                      type: integer
                                      description: The interval value where the credit amount should start increasing from.
                                    ceiling:
                                      nullable: true
                                      type: integer
                                      description: TThe interval value where the credit amount should stop increasing.
                                tier:
                                  nullable: true
                                  type: object
                                  properties:
                                    decider:
                                      type: string
                                      minLength: 1
                                      description: >
                                        The method that will be used to specify how the discount is calculated:
                                          * SPEND - Will use the value of the products included in this object.
                                          * UNITS - Will use the number product units purchased from this group to calculate the discount.
                                      enum:
                                        - SPEND
                                        - UNITS
                                    values:
                                      type: array
                                      uniqueItems: true
                                      minItems: 1
                                      description: It contains array of values.
                                      items:
                                        type: object
                                        properties:
                                          floor:
                                            type: number
                                            description: The minimum threshold of the value used for the decider for this tier.
                                          ceiling:
                                            nullable: true
                                            type: number
                                            description: The maximum threshold of the value used for the decider for this tier.
                                          schemeId:
                                            nullable: true
                                            type: string
                                            description: The Scheme that the points should be credited to.
                                          creditAmount:
                                            nullable: true
                                            type: number
                                            description: The number of points to credit for this tier.
                                          multiplier:
                                            type: number
                                            description: The multiplier value of points base issuance to award. It cannot be used in conjunction with a creditAmount.
                                percentBack:
                                  type: object
                                  nullable: true
                                  description: The reward rule when a percentage of product spend should be awarded in points.
                                  properties:
                                    percentageAmount:
                                      type: number
                                      description: The percentage of product spend that should be awarded. This can be a decimal.
                                    rate:
                                      type: number
                                      description: How much a point is worth in the lowest denomination of local currency, such
                                        as pence or cent. This can be a decimal, so 0.1 would mean 10 points equal a penny or
                                        cent. This is used to calculate how many points should be awarded.
                                    schemeId:
                                      type: string
                                      description: The Scheme that the points should be credited to.
                                  required:
                                    - percentageAmount
                                    - rate
                                    - schemeId
                stampCard:
                  type: object
                  description: The reward rules for offers that give a reward when you reach a certain number number of stamps.
                  additionalProperties:
                    type: array
                    description: The Campaigns an Account should be issued from when a consumer meets this number of stamps
                    pattern: '^[1-9][0-9]?$|^100$'
                    additionalProperties: false
                    minItems: 1
                    uniqueItems: true
                    items:
                      type: object
                      properties:
                        resourceId:
                          type: string
                          description: The Campaign Id.
                        resourceType:
                          type: string
                          description: The resource type supported for stamp cards. Only CAMPAIGN.
                          enum:
                            - CAMPAIGN
                pointSpendRates:
                  type: array
                  description: The reward rules for an offer that can reward customers with a different spend rate when using points they have earned on previous transactions. This is set up in a tier-based way depending on the number of points that are being spent at the time. This means multiple objects defining a rate can be provided in the offer setup. The Spend Rate Reward parameters are defined as the following and are used when a consumer is redeeming their points
                  items:
                    type: object
                    properties:
                      floor:
                        type: integer
                        description: The starting value of the range that the spend amount must be between floor and ceiling.
                      ceiling:
                        type: integer
                        description: The top value of the range that the spend amount must be between floor and ceiling.
                      step:
                        type: integer
                        description: The step increments within this range that spend must occur at.
                      rate:
                        type: number
                        description: The monetary value of each point and this is a floating-point number.
                      bonus:
                        type: integer
                        description: A bonus monetary amount to be rewarded if the spend amount is within the required spend range.
                      pointsBack:
                        type: integer
                        description: The number of points returned to the Account if the spend amount is within this spend range.
                treatAs:
                  nullable: true
                  type: object
                  description: The reward rules when calculating the price a customer will pay.
                  properties:
                    type:
                      type: string
                      additionalProperties: false
                      description: >
                        The method that will be used to specify how a Coupon should be treated at point of sale. Default value of DISCOUNT if this is not defined (empty string):
                          * DISCOUNT – Treated as money off a basket or products.
                          * TENDER – Treated as part payment against a basket or products.
                          * REBATE - Treated as part of buying discount of a basket or products.
                      enum:
                        - DISCOUNT
                        - TENDER
                        - REBATE
                restrictRewardToTender:
                  nullable: true
                  type: object
                  description: >
                    Whether a reward should be limited to payment on a specified tender
                  properties:
                    enabled:
                      type: boolean
                      additionalProperties: false
                      description: >
                        A rule to decide when calculating the total reward for the customer whether only to apply a
                        reward for the value spent on a selected tender type
                    tenders:
                      $ref: '#/components/schemas/tendersCollectionEntity'
                tierMembership:
                  nullable: true
                  type: object
                  properties:
                    schemeId:
                      type: string
                      description: >
                        Only required if `tierMembership.points.active` is `true` and `offer.reward.standard.zeroReward`
                        is `true` for tier contributions.
                      example: '123'
                    points:
                      nullable: true
                      type: object
                      properties:
                        active:
                          nullable: false
                        type:
                          description: >
                            Only required if `active` is `true`. When `offer.reward.standard.zeroReward` is `true` and
                            `active` is `true` for tier contributions then the points reward `type` can only be `FIXED`.
                          nullable: true
                          type: string
                          enum:
                            - FIXED
                            - MATCH_REWARD
                            - null
                        creditAmount:
                          nullable: true
                          type: integer
                    transactions:
                      nullable: true
                      type: object
                      properties:
                        active:
                          type: boolean
                          nullable: true
            boltOn:
              nullable: true
              type: array
              description: The bonus reward if you transact with a particular tender type.
              items:
                type: object
                properties:
                  qualification:
                    type: object
                    properties:
                      tender:
                        type: object
                        properties:
                          include:
                            type: array
                            description: It contains offer qualification rules.
                            items:
                              type: object
                  reward:
                    type: object
                    nullable: true
                    properties:
                      standard:
                        type: object
                        properties:
                          points:
                            type: object
                            properties:
                              creditAmount:
                                nullable: true
                                type: integer
                                description: The number of points to credit the points Account with.
            bounceBack:
              nullable: true
              type: array
              minItems: 1
              uniqueItems: true
              description: The promotion Account issued if a customer qualifies for a bounce back Campaign.
              items:
                type: object
                properties:
                  resourceId:
                    type: string
                    description: The resource id value.
                  resourceType:
                    type: string
                    description: The resource type enum value.
                    enum:
                      - CAMPAIGN
            stampCard:
              type: object
              description: The configuration details of a stamp card Campaign.
              properties:
                configuration:
                  type: object
                  properties:
                    steps:
                      type: integer
                      description: How many stamps per rotation.
                    rotations:
                      type: object
                      properties:
                        active:
                          type: boolean
                          description: A flag denoting if rotations is active or not.
                        value:
                          type: integer
                          description: The number of rotations.
                multiplier:
                  type: object
                  description: A reward multiplier during specific day/time windows.
                  properties:
                    active:
                      type: boolean
                      description: Boolean flag to determine whether reward multipliers should be used
                    windows:
                      type: array
                      nullable: true
                      uniqueItems: true
                      description: An array of day/time windows with which to multiply the reward
                      items:
                        type: object
                        properties:
                          startDate:
                            type: string
                            format: "y-m-d"
                            description: The start date whereafter this multiplier window should be considered active.
                            example: "2024-01-01"
                          endDate:
                            type: string
                            format: "y-m-d"
                            description: The end date whereafter this multiplier window should be considered inactive.
                            example: "2024-12-31"
                          startDay:
                            type: string
                            nullable: true
                            description: The day of the week this multiplier window starts at.
                            enum:
                              - MONDAY
                              - TUESDAY
                              - WEDNESDAY
                              - THURSDAY
                              - FRIDAY
                              - SATURDAY
                              - SUNDAY
                          endDay:
                            type: string
                            nullable: true
                            description: The day of the week this multiplier window ends at.
                            enum:
                              - MONDAY
                              - TUESDAY
                              - WEDNESDAY
                              - THURSDAY
                              - FRIDAY
                              - SATURDAY
                              - SUNDAY
                          startTime:
                            type: string
                            description: The time this multiplier window should come into effect
                            example: "18:00"
                          endTime:
                            type: string
                            description: The time this multiplier window should cease being in effect
                            example: "19:00"
                          value:
                            type: number
                            description: The reward multiplier
                            example: 2
        barcode:
          type: object
          additionalProperties: false
          properties:
            type:
              type: string
              description: The type of barcode.
              enum:
                - GENERATED
                - DEFINED
            value:
              type: string
              nullable: true
              description: If the barcode is defined then this is the value to assign to the Campaign. If dynamically generated then this should be empty or null.
            components:
              type: array
              uniqueItems: true
              minItems: 1
              description: It contains offer components values.
              items:
                title: Component
                type: object
                properties:
                  type:
                    type: string
                    description: It contains type value.
                  value:
                    type: string
                    description: It contains string value.
        custom:
          type: object
          additionalProperties:
            type: object
            description: It contains object of custom json values.
    campaignRelationEntity:
      type: object
      properties:
        campaign:
          type: array
          items:
            type: object
            properties:
              campaignId:
                type: string
                description: It contains the campaignId of the Campaign.
              dateCreated:
                type: string
                format: date-time
                example: "2017-01-17T13:20:48+00:00"
                description: This timestamp shows the date-time in UTC when the Campaign was created. It is dynamically populated and cannot be edited.
    campaignRelationshipsEntity:
      type: object
      nullable: true
      description: Campaign relations.
      properties:
        objective:
          type: object
          properties:
            campaign:
              $ref: '#/components/schemas/campaignRelationEntity/properties/campaign'
        promotion:
          type: object
          properties:
            campaign:
              $ref: '#/components/schemas/campaignRelationEntity/properties/campaign'
        entitlement:
          type: object
          properties:
            campaign:
              $ref: '#/components/schemas/campaignRelationEntity/properties/campaign'
    campaignsEntity:
      type: object
      properties:
        limit:
          type: integer
          description: Results per page.
        total:
          type: integer
          description: Total Results.
        offset:
          type: integer
          description: Offset.
        orderBy:
          type: array
          description: Order by criteria.
          items:
            type: object
            properties:
              name:
                type: string
                description: The sorting key.
              order:
                type: string
                description: The sorting direction.
        results:
          type: array
          items:
            $ref: '#/components/schemas/campaignEntity'
    tendersCollectionEntity:
      nullable: true
      type: array
      uniqueItems: true
      description: Qualification criteria based on the method of payment.
      items:
        type: object
        additionalProperties: false
        properties:
          bin:
            nullable: true
            type: string
            pattern: '^[0-9]{1,8}$'
            description: The Bank Identification Number.
          tenderType:
            type: string
            minLength: 1
            maxLength: 50
            description: The tender type name defined by Client.
    error400Entity:
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          type: string
          format: string
          description: Error Code
          example: ISF
          enum:
            - ICE
            # Internal Configuration Error
            - IR
            # Invalid Request Data
            - ISF
            # Invalid Schema format
            - U
            # Unknown error has occurred
            - ELE
            # Error when loading Monolog logger
        errorMessage:
          type: string
          format: string
          description: Human Friendly Error Message
      x-enum:
        - { errorCode: ICE, errorMessage: Internal Configuration Error }
        - { errorCode: IR, errorMessage: Invalid Request Data }
        - { errorCode: ISF, errorMessage: Invalid Schema format }
        - { errorCode: U, errorMessage: Unknown error has occurred }
        - { errorCode: ELE, errorMessage: Error when loading Monolog logger }
    error401Entity:
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          type: string
          format: string
          description: Error Code
          example: UN
          enum:
            - UN
            # Unauthenticated - Check the AUTH headers and the hash is formed correctly
            - CCE
            # Campaign Create Exception
            - CRN
            # Campaign Reference Not Unique
            - CUE
            # Campaign Update Exception
        errorMessage:
          type: string
          format: string
          description: Human Friendly Error Message
      x-enum:
        - { errorCode: UN, errorMessage: Unauthenticated - Check the AUTH headers and the hash is formed correctly }
        - { errorCode: CCE, errorMessage: Campaign Create Exception }
        - { errorCode: CRN, errorMessage: Campaign Reference Not Unique }
        - { errorCode: CUE, errorMessage: Campaign Update Exception }
    error403Entity:
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          type: string
          format: string
          description: Error Code
          example: P
          enum:
            - P
            # Caller unit hasn't privileges to access this unit
            - IPR
            # IP Address Rejected
        errorMessage:
          type: string
          format: string
          description: Human Friendly Error Message
      x-enum:
        - { errorCode: P, errorMessage: Caller unit hasn't privileges to access this unit }
        - { errorCode: IPR, errorMessage: IP Address Rejected }
    error404Entity:
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          type: string
          format: string
          description: Error Code
          example: CNF
          enum:
            - CNF
            # Campaign Not Found
            - ONF
            # Offers not found
        errorMessage:
          type: string
          format: string
          description: Human Friendly Error Message
      x-enum:
        - { errorCode: CNF, errorMessage: Campaign Not Found }
        - { errorCode: ONF, errorMessage: Offers not found }
    error405Entity:
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          type: string
          format: string
          description: Error Code
          example: MNA
          enum:
            - MNA
            # Method not allowed
        errorMessage:
          type: string
          format: string
          description: Human Friendly Error Message
      x-enum:
        - { errorCode: MNA, errorMessage: Method not allowed }
    InventoryListEntity:
      type: object
      properties:
        inventoryListId:
          type: string
          format: string
          nullable: false
          description: The EES AIR ID of the Inventory List.
          readOnly: true
        productsLocationIdentifier:
          type: string
          format: string
          nullable: false
          description: The Incoming Identifier of Unit containing the Inventory List products.
        type:
          type: string
          format: string
          nullable: false
          description: The Type of the Inventory List.
          enum:
            - EXCLUDE
        status:
          type: string
          format: string
          nullable: false
          description: The Status of the Inventory List.
          enum:
            - ACTIVE
            - SUSPENDED
        name:
          type: string
          format: string
          description: The Name of the Inventory List.
          nullable: false
        description:
          type: string
          format: string
          description: The Description of the Inventory List.
          nullable: false
        dateCreated:
          type: string
          format: ees-datetime
          nullable: false
          description: The Created Date-time (ATOM format) of the Inventory List.
          pattern: >-
            ^((((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00))\-02\-29|((19\d{2}|[2-9]\d{3})\-((0[13578]|1[02])\-31))|((19\d{2}|[2-9]\d{3})\-(0[13-9]|1[0-2])\-(29|30))|((19\d{2}|[2-9]\d{3})\-(0[1-9]|1[0-2])\-(0[1-9]|1[0-9]|2[0-8])))\T([01][0-9]\:[0-5][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9]\:[0-5][0-9]))(\+|\-)([01][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9])$
          readOnly: true
        lastUpdated:
          type: string
          format: ees-datetime
          nullable: false
          description: The Last updated Date-time (ATOM format) of the Inventory List.
          pattern: >-
            ^((((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00))\-02\-29|((19\d{2}|[2-9]\d{3})\-((0[13578]|1[02])\-31))|((19\d{2}|[2-9]\d{3})\-(0[13-9]|1[0-2])\-(29|30))|((19\d{2}|[2-9]\d{3})\-(0[1-9]|1[0-2])\-(0[1-9]|1[0-9]|2[0-8])))\T([01][0-9]\:[0-5][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9]\:[0-5][0-9]))(\+|\-)([01][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9])$
          readOnly: true
        collections:
          type: array
          items:
            type: object
            properties:
              locations:
                type: object
                properties:
                  excluded:
                    type: object
                    properties:
                      locationIdentifiers:
                        type: array
                        description: A list of excluded location identifiers.
                        items:
                          type: string
                      locationTags:
                        type: array
                        description: A list of excluded location tags.
                        items:
                          type: string
              products:
                type: object
                properties:
                  allRequired:
                    type: boolean
                    format: boolean
                    nullable: false
                    description: Flag to indicated if all excluded restriction should be applied together.
                    deprecated: true
                  excluded:
                    type: object
                    properties:
                      groups:
                        type: object
                        description: A list of excluded product groups.
                        nullable: true
                        properties:
                          key1:
                            type: array
                            items:
                              type: string
                              format: string
                          key2:
                            type: array
                            items:
                              type: string
                              format: string
                      items:
                        type: array
                        description: A list of excluded product items.
                        items:
                          type: string
                          format: string
                      skus:
                        type: array
                        description: A list of excluded product SKUs.
                        items:
                          type: string
                          format: string
                      tags:
                        type: array
                        description: A list of excluded product tags.
                        items:
                          type: string
                          format: string
        prerequisites:
          type: object
          properties:
            campaigns:
              type: object
              properties:
                campaignTypes:
                  type: array
                  description: A list of Campaign Types this Inventory List is applied to. If empty then it applies to all Campaign Types.
                  items:
                    type: string
                    format: string

      example:
        inventoryListId: '1172'
        productsLocationIdentifier: '4402'
        status: ACTIVE
        type: EXCLUDE
        name: My Inventory List
        description: A description of My Inventory List
        dateCreated: '2022-01-02T09:54:43+00:00'
        lastUpdated: '2022-03-09T13:20:17+00:00'
        collections:
          -
            locations:
              excluded:
                locationIdentifiers:
                  - 'store1'
                  - 'store2'
                locationTags:
                  - 'locationTag01'
            products:
              excluded:
                groups:
                  TYPE1:
                    - 'G100000001'
                    - 'G100000002'
                skus:
                  - 'P200000010'
                  - 'P200000012'
                tags:
                  - 'TAG16'
                  - 'TAG20'
        prerequisites:
          campaigns:
            campaignTypes:
              - 'STANDARD_NATIONAL'
    defaultErrorEntity:
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          type: string
          format: string
          description: EES AIR Error Code
          example: MPA
          enum:
            - NF
            # Not Found
            - IR
            # Invalid Request
            - U
            # Unknown Error
            - AF
            # Authorisation Failed
            - CE
            # Configuration Error
            - IPR
            # IP Address Rejected
            - MNA
            # Method Not Allowed
            - MPA
            # Missing Parameter
            - P
            # Privileges
            - AA
            # Invalid Access to API Method
            - IP
            # Invalid Parameter
            - IH
            # Invalid Header set
            - RF
            # Rollback Failure
        errorMessage:
          type: string
          format: string
          description: Human Friendly Error Message
          example: 'Missing Mandatory Request Parameter: `parameterName`'

        details:
          type: object
          description: This optional object might contain an additional details regarding this error
      x-enum:
        - { errorCode: NF, errorMessage: Not Found }
        - { errorCode: IR, errorMessage: Invalid Request }
        - { errorCode: U, errorMessage: Unknown Error }
        - { errorCode: AF, errorMessage: Authorisation Failed }
        - { errorCode: CE, errorMessage: Configuration Error }
        - { errorCode: IPR, errorMessage: IP Address Rejected }
        - { errorCode: MNA, errorMessage: Method Not Allowed }
        - { errorCode: MPA, errorMessage: Missing Parameter }
        - { errorCode: P, errorMessage: Privileges }
        - { errorCode: AA, errorMessage: Invalid Access to API Method }
        - { errorCode: IP, errorMessage: Invalid Parameter }
        - { errorCode: IH, errorMessage: Invalid Header set }
        - { errorCode: RF, errorMessage: Rollback Failure }
    ProductInventoryListEntity:
      type: object
      properties:
        sku:
          type: string
          format: string
          nullable: true
          description: Product SKU.
        upc:
          type: string
          format: string
          nullable: true
          description: Product UPC.
        name:
          type: string
          format: string
          nullable: false
          description: Product Name.
        description:
          type: string
          format: string
          nullable: false
          description: Product Description.
        image:
          type: string
          format: string
          nullable: false
          description: Product Image.
        supplierId:
          type: string
          format: string
          nullable: false
          description: Product Supplier ID.
        supplierName:
          type: string
          format: string
          nullable: false
          description: Product Supplier Name.
        brand:
          type: string
          format: string
          nullable: false
          description: Product Brand Name.
        brandType:
          type: string
          format: string
          nullable: false
          description: Product Brand Name.
        lastSoldDate:
          type: string
          format: ees-date-time
          nullable: true
          description: Product Last Sold Date-Time (ATOM format).
        tags:
          type: array
          description: List of Product tags.
          items:
            type: string
            format: string
        groups:
          type: array
          description: List of groups that the Product belongs to.
          items:
            type: object
            properties:
              reference:
                type: string
                format: string
                nullable: false
                description: The Product Group's Reference.
              groupReference:
                type: string
                format: string
                nullable: false
                description: The Product Group's Group Reference.
              name:
                type: string
                format: string
                nullable: false
                description: The Product Group's Name.
              primary:
                type: integer
                nullable: false
                description: The Product Group's Primary Value.
      example:
        name: EAGLE EYE TANGERINE
        description: EAGLE EYE ORANGES
        sku: null
        upc: '781302048531'
        image: ''
        supplierId: 'EE'
        supplierName: 'EAGLE EYE'
        brand: 'PURPLE CITRUS'
        brandType: 'EE VALUE'
        lastSoldDate: '2023-16-11T08:14:24+00:00'
        tags:
          - ACME
          - ADAL
          - AIMT
          - RDAL
          - SACG
          - SHGN
          - SNCA
          - SPRT
          - SSEA
          - SSPK
          - SWMA
        groups:
          - reference: 84-2
            group-reference: EE-84-2
            name: ORANGES
            primary: 1
          - reference: '84'
            group-reference: EE-84
            name: FRESH PRODUCE
            primary: 0
    PointsRewardBankEntity:
      type: object
      required: [ pointsRewardBankId, status, mode, reference, name, dateCreated, lastUpdated, exchangeLimit ]
      properties:
        pointsRewardBankId:
          type: string
          format: string
          nullable: false
          description: EES AIR Points Exchange Bank ID
        status:
          type: string
          format: string
          nullable: false
          description: Points Exchange Bank Status
          enum:
            - ACTIVE
            - INACTIVE
            - SUSPENDED
        mode:
          type: string
          format: string
          nullable: false
          description: >-
            Bank's mode&#58; `PERSONAL` - only nominated Consumers can see and exchange rewards from this Bank, (nominee list could change while running a Scheme and/or Reward Bank); `PUBLIC` - all Consumers could see and exchange rewards using this Reward Bank)
          enum:
            - PUBLIC
            - PERSONAL
        name:
          type: string
          format: string
          description: Bank Name
          nullable: false
        reference:
          type: string
          format: string
          nullable: false
          description: Points Exchange Bank External Reference
        dateCreated:
          type: string
          format: ees-datetime
          nullable: false
          description: Points Exchange Bank Created Date-time (ATOM format)
          pattern: >-
            ^((((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00))\-02\-29|((19\d{2}|[2-9]\d{3})\-((0[13578]|1[02])\-31))|((19\d{2}|[2-9]\d{3})\-(0[13-9]|1[0-2])\-(29|30))|((19\d{2}|[2-9]\d{3})\-(0[1-9]|1[0-2])\-(0[1-9]|1[0-9]|2[0-8])))\T([01][0-9]\:[0-5][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9]\:[0-5][0-9]))(\+|\-)([01][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9])$
        lastUpdated:
          type: string
          format: ees-datetime
          nullable: false
          description: Points Exchange Bank Last updated Date-time (ATOM format)
          pattern: >-
            ^((((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00))\-02\-29|((19\d{2}|[2-9]\d{3})\-((0[13578]|1[02])\-31))|((19\d{2}|[2-9]\d{3})\-(0[13-9]|1[0-2])\-(29|30))|((19\d{2}|[2-9]\d{3})\-(0[1-9]|1[0-2])\-(0[1-9]|1[0-9]|2[0-8])))\T([01][0-9]\:[0-5][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9]\:[0-5][0-9]))(\+|\-)([01][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9])$
        exchangeLimit:
          type: integer
          format: int32
          nullable: true
          description: Number of times a Wallet or Wallet Link can exchange rewards from this Bank
      example:
        pointsRewardBankId: '1172'
        status: ACTIVE
        mode: PUBLIC
        reference: '000001185'
        name: My Points Exchange Bank
        dateCreated: '2019-07-02T13:54:43+00:00'
        lastUpdated: '2020-03-09T13:20:17+00:00'
        exchangeLimit: 2
    PointsRewardBankRewardEntity:
      type: object
      required: [ pointsRewardBankRewardId, pointsRewardBankId, status, resourceType, resourceId, cost, threshold, dateCreated, lastUpdated ]
      properties:
        pointsRewardBankRewardId:
          type: string
          format: string
          nullable: false
          description: EES AIR Points Exchange Bank Reward ID
        pointsRewardBankId:
          type: string
          format: string
          nullable: false
          description: EES AIR Points Exchange Bank ID
        status:
          type: string
          format: string
          nullable: false
          description: Points Exchange Bank Reward Status
          enum:
            - ACTIVE
            - INACTIVE
            - SUSPENDED
        resourceType:
          type: string
          format: string
          description: Reward Type
          nullable: false
          enum:
            - CAMPAIGN
        resourceId:
          type: string
          format: string
          nullable: false
          description: EES AIR Resource ID of what is the reward. This cannot be the same ID as an existing reward from this Bank.
        cost:
          type: integer
          format: int32
          nullable: false
          description: Reward cost (in Points)
        threshold:
          type: integer
          format: int32
          nullable: false
          description: Reward threshold (in Points). If this is not provided then the cost is used as the threshold.
        dateCreated:
          type: string
          format: ees-datetime
          nullable: false
          description: Points Exchange Bank Reward Created Date-time
          pattern: >-
            ^((((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00))\-02\-29|((19\d{2}|[2-9]\d{3})\-((0[13578]|1[02])\-31))|((19\d{2}|[2-9]\d{3})\-(0[13-9]|1[0-2])\-(29|30))|((19\d{2}|[2-9]\d{3})\-(0[1-9]|1[0-2])\-(0[1-9]|1[0-9]|2[0-8])))\T([01][0-9]\:[0-5][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9]\:[0-5][0-9]))(\+|\-)([01][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9])$
        lastUpdated:
          type: string
          format: ees-datetime
          nullable: false
          description: Points Exchange Bank Reward Last updated Date-time
          pattern: >-
            ^((((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00))\-02\-29|((19\d{2}|[2-9]\d{3})\-((0[13578]|1[02])\-31))|((19\d{2}|[2-9]\d{3})\-(0[13-9]|1[0-2])\-(29|30))|((19\d{2}|[2-9]\d{3})\-(0[1-9]|1[0-2])\-(0[1-9]|1[0-9]|2[0-8])))\T([01][0-9]\:[0-5][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9]\:[0-5][0-9]))(\+|\-)([01][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9])$
      example:
        rewardId: "1"
        bankId: "1172"
        status: ACTIVE
        resourceType: CAMPAIGN
        resourceId: "1749"
        cost: 100
        threshold: 100
        dateCreated: '2019-07-02T13:54:43+00:00'
        lastUpdated: '2019-07-02T13:54:43+00:00'
    tokenFormatEntity:
      type: object
      properties:
        id:
          type: integer
          description: The id of a token format automatically generated and unique within Eagle Eye AIR.
          example: 1000
        name:
          type: string
          description: The name of the token format.
          example: 'Example Token Format'
        safeName:
          type: string
          description: a unique reference for the token format
          example: "000001000"
        details:
          type: object
          properties:
            checksum:
              type: boolean
              description: Whether this token format uses checksum to self-validate.
              example: false
            format:
              type: string
              description: >-
                The format that is acceptable for a valid token. The following characters should be used to write the format: <br>
                # : Digit 0-9 <br>
                ~ : Digits 1-9 <br>
                A : Uppercase Letter <br>
                - : Hyphen <br>
                X : Uppercase Letter excl. I & O <br>
                * : Alphanumeric <br>
                ^ : Alphanumeric excl. I & O
              example: '########'
            length:
              type: integer
              description: The length of a valid token.
              example: 11
            prefix:
              type: string
              nullable: true
              description: Characters that prefix every token of this format.
              example: 'NS'
            suffix:
              type: string
              nullable: true
              description: Characters that suffix every token of this format.
              example: 'X'
    unitEntity:
      type: object
      properties:
        name:
          type: string
          description: The name of the unit.
          example: "Unit name"
        safeName:
          type: string
          description: A unique reference for the unit.
          example: "unitName-unitStore"
        type:
          type: string
          description: The type of the unit.
          enum:
            - COMPANY
            - OUTLET
        typeResponse:
          type: string
          description: The type of the unit.
          enum:
            - COMPANY
            - DEPARTMENT
            - GROUP
            - OUTLET
            - SUPPLIER
        status:
          type: string
          description: The status of the unit.
          enum:
            - ACTIVE
            - INACTIVE
        reference:
          type: string
          description: The external reference for the unit.
          example: "00000123"
        incomingIdentifier:
          type: string
          description: EES AIR Incoming Identifier of the unit.
          example: "unitStore"
        outgoingIdentifier:
          type: string
          description: EES AIR Outgoing Identifier of the unit.
          example: "unitStore"
        tags:
          type: array
          description: The tags applying to the unit.
          items:
            type: string
          example: ["deli", "fruit"]
        timezones:
          type: object
          description: The timezone properties of the unit.
          properties:
            default:
              type: string
              description: The default timezone of the unit.
              example: "Europe/London"
        parentUnitId:
          type: string
          description: The Id of the parent unit, this will be added as a unit relation for this unit.
          example: "1234"
        id:
          type: string
          description: The id of the unit, automatically generated and unique within Eagle Eye AIR.
          example: "1234"
        unitRelations:
          type: array
          description: The list of the units this unit is related to as well as their relation type.
          items:
            type: object
            properties:
              unitRelatedId:
                type: string
                description: The ID of the related unit.
                example: "5"
              relationType:
                type: string
                description: The relation type between the unit and the related unit.
                enum:
                  - PARENT
                  - REDEMPTION_PARTNER
                  - ISSUANCE_PARTNER
                  - GUARDIAN
                  - PROVIDER
        security:
          type: object
          description: The security related properties of the created unit
          properties:
            unitCredentials:
              type: array
              description: The list of the unit credentials of the created unit.
              items:
                $ref: '#/components/schemas/unitCredentials'
        posConnect:
          type: object
          description: The POS Connect configuration details of the created unit.
        walletConfig:
          type: object
          description: The wallet configuration details of the created unit.
        unitCodeProviders:
          type: array
          description: A list of all the code provider IDs added to this unit.
          uniqueItems: true
          items:
            type: integer
            example: 4
        tiers:
          type: object
          description: Options for the unit tiers configuration for the created unit.
          nullable: true
          properties:
            enabled:
              type: boolean
              description: Flag indicating if tiers processing is enabled for the created unit.
            mode:
              type: string
              description: Indicates the tiers processing mode for the created unit.
              enum:
                - INDIVIDUAL
                - HOUSEHOLD
              example: "INDIVIDUAL"
            baseEarn:
              type: boolean
              description: Flag indicating if tiers processing is enabled for base earn for the created unit.
    unitFileTransferConfigEntity:
      type: object
      properties:
        key:
          type: string
          description: >-
            A PEM encoded public key file, to be used when accessing the created SFTP account. 
            The public key is prefixed with a "-----BEGIN PUBLIC KEY-----" line and postfixed with an "-----END PUBLIC KEY-----".
            New lines should be replaced with \n.
          example: "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDUduu6cQ2bqe1sEGS2rSAMuc9e\nLBfK8vw0IzFTbTJfCXkIIwQ7i0zGcKQYpcCLm0dxu0FyyrAK3+y9Hv52DlDKqODa\n89R1GX0LSq4XC1/av13cfgjO7QgIGR7R7pmLVkmhp6YH0tkEG+a5i3Hf7WjjZfTC\nDJRHLBDWaDc8BFgSgQIDAQAB\n-----END PUBLIC KEY-----"
        username:
          type: string
          description: Username used to log in to file transfer service.
          example: "uk_yourcompany_client_primary_A89KQP"
        hostname:
          type: string
          description: Hostname used to log in to file transfer service.
          example: "files.production.uk.eagleeye.com"
    unitCredentials:
      type: object
      description: A set of credentials available for the user.
      properties:
        name:
          type: string
          description: The name of the stored credentials.
          example: "api"
        clientId:
          type: string
          description: The clientId for the credentials.
          example: "exampleId"
        secret:
          type: string
          description: The secret for the credentials.
          example: "exampleSecret"
        status:
          type: string
          description: The status of the unit credentials.
          example: "ACTIVE"
        locked:
          type: string
          description: Flag that describes if the credentials are currently locked or usable.
          example: "Y"
        dateCreated:
          description: Date these credentials were created.
          type: string
          format: date-time
        lastUpdated:
          description: Date these credentials were last updated.
          type: string
          format: date-time

    unitPostRequestEntity:
      type: object
      required:
        - name
        - incomingIdentifier
        - type
        - status
        - parentUnitId
      properties:
        name:
          $ref: '#/components/schemas/unitEntity/properties/name'
        incomingIdentifier:
          $ref: '#/components/schemas/unitEntity/properties/incomingIdentifier'
        outgoingIdentifier:
          $ref: '#/components/schemas/unitEntity/properties/outgoingIdentifier'
        type:
          $ref: '#/components/schemas/unitEntity/properties/type'
        status:
          $ref: '#/components/schemas/unitEntity/properties/status'
        tags:
          $ref: '#/components/schemas/unitEntity/properties/tags'
        parentUnitId:
          $ref: '#/components/schemas/unitEntity/properties/parentUnitId'
        reference:
          $ref: '#/components/schemas/unitEntity/properties/reference'
        timezones:
          $ref: '#/components/schemas/unitEntity/properties/timezones'

    unitPatchRequestEntity:
      type: object
      minItems: 1
      properties:
        name:
          $ref: '#/components/schemas/unitEntity/properties/name'
        status:
          $ref: '#/components/schemas/unitEntity/properties/status'
        tags:
          $ref: '#/components/schemas/unitEntity/properties/tags'
        timezones:
          $ref: '#/components/schemas/unitEntity/properties/timezones'

    unitResponseEntity:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/unitEntity/properties/id'
        name:
          $ref: '#/components/schemas/unitEntity/properties/name'
        safeName:
          $ref: '#/components/schemas/unitEntity/properties/safeName'
        type:
          $ref: '#/components/schemas/unitEntity/properties/typeResponse'
        unitRelations:
          $ref: '#/components/schemas/unitEntity/properties/unitRelations'
        status:
          $ref: '#/components/schemas/unitEntity/properties/status'
        reference:
          $ref: '#/components/schemas/unitEntity/properties/reference'
        tags:
          $ref: '#/components/schemas/unitEntity/properties/tags'
        incomingIdentifier:
          $ref: '#/components/schemas/unitEntity/properties/incomingIdentifier'
        outgoingIdentifier:
          $ref: '#/components/schemas/unitEntity/properties/outgoingIdentifier'
        timezones:
          $ref: '#/components/schemas/unitEntity/properties/timezones'

    unitPostResponseEntity:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/unitEntity/properties/id'
        name:
          $ref: '#/components/schemas/unitEntity/properties/name'
        safeName:
          $ref: '#/components/schemas/unitEntity/properties/safeName'
        type:
          $ref: '#/components/schemas/unitEntity/properties/type'
        unitRelations:
          $ref: '#/components/schemas/unitEntity/properties/unitRelations'
        status:
          $ref: '#/components/schemas/unitEntity/properties/status'
        reference:
          $ref: '#/components/schemas/unitEntity/properties/reference'
        tags:
          $ref: '#/components/schemas/unitEntity/properties/tags'
        incomingIdentifier:
          $ref: '#/components/schemas/unitEntity/properties/incomingIdentifier'
        outgoingIdentifier:
          $ref: '#/components/schemas/unitEntity/properties/outgoingIdentifier'
        timezones:
          $ref: '#/components/schemas/unitEntity/properties/timezones'

    unitFileTransferConfigResponseEntity:
      type: object
      properties:
        username:
          $ref: '#/components/schemas/unitFileTransferConfigEntity/properties/username'
        hostname:
          $ref: '#/components/schemas/unitFileTransferConfigEntity/properties/hostname'

    unitFileTransferConfigPatchRequestEntity:
      type: object
      required:
        - key
      properties:
        key:
          $ref: '#/components/schemas/unitFileTransferConfigEntity/properties/key'

    unitFileTransferConfigPostRequestEntity:
      type: object
      required:
        - key
      properties:
        key:
          $ref: '#/components/schemas/unitFileTransferConfigEntity/properties/key'

    unitsSearchResponseEntity:
      type: object
      properties:
        offset:
          type: integer
          description: The number of units skipped when returning the data.
          minimum: 0
          example: 0
        limit:
          type: integer
          description: The number of units limited in the results, up to a maximum of 100.
          minimum: 0
          maximum: 100
          example: 50
        total:
          type: integer
          description: The total number of units matching your search.
          minimum: 0
          example: 1
        orderBy:
          type: array
          description: How the results from your search were ordered.
          items:
            type: object
            properties:
              name:
                type: string
                description: What column is being used to order.
                example: 'id'
              order:
                type: string
                description: Whether the results are ordered ascending or descending.
                enum:
                  - ASC
                  - DESC
                example: 'ASC'
        results:
          type: array
          description: The list of units that match your search.
          items:
            $ref: '#/components/schemas/unitResponseEntity'

    servicesUnitPostRequestEntity:
      type: object
      required:
        - name
        - incomingIdentifier
      properties:
        name:
          $ref: '#/components/schemas/unitEntity/properties/name'
        incomingIdentifier:
          $ref: '#/components/schemas/unitEntity/properties/incomingIdentifier'
        outgoingIdentifier:
          $ref: '#/components/schemas/unitEntity/properties/outgoingIdentifier'
        tags:
          $ref: '#/components/schemas/unitEntity/properties/tags'
        reference:
          $ref: '#/components/schemas/unitEntity/properties/reference'
        timezones:
          $ref: '#/components/schemas/unitEntity/properties/timezones'
        options:
          type: object
          description: Additional options for the created unit.
          properties:
            posConnect:
              type: object
              description: Options for the POS Connect configuration for the created unit.
              properties:
                mode:
                  type: string
                  description: The POS Connect configuration template to be added to the created unit.
                  example: 'CUSTOMERWINS'
            walletConfig:
              type: object
              description: Options for the wallet configuration for the created unit.
              properties:
                mode:
                  type: array
                  description: The wallet configuration template to be added to the created unit.
                  uniqueItems: true
                  items:
                    enum:
                      - CONSUMER
                      - HOUSEHOLD
            tiers:
              allOf:
                - required:
                  - enabled
                  - mode
                - $ref: '#/components/schemas/unitEntity/properties/tiers'

    servicesUnitPostResponseEntity:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/unitEntity/properties/id'
        name:
          $ref: '#/components/schemas/unitEntity/properties/name'
        safeName:
          $ref: '#/components/schemas/unitEntity/properties/safeName'
        type:
          $ref: '#/components/schemas/unitEntity/properties/type'
        status:
          $ref: '#/components/schemas/unitEntity/properties/status'
        reference:
          $ref: '#/components/schemas/unitEntity/properties/reference'
        tags:
          $ref: '#/components/schemas/unitEntity/properties/tags'
        incomingIdentifier:
          $ref: '#/components/schemas/unitEntity/properties/incomingIdentifier'
        outgoingIdentifier:
          $ref: '#/components/schemas/unitEntity/properties/outgoingIdentifier'
        timezones:
          $ref: '#/components/schemas/unitEntity/properties/timezones'
        unitCodeProviders:
          $ref: '#/components/schemas/unitEntity/properties/unitCodeProviders'
        posConnect:
          $ref: '#/components/schemas/unitEntity/properties/posConnect'
        security:
          $ref: '#/components/schemas/unitEntity/properties/security'
        walletConfig:
          $ref: '#/components/schemas/unitEntity/properties/walletConfig'
        tiers:
          allOf:
            - $ref: '#/components/schemas/unitEntity/properties/tiers'
            - properties:
                campaign:
                  type: boolean
                  description: Flag indicating if tiers processing is enabled for campaigns for the created unit.

    programmeEntity:
      type: object
      properties:
        id:
          type: integer
          description: The id of a Programme automatically generated and unique within Eagle Eye AIR.
        type:
          type: string
          description: The Programme type.
          enum:
            - DEBIT
            - VOUCHER
            - PLASTIC
        status:
          type: string
          description: The status of the Programme.
          enum:
            - ACTIVE
            - INACTIVE
            - EXPIRED
            - PENDING
            - DRAFT
            - REJECTED
            - READY
            - STOPPED
            - SUSPENDED
        reference:
          type: string
          description: The reference of the Programme. Once set this cannot be changed.
        details:
          type: object
          properties:
            name:
              type: string
              description: The name of the Programme.
            description:
              type: string
              nullable: true
              description: The description of the Programme.
            startDate:
              type: string
              format: date-time
              description: When the Programme starts.
            endDate:
              type: string
              format: date-time
              description: When the Programme ends.
            tags:
              type: array
              nullable: true
              description: The tags applying to the Programme.
              items:
                type: string
          required:
            - name
            - startDate
            - endDate
        settings:
          type: object
          properties:
            tokenProvider:
              type: string
              nullable: true
            tokenFormat:
              type: string
              nullable: true
            cardNumber:
              type: object
              properties:
                bin:
                  type: integer
                  nullable: true
                scheme:
                  type: integer
                  nullable: true
              required:
                - bin
                - scheme
            accountClientType:
              type: string
              nullable: true
            defaultAccountClientState:
              type: string
              nullable: true
            passphrase:
              type: boolean
            refreshToken:
              type: boolean
            currency:
              type: string
              nullable: true
        partners:
          type: object
          properties:
            creation:
              type: array
              items:
                type: object
                properties:
                  partner:
                    type: string
                required:
                  - partner
            redemption:
              type: array
              items:
                type: object
                properties:
                  partner:
                    type: string
                required:
                  - partner
        rules:
          type: object
          properties:
            expiry:
              type: object
              description: The expiry rule for the programme. Depending on the type selected, the property `date` or `value` may be required.
              oneOf:
                - properties:
                    type:
                      type: string
                      enum:
                        - NEVER
                  required:
                    - type
                - properties:
                    type:
                      type: string
                      enum:
                        - SET_DATE
                    date:
                      type: string
                      format: date-time
                  required:
                    - type
                    - date
                - properties:
                    type:
                      type: string
                      enum:
                        - DAYS_AFTER_CREATION
                        - DAYS_AFTER_ACTIVATION
                        - ROLLING_DAYS
                    value:
                      type: integer
                  required:
                    - type
                    - value
            balances:
              type: object
              properties:
                maxBalance:
                  type: integer
                  nullable: true
                minLoadAmount:
                  type: integer
                  nullable: true
                maxLoadAmount:
                  type: integer
                  nullable: true
                maxDebitAmount:
                  type: integer
                  nullable: true
            redemption:
              type: object
              properties:
                couponLimit:
                  type: integer
                  description: The number of redemptions allowed. A value of zero is unlimited.
            storeRestrictions:
              type: object
              nullable: true
              additionalProperties:
                pattern: '^[\\S]+$'
                type: object
                description: You can define store restrictions by adding one or more banner location identifiers with this object structure
                properties:
                  included:
                    type: object
                    properties:
                      locationIdentifiers:
                        type: object
                        nullable: true
                        description: If all outlets under the parent banner are included, then set this property to null. Otherwise the property value is the banner location identifier.
                        additionalProperties:
                          pattern: '^[\\S]+$'
                          type: array
                          uniqueItems: true
                          minItems: 1
                          description: Outlet store location identifiers.
                          items:
                            type: string
                    required:
                      - locationIdentifiers
                required:
                  - included
        dateCreated:
          description: Date the Programme was created.
          type: string
          format: date-time
        lastUpdated:
          description: Date the Programme was last updated.
          type: string
          format: date-time

    programmePostPutRequestEntity:
      type: object
      required:
        - type
        - status
        - details
      properties:
        type:
          $ref: '#/components/schemas/programmeEntity/properties/type'
        status:
          $ref: '#/components/schemas/programmeEntity/properties/status'
        reference:
          $ref: '#/components/schemas/programmeEntity/properties/reference'
        details:
          $ref: '#/components/schemas/programmeEntity/properties/details'
        settings:
          $ref: '#/components/schemas/programmeEntity/properties/settings'
        partners:
          $ref: '#/components/schemas/programmeEntity/properties/partners'
        rules:
          $ref: '#/components/schemas/programmeEntity/properties/rules'

    programmesResponseEntity:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/programmeEntity/properties/id'
        type:
          $ref: '#/components/schemas/programmeEntity/properties/type'
        status:
          $ref: '#/components/schemas/programmeEntity/properties/status'
        reference:
          $ref: '#/components/schemas/programmeEntity/properties/reference'
        details:
          $ref: '#/components/schemas/programmeEntity/properties/details'
        settings:
          $ref: '#/components/schemas/programmeEntity/properties/settings'
        partners:
          $ref: '#/components/schemas/programmeEntity/properties/partners'
        rules:
          $ref: '#/components/schemas/programmeEntity/properties/rules'
        dateCreated:
          $ref: '#/components/schemas/programmeEntity/properties/dateCreated'
        lastUpdated:
          $ref: '#/components/schemas/programmeEntity/properties/lastUpdated'
      example:
        id: '1001'
        type: 'STANDARD'
        status: 'ACTIVE'
        reference: 'TestReference'
        details:
          name: 'Test Programme'
          description: 'Test Description'
          startDate: '2025-07-01 00:00:00'
          endDate: '9999-12-31 00:59:59'
          tags:
            - 'test'
        settings:
          tokenProvider: 'EES'
          tokenFormat: '8Digits'
          cardNumber:
            bin: 123456
            scheme: 12
          accountClientType: 'BASIC'
          defaultAccountClientState: 'BASIC'
          passphrase: true
          refreshToken: true
          currency: 'GBP'
        partners:
          creation:
            - partner: '123'
          redemption:
            - partner: '124'
        rules:
          expiry:
            type: 'DAYS_AFTER_ACTIVATION'
            date: null,
            value: 50
          balances:
            maxBalance: 10000
            minLoadAmount: 1
            maxLoadAmount: 1000
            maxDebitAmount: 1000
          redemption:
            couponLimit: 0
          storeRestrictions:
            banner1:
              included:
                locationIdentifiers: null
            banner2:
              included:
                locationIdentifiers:
                  banner2:
                    - 'outlet1'
        dateCreated: '2025-05-09 15:47:58'
        lastUpdated: '2025-06-12 13:30:19'

    programmesSearchResponseEntity:
      type: object
      properties:
        offset:
          type: integer
          description: The number of Programmes skipped when returning the data.
          minimum: 0
          example: 0
        limit:
          type: integer
          description: The number of Programmes limited in the results, up to a maximum of 100.
          minimum: 0
          maximum: 100
          example: 50
        total:
          type: integer
          description: The total number of Programmes matching your search.
          minimum: 0
          example: 1
        orderBy:
          type: array
          description: How the results from your search were ordered.
          items:
            type: object
            properties:
              name:
                type: string
                description: What column is being used to order.
                example: 'id'
              order:
                type: string
                description: Whether the results are ordered ascending or descending.
                enum:
                  - ASC
                  - DESC
                example: 'ASC'
        results:
          type: array
          description: The list of Programmes that match your search.
          items:
            $ref: '#/components/schemas/programmesResponseEntity'

    tierEntity:
      type: object
      properties:
        id:
          type: integer
          description: The id of a Loyalty Tier automatically generated and unique within Eagle Eye AIR.
        type:
          type: string
          description: The Loyalty Tier type.
          enum:
            - STANDARD
        status:
          type: string
          description: The status of the Loyalty Tier.
          enum:
            - ACTIVE
        reference:
          type: string
          description: The reference of the Loyalty Tier.
        details:
          type: object
          properties:
            name:
              type: string
              description: The name of the Loyalty Tier.
            schemeId:
              type: string
              description: The ID of the Scheme the Loyalty Tier belongs to.
            isDefault:
              type: boolean
              description: If true the Loyalty Tier is the default Tier a new Scheme Account will join.
        settings:
          $ref: '#/components/schemas/tierSettings'
        dateCreated:
          description: Date the Loyalty Tier was created.
          type: string
          format: date-time
        lastUpdated:
          description: Date the Loyalty Tier was last updated.
          type: string
          format: date-time

    tierSettings:
      type: object
      properties:
        schemeOverrides:
          $ref: '#/components/schemas/tierSchemeOverrides'
        promotion:
          type: object
          properties:
            promotionTierId:
              type: string
              nullable: true
              description: The ID of the Loyalty Tier the current Tier promotes to.
            ruleSets:
              type: array
              description: The sets of rules which allow promotion to another Loyalty Tier.
              items:
                $ref: '#/components/schemas/tierRuleSets'
        demotion:
          type: object
          properties:
            demotionTierId:
              type: string
              nullable: true
              description: The ID of the Loyalty Tier the current Tier demotes to.
            balanceResetPeriod:
              $ref: '#/components/schemas/tierResetPeriod'
            membershipExpiryPeriod:
              $ref: '#/components/schemas/tierResetPeriod'

    tierResetPeriod:
      type: object
      properties:
        periodOffset:
          type: object
          nullable: true
          description: The amount of time between Tier periods.
          properties:
            periods:
              type: integer
            periodType:
              type: string
              enum:
                - DAY
                - WEEK
                - MONTH
                - YEAR
          required:
            - periods
            - periodType
        roundingRule:
          type: string
          nullable: true
          enum:
            - endOfMonth
            - endOfQuarter
            - endOfHalf
            - endOfYear
          description: The rounding rule to follow when calculating Tier periods.

    tierRuleSets:
      type: object
      properties:
        rules:
          type: array
          description: The Rules which must all be satisfied for this Ruleset to qualify for promotion.
          items:
            $ref: '#/components/schemas/tierRule'

    tierRule:
      type: object
      properties:
        amount:
          type: integer
        balanceType:
          type: string
          enum:
            - POINTS
            - SPEND
            - TRANSACTIONS

    tierSchemeOverrides:
      type: object
      properties:
        earnRates:
          type: object
          nullable: true
          description: >-
            Points spend rates for the Tier. The property keys of this object are the unit safe name for the 
            default/parent unit and the incoming identifiers for any child units.
          additionalProperties:
            type: object
            pattern: '^[\\S]+$'
            properties:
              default:
                $ref: '#/components/schemas/tierEarnRate'
            required:
              - default
            additionalProperties:
              type: object
              pattern: '^[\\S]+$'
              $ref: '#/components/schemas/tierEarnRate'
        expiryPoints:
          allOf:
            - $ref: '#/components/schemas/expiryPoints'
            - properties:
                rule:
                  oneOf:
                    - properties:
                        type:
                          type: string
                          enum:
                            - NEVEREXPIRE
                      required:
                        - type


    expiryPoints:
      type: object
      properties:
        enabled:
          type: boolean
        rule:
          type: object
          oneOf:
            - properties:
                type:
                  type: string
                  enum:
                    - SETDATE
                date:
                  type: string
                  format: date-time
              required:
                - type
                - date
            - properties:
                type:
                  type: string
                  enum:
                    - CUTOFFDATE
                periodCount:
                  type: integer
                periodType:
                  type: string
                  enum:
                    - MONTH
                    - DAY
                    - HOUR
                    - MINUTE
                    - SECOND
                rounding:
                  type: string
                  enum:
                    - YEAREND
                    - MONTHEND
                    - ABSOLUTE
              required:
                - type
                - periodCount
                - periodType
                - rounding
            - properties:
                type:
                  type: string
                  enum:
                    - ACTIVITY
                periodCount:
                  type: integer
                periodType:
                  type: string
                  enum:
                    - MONTH
                    - DAY
                    - HOUR
                    - MINUTE
                    - SECOND
                activityParameters:
                  type: object
                  oneOf:
                    - properties:
                        walletTransactions:
                          type: object
                          properties:
                            enabled:
                              type: boolean
                            walletTransactionTypes:
                              type: array
                              items:
                                type: string
                          required:
                            - enabled
                      required:
                        - walletTransactions
                    - properties:
                        tierMembershipTransactions:
                          type: object
                          properties:
                            enabled:
                              type: boolean
                            tierMembershipTransactionTypes:
                              type: array
                              items:
                                type: string
                          required:
                            - enabled
                      required:
                        - tierMembershipTransactions
              required:
                - type
                - periodCount
                - periodType
                - activityParameters

    tierEarnRate:
      type: object
      properties:
        description:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        product:
          type: object
          nullable: true
          properties:
            productName:
              type: string
            overrideName:
              type: string
              minLength: 1
              maxLength: 255
            unitSafeName:
              type: string
              minLength: 1
              maxLength: 255
            product:
              $ref: '#/components/schemas/productEntity'
          required:
            - productName
            - overrideName
            - unitSafeName
        rates:
          type: array
          minItems: 1
          items:
            type: object
            properties:
              amount:
                type: integer
              bonus:
                type: integer
                nullable: true
              ceiling:
                type: integer
                nullable: true
              floor:
                type: integer
                nullable: true
              offset:
                type: integer
                nullable: true
              step:
                type: integer
                nullable: true
            required:
              - amount
        reference:
          type: string
          nullable: true
        type:
          type: string
        roundPoints:
          type: object
          properties:
            active:
              type: boolean
            toMultipleOf:
              type: integer
              minimum: 0
          required:
            - active
            - toMultipleOf
        complementaryRates:
          type: array
          items:
            type: string
        decider:
          type: string
          enum:
            - SPEND
            - UNITS
            - TOTAL
            - QUALIFICATION
        maximumQuantityPerProduct:
          type: integer

    tierPostRequestEntity:
      type: object
      required:
        - type
        - details
        - status
      properties:
        type:
          $ref: '#/components/schemas/tierEntity/properties/type'
        status:
          $ref: '#/components/schemas/tierEntity/properties/status'
        reference:
          $ref: '#/components/schemas/tierEntity/properties/reference'
        details:
          $ref: '#/components/schemas/tierEntity/properties/details'
        settings:
          $ref: '#/components/schemas/tierEntity/properties/settings'

    tierPutRequestEntity:
      type: object
      required:
        - type
        - details
        - status
      properties:
        type:
          $ref: '#/components/schemas/tierEntity/properties/type'
        status:
          $ref: '#/components/schemas/tierEntity/properties/status'
        details:
          $ref: '#/components/schemas/tierEntity/properties/details'
        settings:
          $ref: '#/components/schemas/tierEntity/properties/settings'

    tierResponseEntity:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/tierEntity/properties/id'
        type:
          $ref: '#/components/schemas/tierEntity/properties/type'
        status:
          $ref: '#/components/schemas/tierEntity/properties/status'
        reference:
          $ref: '#/components/schemas/tierEntity/properties/reference'
        details:
          $ref: '#/components/schemas/tierEntity/properties/details'
        settings:
          $ref: '#/components/schemas/tierEntity/properties/settings'
        dateCreated:
          $ref: '#/components/schemas/tierEntity/properties/dateCreated'
        lastUpdated:
          $ref: '#/components/schemas/tierEntity/properties/lastUpdated'
      example:
        id: '1001'
        type: 'STANDARD'
        status: 'ACTIVE'
        details:
          name: 'Tier 1'
          schemeId: '1234'
          isDefault: false
        settings:
          schemeOverrides:
            earnRates:
              TestUnitSafeName:
                default:
                  description: null
                  name: null
                  product: null
                  rates:
                    - amount: 2
                      bonus: null
                      ceiling: null
                      floor: null
                      offset: 0
                      step: 1
                  reference: null
                  roundPoints:
                    active: false
                    toMultipleOf: 1
                  type: 'STANDARD'
            redemptionRates:
              TestUnitSafeName:
                - bonus: 0
                  ceiling: 5000
                  floor: 1
                  pointsBack: 0
                  rate: 10
                  step: 2
            expiryPoints:
              enabled: true
              rule:
                periodCount: 31
                periodType: 'DAY'
                rounding: 'ABSOLUTE'
                type: 'CUTOFFDATE'
          promotion:
            promotionTierId: '110'
            ruleSets:
              - rules:
                  - amount: 100
                    balanceType: 'POINTS'
          demotion:
            demotionTierId: '101'
            balanceResetPeriod:
              periodOffset:
                periodType: 'MONTH'
                periods: 3
              roundingRule: 'endOfMonth'
            membershipExpiryPeriod:
              periodOffset:
                periodType: 'MONTH'
                periods: 6
              roundingRule: 'endOfQuarter'

    tiersSearchResponseEntity:
      type: object
      properties:
        offset:
          type: integer
          description: The number of Loyalty Tiers skipped when returning the data.
          minimum: 0
          example: 0
        limit:
          type: integer
          description: The number of Loyalty Tiers limited in the results, up to a maximum of 100.
          minimum: 0
          maximum: 100
          example: 50
        total:
          type: integer
          description: The total number of LoyaltyTiers matching your search.
          minimum: 0
          example: 1
        orderBy:
          type: array
          description: How the results from your search were ordered.
          items:
            type: object
            properties:
              name:
                type: string
                description: What column is being used to order.
                example: 'id'
              order:
                type: string
                description: Whether the results are ordered ascending or descending.
                enum:
                  - ASC
                  - DESC
                example: 'ASC'
        results:
          type: array
          description: The list of Loyalty Tiers that match your search.
          items:
            $ref: '#/components/schemas/tierResponseEntity'

    tokenFormatSearch:
      type: object
      properties:
        offset:
          type: integer
          description: The number of Token Formats skipped when returning the data.
          minimum: 0
          example: 0
        limit:
          type: integer
          description: The number of Token Formats limited in the results, up to a maximum of 100.
          minimum: 0
          maximum: 100
          example: 50
        total:
          type: integer
          description: The total number of token formats matching your search.
          minimum: 0
          example: 1
        orderBy:
          type: array
          description: How to order the results returned from your search.
          items:
            type: object
            properties:
              name:
                type: string
                description: What column is being used to order.
                example: 'id'
              order:
                type: string
                description: Whether the results are ordered ascending or descending.
                enum:
                  - ASC
                  - DESC
                example: 'ASC'
        results:
          type: array
          description: The list of token formats that match your search.
          items:
            $ref: '#/components/schemas/tokenFormatEntity'

    productEntity:
      type: object
      nullable: true
      pattern: '^[\S]*$'
      description: Base earn product restrictions that apply to base earn rates so that points can only be rewarded when product rules are met.
      properties:
        logicalOperator:
          type: string
          enum:
            - AND
            - OR
          description: The "OR" or "AND" operator defining how to compare the Product lists.
        collections:
          type: array
          description: It contains the product lists for a particular rule.
          items:
            type: object
            pattern: '^[\\S]+$'
            properties:
              products:
                type: object
                properties:
                  allRequired:
                    type: boolean
                    description: A flag to determine if all the products defined must be present or not.
                  included:
                    type: object
                    nullable: true
                    properties:
                      items:
                        type: array
                        nullable: true
                        description: List of all the valid product `UPC`s for the collection.
                        items:
                          type: string
                      groups:
                        type: object
                        nullable: true
                        description: List of all the valid product groups for the collection.
                      skus:
                        type: array
                        nullable: true
                        description: List of all the valid product `SKU`s for the collection.
                        items:
                          type: string
                      tags:
                        type: array
                        nullable: true
                        description: List of all the valid product tags for the collection.
                        items:
                          type: string
                  excluded:
                    type: object
                    nullable: true
                    properties:
                      items:
                        type: array
                        nullable: true
                        description: List of all the excluded product `UPC`s for the collection.
                        items:
                          type: string
                      groups:
                        type: object
                        nullable: true
                        description: List of all the excluded product groups for the collection.
                      skus:
                        type: array
                        nullable: true
                        description: List of all the excluded product SKUs for the collection.
                        items:
                          type: string
                      tags:
                        type: array
                        nullable: true
                        description: List of all the excluded product tags for the collection.
                        items:
                          type: string

    burnRateProductEntity:
      type: object
      nullable: true
      pattern: '^[\S]*$'
      description: Spending product restrictions that apply to redemption of points.
      properties:
        collections:
          type: array
          nullable: true
          description: It contains the product lists for a particular rule.
          items:
            type: object
            pattern: '^[\\S]+$'
            properties:
              products:
                type: object
                properties:
                  included:
                    $ref: '#/components/schemas/productEntity/properties/collections/items/properties/products/properties/included'
                  excluded:
                    $ref: '#/components/schemas/productEntity/properties/collections/items/properties/products/properties/excluded'

    burnRatesEntity:
      type: object
      properties:
        bonus:
          type: integer
          nullable: true
          description: The bonus amount to add to the exchange value at this point. This is used if you want non-linear tiers and it determines how much you want those additional points to be worth.
        ceiling:
          type: integer
          nullable: true
          description: The upper bound for which this spend tier applies.
        floor:
          type: integer
          nullable: true
          description: The lower bound for which this spend tier applies.
        pointsBack:
          type: integer
          nullable: true
          description: The number of points to be credited back to the points account following a points spend transaction.
        rate:
          type: number
          nullable: true
          format: float
          description: The exchange rate within this scheme that will be applied. Note - this is the value of the exchange for example 0.1 would indicate each point is worth 1/10 of a penny.
        step:
          type: integer
          nullable: true
          description: The increments that points can be spent in. e.g. if points can be exchanged at 5,000, 10,000, 15,000 then the step would be 5,000.

    identityTypesEntity:
      type: object
      properties:
        id:
          type: string
          description: The ID of the Identity Type automatically generated and unique within Eagle Eye AIR.
          readOnly: true
        name:
          type: string
          nullable: false
          description: The name of the Identity Type.
        configuration:
          type: object
          nullable: false
          description: The list of configuration settings of the Identity Type.
          properties:
            allowInputValueFlag:
              type: object
              nullable: false
              description: >-
                This setting defines if an auto-generated Identity of this Type can be created with an identity value passed in the payload instead of the auto-generated identity value.
                If enabled, the value passed in the payload would have to match the format of the auto-generated identity value.
                This setting is disabled by default.
              properties:
                value:
                  type: boolean
                  nullable: false
            autoGenerateValueFlag:
              type: object
              nullable: false
              description: >-
                This setting defines if the identity value for Identities of this Type must be auto-generated.
                This setting is disabled by default.
              properties:
                value:
                  type: boolean
                  nullable: false
            codeProviderId:
              type: object
              description: >-
                This setting defines the Code Provider to be used to generate the identity value.
                This setting *requires* `autoGenerateValueFlag` to be enabled otherwise it will be ignored.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultState:
              type: object
              description: This setting defines the default State for the Identities created with this Identity Type if a State is not provided when creating the Identity.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultStatus:
              type: object
              description: This setting defines the default Status for the Identities created with this Identity Type if a Status is not provided when creating the Identity.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            format:
              type: object
              description: >-
                This setting defines format to use to generate Identity values.
                This setting is *required* if `autoGenerateValueFlag` is enabled and no `codeProviderId` has been defined.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            maxGenerationAttempts:
              type: object
              description: >-
                This setting defines the maximum number of attempts to generate the Identity before an error is returned.
                By default, we attempt to generate the Identity once.
              nullable: false
              properties:
                value:
                  type: integer
                  nullable: false
            maxSerialNumber:
              type: object
              description: >-
                This setting defines the maximum number of serial numbers to generate for this Identity Type.
                This setting *requires* `autoGenerateValueFlag` to be enabled, and *requires* the `format` to contain a serial number, *otherwise* this is ignored.
                By default, we generate all the available serial numbers, depending on the format defined by the Code Provider or the `format` configuration option.
              nullable: false
              properties:
                value:
                  type: integer
                  nullable: false
            serialNumbersToGenerate:
              type: object
              description: >-
                If the Identity Type is auto-generated, we generate the serial numbers in batches on a regular basis to improve performance.
                This setting defines how many serial numbers to generate in a batch.
              nullable: false
              properties:
                value:
                  type: integer
                  nullable: false
            startingSerialNumber:
              type: object
              description: >-
                This setting defines the starting serial number from which we begin to generate serial numbers.
                This setting *requires* `autoGenerateValueFlag` to be enabled, *otherwise* this will be ignored.
                By default, we start from the first possible serial number.
              nullable: false
              properties:
                value:
                  type: integer
                  nullable: false

    walletTypesEntity:
      type: object
      properties:
        id:
          type: string
          description: The ID of the Wallet Type automatically generated and unique within Eagle Eye AIR.
          readOnly: true
        name:
          type: string
          nullable: false
          description: The name of the Wallet Type.
        configuration:
          type: object
          nullable: false
          description: The list of configuration settings of the Wallet Type.
          properties:
            allowMerge:
              type: object
              description: This setting defines if the Wallet Type is allowed to merge. By default, Wallets of this Type cannot be merged.
              nullable: false
              properties:
                value:
                  type: boolean
                  description:  If set to true a Wallet of this type is allowed to be merged into another Wallet.
                  nullable: false
            allowedInviteState:
              type: object
              description: This setting defines the States of the Wallets of this Type must use in order to be able to create Wallet Invites. By default, all Wallet States are allowed.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the States that allow Wallets of this Type to create Wallet Invites.
                  nullable: false
                  items:
                    type: string
            allowedInviteStatus:
              type: object
              description: This setting defines the Statuses the Wallets of this Type must use in order to be able to create Wallet Invites. By default, all Wallet Statuses are allowed.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the Statuses that allow Wallets of this Type to create Wallet Invites.
                  nullable: false
                  items:
                    type: string
            allowedJoinState:
              type: object
              description: This setting defines the States of the Wallets of this Type must use in order to be able to join with other Wallets. By default, all Wallet States are allowed.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the States that allow Wallets of this Type to join with other Wallets.
                  nullable: false
                  items:
                    type: string
            allowedJoinStatus:
              type: object
              description: This setting defines the Statuses that Wallets of this Type must have in order to be able to join with other Wallets. By default, all Wallet Statuses are allowed.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the Statuses that allow Wallets of this Type to join with other Wallets.
                  nullable: false
                  items:
                    type: string
            allowedMergeStateMergee:
              type: object
              description: This setting defines the States of the Wallets of this Type must use in order to be able to merge with the Mergee Wallet. By default, all Wallet States are allowed.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the States that allow Wallets of this Type to merge with other Wallet.
                  nullable: false
                  items:
                    type: string
            allowedMergeStateMerger:
              type: object
              description: This setting defines the States of the Wallets of this Type must use in order to be able to merge with the Merger Wallet. By default, all Wallet States are allowed.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the States that allow Wallets of this Type to merge with other Wallet.
                  nullable: false
                  items:
                    type: string
            allowedMergeStatusMergee:
              type: object
              description: This setting defines the Statuses of the Wallets of this Type must use in order to be able to merge with the Mergee Wallet. By default, all Wallet Statuses are allowed.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the Statuses that allow Wallets of this Type to merge with other Wallet.
                  nullable: false
                  items:
                    type: string
            allowedMergeStatusMerger:
              type: object
              description: This setting defines the Statuses of the Wallets of this Type must use in order to be able to merge with the Merger Wallet. By default, all Wallet Statuses are allowed.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the Statuses that allow Wallets of this Type to merge with other Wallet.
                  nullable: false
                  items:
                    type: string
            allowedSplitState:
              type: object
              description: This setting defines the States of the Wallets of this Type must use in order to be able to split from another Wallet. By default, all Wallet States are allowed.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the States that allow Wallets of this Type to split from another Wallet.
                  nullable: false
                  items:
                    type: string
            allowedSplitStatus:
              type: object
              description: This setting defines the Statuses of the Wallets of this Type must use in order to be able to split from another Wallet. By default, all Wallet Statuses are allowed.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the Statuses that allow Wallets of this Type to split from another Wallet.
                  nullable: false
                  items:
                    type: string
            associateOfTypes:
              type: object
              description:  This setting defines the Wallet Types that Wallets of this Type can be an Associate of. By default, this Wallet Type is not allowed to associate with any other wallets.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the Wallet types this Wallet type can be associated with.
                  nullable: false
                  items:
                    type: integer
            basketStorageMaximumDays:
              type: object
              description: This setting defines how many days the Wallet Transaction Basket information is stored before being purged for this Wallet Type. By default, we store the information indefinitely.
              nullable: false
              properties:
                value:
                  type: integer
                  description: The number of days the information is stored.
                  nullable: false
            childOfTypes:
              type: object
              description: This setting defines the Wallet Types that the Wallets of this Type can be a Child of. By default, this Wallet Type cannot be a Child of any other wallet.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the Wallet types this Wallet type can be a Child of.
                  nullable: false
                  items:
                    type: integer
            defaultAccountState:
              type: object
              description: This setting defines the default State for the Accounts created by this Wallet Type if a State is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultAccountStateTypeCouponContinuity:
              type: object
              description: This setting defines the default State for the Continuity Accounts created by this Wallet Type if a State is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultAccountStateTypeCouponEcoupon:
              type: object
              description: This setting defines the default State for the Ecoupon Accounts created by this Wallet Type if a State is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultAccountStateTypeCouponPaper:
              type: object
              description: This setting defines the default State for the Paper Accounts created by this Wallet Type if a State is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false

            defaultAccountStateTypeLoyaltyPoints:
              type: object
              description: This setting defines the default State for the Loyalty Points Accounts created by this Wallet Type if a State is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultAccountStateTypeLoyaltyStampCard:
              type: object
              description: This setting defines the default State for the Stamp Card Accounts created by this Wallet Type if a State is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultAccountStateTypeStoredValueDebit:
              type: object
              description: This setting defines the default State for the Stored Value Debit Accounts created by this Wallet Type if a State is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultAccountStateTypeStoredValuePlastic:
              type: object
              description: This setting defines the default State for the Stored Value Plastic Accounts created by this Wallet Type if a State is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultAccountStateTypeStoredValueVoucher:
              type: object
              description: This setting defines the default State for the Stored Value Voucher Accounts created by this Wallet Type if a State is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultAccountStateTypeSubscriptionStandardSubscription:
              type: object
              description: This setting defines the default State for the Standard Subscription Accounts created by this Wallet Type if a State is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultRewardBankLoyaltyPointsWalletLinkClientType:
              type: object
              description: This setting defines the default State for the  Points Reward Bank Wallet Link created by this Wallet Type if a Link is not provided when creating the Account.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultConsumerType:
              type: object
              description: This setting defines the default Wallet Consumer Type for the Wallet Consumers created by this Wallet Type if a State is not provided when creating the Wallet Consumers.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultState:
              type: object
              description: This setting defines the default State for the Wallets created with this Wallet Type if a State is not provided when creating the Wallets.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            defaultStatus:
              type: object
              description: This setting defines the default Status for the Wallets created with this Wallet Type if a Status is not provided when creating the Wallets.
              nullable: false
              properties:
                value:
                  type: string
                  nullable: false
            donorOfTypes:
              type: object
              description: This setting defines the Wallet Types that the Wallets of this Type can be a Donor of. By default, this Wallet Type cannot be a Donor of any other wallet.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the Wallet types this Wallet type can be a Donor of.
                  nullable: false
                  items:
                    type: integer
            keepAndCancelInvitesOnMove:
              type: object
              description: This setting defines if the Wallet Invites attached to Wallets of this Wallet Type must be cancelled instead of being moved when a Wallet Invite Move operation is performed. By default, Wallet Invites are moved not cancelled.
              nullable: false
              properties:
                value:
                  type: boolean
                  description: If set to true the Wallet Invites will be cancelled, if set to false the Wallet Invites will be moved.
                  nullable: false
            maxAssociate:
              type: object
              description: This setting defines the maximum number of times this Wallet Type can be an Associate of other Wallet Types. By default, there is no limit.
              nullable: false
              properties:
                value:
                  type: integer
                  nullable: false
            maxChild:
              type: object
              description: This setting defines the maximum number of times this Wallet Type can be a Child of other Wallet Types. By default, there is no limit.
              nullable: false
              properties:
                value:
                  type: integer
                  nullable: false
            maxDonor:
              type: object
              description: This setting defines the maximum number of times this Wallet Type can be a Donor of other Wallet Types. By default, there is no limit.
              nullable: false
              properties:
                value:
                  type: integer
                  nullable: false
            maxInvite:
              type: object
              description: This setting defines the maximum number of Wallet Invites Wallets of this Type can have. By default, Wallets of this Type cannot have Wallet Invites.
              nullable: false
              properties:
                value:
                  type: integer
                  nullable: false
            maxParent:
              type: object
              description: This setting defines the maximum number of times this Wallet Type can be a Parent of other Wallet Types. By default, there is no limit.
              nullable: false
              properties:
                value:
                  type: integer
                  nullable: false
            parentOfTypes:
              type: object
              description: This setting defines the Wallet Types that the Wallets of this Type can be a Parent of. By default, this Wallet Type cannot be a Parent of any other wallet.
              nullable: false
              properties:
                value:
                  type: array
                  description: The list of all the Wallet Types this Wallet Type can be a Parent of.
                  nullable: false
                  items:
                    type: integer
          additionalProperties:
            type: object
            description: |
              This setting defines the maximum number of Wallet Identities of a particular Type are allowed in Wallets of this Wallet Type. By default, there is no limit. If you wanted to add a limit the object name would be `maxIdentityType+{{identity type name}}`.
              Example : maxIdentityTypeEmail with value = 2. Which means for this walletType you can only create up to 2 different identities of type email.
            pattern: '^maxIdentityType\w+$'
            nullable: false
            properties:
              value:
                type: integer
                nullable: false
            example:
              maxIdentityTypeEmail:
                value: 2
    audiencesEntity:
      type: object
      properties:
        id:
          type: string
          description: The ID of the Audience automatically generated and unique within Eagle Eye AIR.
          readOnly: true
        name:
          type: string
          description: The name of the Audience.
          nullable: false
        reference:
          type: string
          description: The reference of the Audience.
          nullable: false
        dateCreated:
          type: string
          format: date-time
          description: The date-time when the Audience was added to the AIR platform.
          readOnly: true
        lastUpdated:
          type: string
          format: date-time
          description: The date-time when the Audience was last updated on in the AIR platform.
          readOnly: true
        startDate:
          type: string
          format: date-time
          description: The start date of the Audience.
          nullable: true
        endDate:
          type: string
          format: date-time
          description: The end date of the Audience.
          nullable: true

  responses:
    getBanksPayload:
      description: EES AIR has successfully processed a Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            type: object
            required: [ offset, total, limit, orderBy, results ]
            properties:
              offset:
                type: integer
                format: int32
                description: Result set pagination offset
                nullable: false
              limit:
                type: integer
                format: int32
                description: Results per page (up to 100)
                nullable: false
              total:
                type: integer
                format: int32
                description: Results count
                nullable: false
              orderBy:
                type: array
                nullable: true
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      format: string
                      description: Field used for sorting results
                      nullable: false
                    order:
                      type: string
                      format: string
                      description: Sorting order (ascending, descending)
                      enum:
                        - ASC
                        - DESC
              results:
                type: array
                items:
                  $ref: '#/components/schemas/PointsRewardBankEntity'
          example:
            offset: 0
            limit: 100
            total: 2
            orderBy:
              - name: pointsRewardBankId
                order: ASC
            results:
              - pointsRewardBankId: "1172"
                reference: "000001185"
                status: ACTIVE
                mode: PUBLIC
                name: Super Points Reward Bank
                dateCreated: '2019-07-02T13:54:43+00:00'
                lastUpdated: '2020-03-09T11:12:13+00:00'
                exchangeLimit: 2
              - pointsRewardBankId: "1178"
                reference: "000001187"
                status: ACTIVE
                mode: PERSONAL
                name: Personal Bank Name
                dateCreated: '2019-07-02T13:54:43+00:00'
                lastUpdated: '2020-03-09T11:12:13+00:00'
                exchangeLimit: null
    getBankRewardsPayload:
      description: EES AIR has successfully processed a Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            type: object
            required: [ offset, limit, total, orderBy, results ]
            properties:
              offset:
                type: integer
                format: int32
                default: 0
                nullable: false
                description: Pagination Offset
              total:
                type: integer
                format: int32
                description: Results count
                nullable: false
              limit:
                type: integer
                format: int32
                description: Results per page (up to 100)
                nullable: false
                minimum: 1
                maximum: 100
                default: 100
              orderBy:
                type: array
                nullable: true
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      format: string
                      description: Field used for sorting results
                      nullable: false
                      enum:
                        - pointsRewardBankRewardId
                        - threshold
                    order:
                      type: string
                      format: string
                      description: Sorting order (ascending, descending)
                      enum:
                        - ASC
                        - DESC
              results:
                type: array
                items:
                  $ref: '#/components/schemas/PointsRewardBankRewardEntity'
          example:
            offset: 0
            limit: 100
            total: 2
            orderBy:
              - name: pointsRewardBankRewardId
                order: ASC
            results:
              - pointsRewardBankRewardId: "1"
                pointsRewardBankId: "1172"
                status: ACTIVE
                resourceType: CAMPAIGN
                resourceId: "1749"
                cost: 100
                threshold: 100
                dateCreated: '2019-07-02T13:54:43+00:00'
                lastUpdated: '2019-07-02T13:54:43+00:00'
              - pointsRewardBankRewardId: 2
                pointsRewardBankId: 1172
                status: ACTIVE
                resourceType: CAMPAIGN
                resourceId: "1749"
                cost: 300
                threshold: 300
                dateCreated: '2019-07-04T13:54:43+00:00'
                lastUpdated: '2019-07-04T13:54:43+00:00'
    createBankRewardResponse:
      description: EES AIR has successfully processed a Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/PointsRewardBankEntity'
              - type: object
                properties:
                  rewards:
                    type: array
                    items:
                      $ref: '#/components/schemas/PointsRewardBankRewardEntity'
          example:
            pointsRewardBankId: '1172'
            name: Points Reward Bank with Rewards
            mode: PERSONAL
            status: ACTIVE
            dateCreated: '2019-07-02T13:54:43+00:00'
            lastUpdated: '2019-07-02T13:54:43+00:00'
            exchangeLimit: 0
            rewards:
              - pointsRewardBankRewardId: '3425'
                pointsRewardBankId: '1172'
                resourceType: CAMPAIGN
                resourceId: '2'
                threshold: 30
                cost: 20
                status: ACTIVE
                reasonCode: null
                dateCreated: '2019-07-02T13:54:43+00:00'
                lastUpdated: '2019-07-02T13:54:43+00:00'
    207createBankRewardResponse:
      description: Only some of the Reward Bank Rewards were created successfully. The failures are listed separately
        in the response.
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            type: object
            properties:
              '201':
                allOf:
                  - $ref: '#/components/schemas/PointsRewardBankEntity'
                  - type: object
                    properties:
                      rewards:
                        type: array
                        items:
                          $ref: '#/components/schemas/PointsRewardBankRewardEntity'
                description: Reward Bank and successfully created rewards.
              '400':
                allOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/defaultErrorEntity'
                description: Error responses from the Rewards that failed to be created.
            example:
              201:
                pointsRewardBankId: '1172'
                name: Points Reward Bank with Rewards
                mode: PERSONAL
                status: ACTIVE
                dateCreated: '2019-07-02T13:54:43+00:00'
                lastUpdated: '2019-07-02T13:54:43+00:00'
                exchangeLimit: 0
                rewards:
                  - pointsRewardBankRewardId: '3425'
                    pointsRewardBankId: '1172'
                    resourceType: CAMPAIGN
                    resourceId: '2'
                    threshold: 30
                    cost: 20
                    status: ACTIVE
                    reasonCode: null
                    dateCreated: '2019-07-02T13:54:43+00:00'
                    lastUpdated: '2019-07-02T13:54:43+00:00'
              400:
                - errorCode: IR
                  errorMessage: 'Invalid request data: Campaign does not exist.'
    getRewardPayload:
      description: EES AIR has successfully processed a Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PointsRewardBankRewardEntity'
          example:
            pointsRewardBankRewardId: "1"
            pointsRewardBankId: "1172"
            status: ACTIVE
            resourceType: CAMPAIGN
            resourceId: "1749"
            cost: 100
            threshold: 100
            dateCreated: '2019-07-02T13:54:43+00:00'
            lastUpdated: '2019-07-02T13:54:43+00:00'
    patchRewardPayload:
      description: EES AIR has successfully processed a Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PointsRewardBankRewardEntity'
          example:
            rewardId: 1
            bankId: 1172
            status: ACTIVE
            resourceType: CAMPAIGN
            resourceId: "1749"
            cost: 120
            threshold: 150
            dateCreated: '2019-07-02T13:54:43+00:00'
            lastUpdated: '2019-07-02T13:54:43+00:00'
    getBankPayload:
      description: EES AIR has successfully processed a Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PointsRewardBankEntity'
    error409Response:
      description: >-
        EES AIR understands this request, but refuse to process it, due to
        present Conflict with the current state of the target resource or
        because performing this operation would lead to a Conflict within AIR.
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: CI
              errorMessage: Campaign Inactive
    defaultErrorResponse:
      description: Default Error Response
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
          examples:
            missingMandatoryParameter:
              summary: >-
                Example of Bad Request (400 HTTP Status) - missing mandatory
                parameter
              value:
                errorCode: '???'
                errorMessage: >-
                  Request Payload doesn't contain mandatory attribute
                  `identities`
    getProductInventoryListsPayload:
      description: EES AIR has successfully processed a Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            type: object
            required: [ offset, total, limit, orderBy, results ]
            properties:
              offset:
                type: integer
                format: int32
                description: Result set pagination offset
                nullable: false
              limit:
                type: integer
                format: int32
                description: Results per page (up to 100)
                nullable: false
              total:
                type: integer
                format: int32
                description: Results count
                nullable: false
              orderBy:
                type: array
                nullable: true
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      format: string
                      description: Field used for sorting results
                      nullable: false
                    order:
                      type: string
                      format: string
                      description: Sorting order (ascending, descending)
                      enum:
                        - ASC
                        - DESC
              results:
                type: array
                items:
                  $ref: '#/components/schemas/ProductInventoryListEntity'
          example:
            offset: 0
            limit: 100
            total: 2
            orderBy:
              - name: upc
                order: ASC
            results:
              - name: EAGLE EYE TANGERINE
                description: EAGLE EYE ORANGES
                sku: null
                upc: '781302048531'
                image: ''
                supplierId: "EE"
                supplierName: "Eagle Eye"
                brand: "PURPLE CITRUS"
                brandType: "EE VALUE"
                lastSoldDate: "2023-16-11T08:14:24+00:00"
                tags:
                  - ACME
                  - ADAL
                  - AIMT
                  - RDAL
                  - SACG
                  - SHGN
                  - SNCA
                  - SPRT
                  - SSEA
                  - SSPK
                  - SWMA
                groups:
                  - reference: 84-2
                    group-reference: EE-84-2
                    name: ORANGES
                    primary: 1
                  - reference: '84'
                    group-reference: EE-84
                    name: FRESH PRODUCE
                    primary: 0
              - name: EAGLE EYE AMBROSIA
                description: EAGLE EYE APPLES
                sku: null
                upc: '781302048531'
                image: ''
                supplierId: "EE"
                supplierName: "Eagle Eye"
                brand: "PURPLE CITRUS"
                brandType: "EE VALUE"
                lastSoldDate: null
                tags:
                  - ACME
                  - ADAL
                  - AIMT
                  - RDAL
                  - SACG
                  - SHGN
                  - SNCA
                  - SPRT
                  - SSEA
                  - SSPK
                  - SWMA
                groups:
                  - reference: 84-2
                    group-reference: EE-84-2
                    name: APPLES
                    primary: 1
                  - reference: '84'
                    group-reference: EE-84
                    name: FRESH PRODUCE
                    primary: 0
    badRequest:
      description: Bad Request.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/error400Entity'
            example:
              errorCode: IR
              errorMessage: Invalid Request Data
    unauthorized:
      description: Unauthorized.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/error401Entity'
            example:
              errorCode: UN
              errorMessage: >-
                Unauthenticated - Check the AUTH headers and the hash is formed correctly
    forbidden:
      description: Forbidden.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/error403Entity'
            example:
              errorCode: P
              errorMessage: Caller unit hasn't privileges to access this unit
    notFound:
      description: Not Found.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/error404Entity'
            example:
              errorCode: CNF
              errorMessage: Campaign Not Found
    methodNotAllowed:
      description: Method Not Allowed.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/error405Entity'
            example:
              errorCode: MNA
              errorMessage: Method not allowed
    responseCampaignPayload:
      description: OK.
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/campaignEntity/properties/id'
              type:
                $ref: '#/components/schemas/campaignEntity/properties/type'
              class:
                $ref: '#/components/schemas/campaignEntity/properties/class'
              version:
                $ref: '#/components/schemas/campaignEntity/properties/version'
              reference:
                $ref: '#/components/schemas/campaignEntity/properties/reference'
              status:
                $ref: '#/components/schemas/campaignEntity/properties/status'
              dateCreated:
                $ref: '#/components/schemas/campaignEntity/properties/dateCreated'
              lastUpdated:
                $ref: '#/components/schemas/campaignEntity/properties/lastUpdated'
              details:
                $ref: '#/components/schemas/campaignEntity/properties/details'
              settings:
                $ref: '#/components/schemas/campaignEntity/properties/settings'
              suppliers:
                $ref: '#/components/schemas/campaignEntity/properties/suppliers'
              rules:
                $ref: '#/components/schemas/campaignEntity/properties/rules'
              partners:
                $ref: '#/components/schemas/campaignEntity/properties/partners'
              distributionChannels:
                $ref: '#/components/schemas/campaignEntity/properties/distributionChannels'
              windows:
                $ref: '#/components/schemas/campaignEntity/properties/windows'
              dates:
                $ref: '#/components/schemas/campaignEntity/properties/dates'
              relationships:
                $ref: '#/components/schemas/campaignRelationshipsEntity'
              compatibility:
                $ref: '#/components/schemas/campaignEntity/properties/compatibility'
              incompatibility:
                $ref: '#/components/schemas/campaignEntity/properties/incompatibility'
              offer:
                $ref: '#/components/schemas/campaignEntity/properties/offer'
              barcode:
                $ref: '#/components/schemas/campaignEntity/properties/barcode'
              custom:
                $ref: '#/components/schemas/campaignEntity/properties/custom'
        response:
          examples:
            response:
              value:
                payload:
                  id: '173'
                  relationships:
                    objective:
                      campaign:
                        - campaignId: '170'
                          dateCreated: '2022-11-01T14:53:07+00:00'
                        - campaignId: '171'
                          dateCreated: '2022-11-01T14:53:07+00:00'
                    promotion:
                      campaign:
                        - campaignId: '95'
                          dateCreated: '2022-11-01T14:53:07+00:00'
                        - campaignId: '96'
                          dateCreated: '2022-11-01T14:53:07+00:00'
                    entitlement:
                      campaign:
                        - campaignId: '125'
                          dateCreated: '2022-11-01T14:53:07+00:00'
    getInventoryListPayload:
      description: EES AIR has successfully processed a Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InventoryListEntity'
          example:
            inventoryListId: '1172'
            status: ACTIVE
            type: EXCLUDE
            name: My Inventory List
            description: A description of My Inventory List
            dateCreated: '2022-01-02T09:54:43+00:00'
            lastUpdated: '2022-03-09T13:20:17+00:00'
            collections:
              -
                products:
                  excluded:
                    groups:
                      TYPE1:
                        - 'G100000001'
                        - 'G100000002'
                    skus:
                      - 'P200000010'
                      - 'P200000012'
                    tags:
                      - 'TAG16'
                      - 'TAG20'
            prerequisites:
              campaigns:
                campaignTypes:
                  - 'STANDARD_NATIONAL'
    postInventoryListResponse:
      description: EES AIR has successfully processed a Request.
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/InventoryListEntity'
              - type: object
          example:
            inventoryListId: '1172'
            status: ACTIVE
            type: EXCLUDE
            name: My Inventory List
            description: A description of My Inventory List
            dateCreated: '2022-01-02T09:54:43+00:00'
            lastUpdated: '2022-03-09T13:20:17+00:00'
            collections:
              -
                locations:
                  excluded:
                    locationIdentifiers:
                      - 'store1'
                      - 'store2'
                    locationTags:
                      - 'locationTag01'
                products:
                  excluded:
                    groups:
                      TYPE1:
                        - 'G100000001'
                        - 'G100000002'
                    skus:
                      - 'P200000010'
                      - 'P200000012'
                    tags:
                      - 'TAG16'
                      - 'TAG20'
            prerequisites:
              campaigns:
                campaignTypes:
                  - 'STANDARD_NATIONAL'
    postInventoryListPayload:
      description: EES AIR has successfully processed a Request.
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/InventoryListEntity'
              - type: object
              - required:
                - productsLocationIdentifier
                - status
                - type
                - name
                - description
                - dateCreated
                - lastUpdated
                - collections
                - prerequisites
          example:
            status: ACTIVE
            type: EXCLUDE
            name: My Inventory List
            description: A description of My Inventory List
            collections:
              -
                locations:
                  excluded:
                    locationIdentifiers:
                      - 'store1'
                      - 'store2'
                    locationTags:
                      - 'locationTag01'
                products:
                  excluded:
                    groups:
                      TYPE1:
                        - 'G100000001'
                        - 'G100000002'
                    skus:
                      - 'P200000010'
                      - 'P200000012'
                    tags:
                      - 'TAG16'
                      - 'TAG20'
            prerequisites:
              campaigns:
                campaignTypes:
                  - 'STANDARD_NATIONAL'
    getInventoryListsPayload:
      description: EES AIR has successfully processed a Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            type: object
            properties:
              offset:
                type: integer
                format: int32
                description: Result set pagination offset
                nullable: false
              limit:
                type: integer
                format: int32
                description: Results per page (up to 100)
                nullable: false
              total:
                type: integer
                format: int32
                description: Results count
                nullable: false
              orderBy:
                type: array
                nullable: true
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      format: string
                      description: Field used for sorting results
                      nullable: false
                    order:
                      type: string
                      format: string
                      description: Sorting order (ascending, descending)
                      enum:
                        - ASC
                        - DESC
              results:
                type: array
                items:
                  $ref: '#/components/schemas/InventoryListEntity'
          example:
            offset: 0
            limit: 100
            total: 2
            orderBy:
              - name: inventoryListId
                order: ASC
            results:
              - inventoryListId: '1172'
                status: ACTIVE
                type: EXCLUDE
                name: My Inventory List
                description: A description of My Inventory List
                dateCreated: '2022-01-02T09:54:43+00:00'
                lastUpdated: '2022-03-09T13:20:17+00:00'
                collections:
                  -
                    locations:
                      excluded:
                        locationIdentifiers:
                          - 'store1'
                          - 'store2'
                        locationTags:
                          - 'locationTag01'
                    products:
                      excluded:
                        groups:
                          TYPE1:
                            - 'G100000001'
                            - 'G100000002'
                        skus:
                          - 'P200000010'
                          - 'P200000012'
                        tags:
                          - 'TAG16'
                          - 'TAG20'
                prerequisites:
                  campaigns:
                    campaignTypes:
                      - 'STANDARD_NATIONAL'
              - inventoryListId: '1178'
                status: ACTIVE
                type: EXCLUDE
                name: Second Inventory List
                description: A description of Second Inventory List
                dateCreated: '2022-01-02T09:54:43+00:00'
                lastUpdated: '2022-03-09T13:20:17+00:00'
                collections:
                  products:
                    allRequired: false
                    excluded:
                      groups: null
                      skus:
                        - 'P200000010'
                        - 'P200000012'
                      tags:
                        - 'TAG24'
                prerequisites:
                  campaigns:
                    campaignTypes:
    error400Response:
      description: >-
        EES AIR Refuse to process that particular Request as there is something
        wrong with the Request (e.g., missing Mandatory Request parameter or
        Mandatory Request Payload attribute is missing, Request payload cannot be processed, etc)
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: MPA
              errorMessage: 'Missing Mandatory Request Parameter: `parameterName`'
    error401Response:
      description: >-
        EES AIR Refuse to process that particular Request due to Authentication
        error. This could be caused by missing mandatory AUTH header(s), invalid
        Hash calculation, invalid or inactive API Key used, etc
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: AF
              errorMessage: >-
                Authentication Failure, Please check if required AUTH headers
                are present in your Request and if AUTH Hash is calculated
                correctly

    error403Response:
      description: >-
        EES AIR Refuse to process that particular Request due to Request
        Authorization error(s). This indicates that used API Key has not got
        required permissions to perform this operation.
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: P
              errorMessage: You don't have appropriate Privileges to perform this operation
    error404Response:
      description: >-
        EES AIR Refuse to process that particular Request as
        requested/referenced resource could not be found.
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: NF
              errorMessage: Requested Resource (Wallet Identity Value) not found
    brandsNotFound:
      description: Brand Not Found.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/error404Entity'
            example:
              errorCode: BNF
              errorMessage: Brands not found
    error415Response:
      description: >-
        EES AIR is not able to understand that request due to not supported
        `Content-Type` value.
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: ...
              errorMessage: ...
    error429Response:
      description: >-
        EES AIR refuses to process that particular Request as Client's API
        Requests Limit was exceeded.
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: ...
              errorMessage: ...
    error500Response:
      description: >-
        EES AIR refuses to process that particular Request due to Unexpected
        Server Error.
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: U
              errorMessage: Unknown Server Error
    error503Response:
      description: >-
        EES AIR refuses to process that particular Request due to Service(s)
        being Unavailable (i.e. Scheduled Maintenance)
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: ...
              errorMessage: ...
    error504Response:
      description: >-
        EES AIR refuses to process that particular Request due to Networking
        Issues
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: ...
              errorMessage: ...
    tooManyRequests:
      description: Too Many Requests
      headers:
        Retry-after:
          description: The number of seconds after which to retry the request
          schema:
            type: integer
      content:
        application/json:
          schema:
            properties:
              errorCode:
                type: string
                description: The error code
                enum:
                  - 'CE'
              errorMessage:
                type: string
                description: The error message for this error
                enum:
                  - 'This request has been throttled. Please try again later.'
    serverError:
      description: Server Error
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Internal Server Error
    notImplemented:
      description: Not Implemented
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Not Implemented
    badGateway:
      description: Bad Gateway
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Bad Gateway
    serviceUnavailable:
      description: Service Unavailable
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Service Unavailable
    gatewayTimeout:
      description: Gateway Timeout
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Gateway Timeout
    responseTokenFormatPayload:
      description: OK.
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/tokenFormatEntity/properties/id'
              name:
                $ref: '#/components/schemas/tokenFormatEntity/properties/name'
              safeName:
                $ref: '#/components/schemas/tokenFormatEntity/properties/safeName'
              details:
                $ref: '#/components/schemas/tokenFormatEntity/properties/details'
        response:
          examples:
            response:
              value:
                payload:
                  id: '1000'
                  name: 'Example Token Format'
                  safeName: '000001000'
                  details:
                    checksum: false
                    format: "########"
                    length: 11
                    prefix: "NS"
                    suffix: "X"
    responseTokenFormatSearch:
      description: OK.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/tokenFormatSearch'
    responseUnitsSearchPayload:
      description: OK.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/unitsSearchResponseEntity'
    responseUnitsPayload:
      description: OK.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/unitResponseEntity'
    responseUnitsPostPayload:
      description: OK.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/unitPostResponseEntity'
    responseFileTransferConfig:
        description: OK.
        content:
          application/json:
            schema:
                $ref: '#/components/schemas/unitFileTransferConfigResponseEntity'
    responseServiceUnitsPayload:
      description: OK.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/servicesUnitPostResponseEntity'
    responseProgrammesSearchPayload:
      description: OK.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/programmesSearchResponseEntity'
    responseProgrammesPayload:
      description: OK.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/programmesResponseEntity'
    responseTiersSearchPayload:
      description: OK.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/tiersSearchResponseEntity'
    responseTierPayload:
      description: OK.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/tierResponseEntity'
    walletTypesPayload:
      description: The response of a successful Wallet Types request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/walletTypesEntity'
    identityTypesPayload:
      description: The response of a successful Identity Types request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/identityTypesEntity'
    audiencesPayload:
      description: The response of a successful Audiences request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/audiencesEntity'

  headers:
    httpKeepAliveResponse:
      required: false
      description: >-
        This general HTTP header will be present in a Response, if EES Server
        decides to enable Keep-Alive mechanism, so the calling application could
        reuse current connection for next request(s). HTTP/1.1 defines semantics
        for the optional "timeout" and "max" parameters on responses. The
        `timeout` parameter allows the server to indicate the amount of time in
        seconds it is currently allowing between when the response was generated
        and when the next request is received from the client (i.e., the request
        timeout limit). Similarly, the "max" parameter allows the server to
        indicate the maximum additional requests that it will allow on the
        current persistent connection. Please note these values are provided for
        diagnostic purposes only.
      schema:
        type: string
        format: string
        enum:
          - keep-alive
          - close
        default: close
        example: 'timeout=5, max=1000'
    uniquenessCheckResult:
      required: false
      description: >-
        If Request Uniqueness checking is enabled for a Client, this Header will contain details regarding Request uniqueness check performed within EES AIR. `PASSED` means it was checked and a Request is unique, `FAILED` means check was performed and it fails, `UNABLE TO CHECK` means EES AIR was not able to perform uniqueness check.
      schema:
        type: string
        format: string
        nullable: false
        enum:
          - PASSED
          - FAILED
          - UNABLE TO CHECK
  securitySchemes:
    eesAuthClientId:
      type: apiKey
      in: header
      description: >-
        Client ID, provided during onboarding to each EES AIR Client. Please
        note&#58; API Key consist of `Client ID` and `Client Secret` required
        for calculating Authentication Hash (`X-EES-AUTH-HASH`). Each Unit from
        the Client Hierarchy can have one or more API Key(s).
      name: X-EES-AUTH-CLIENT-ID
    eesAuthHash:
      type: apiKey
      in: header
      description: >-
        Request Authentication Hash, obtained by concatenating Full Request URI
        Path (with API prefix), Request Query String(s) (if applicable), Request
        Payload (if applicable), Client Secret and then calculating SHA256 from
        this concatenated string.
      name: X-EES-AUTH-HASH
