x-explorer-enabled: false
openapi: 3.0.3
servers:
  - url: 'https://pos.uk.eagleeye.com/2.0'
    description: UK Production
info:
  version: 1.62.0
  title: POS-Connect API
  description: |
    # AIR POS API

    Set of RESTFul API endpoints allowing Clients to integrate their physical or virtual Points of Sales (POS) into AIR platform.

    Please note: Client Settings, agreed during each Client onboarding (and documented in their Config Document) could affect things and behaviours detailed there.
    For example list of returned accounts for Open Wallet endpoint, could be automatically filtered-out to narrow down the amount of returned accounts. Also some of the entities sub-attributes could be ignored/hidden to reduce verbosity and to save bandwidth.

    List of the entity's attributes that could be "hidden"/ignored consist of:
     * walletEntity-&gt;meta
     * walletEntity-&gt;relationships
     * walletIdentity-&gt;meta
     * accountEntity-&gt;meta
     * accountEntity-&gt;relationships
     * walletConsumer-&gt;meta
     * walletIdentity-&gt;meta
     * fundEntity-&gt;meta

    Please note:

    * Above mechanism will not change nor unset any data stored in the AIR Database(s). Instead, appropriate attributes will be ignored while constructing and sending a response to the calling application. Please refer to your Config Documentation for details.
    * The authentication mechanic requires the receipt of the full payload so any headers that would chunk the request up, such as transfer-encoding: chunked could potentially cause authentication failures.

  #externalDocs:
  #description: External documentation
  #url: 'http://docs.eagleeye.com/connect'

tags:
  - name: Wallet
    description: >-
      API endpoints exposed in this section provide a high-level AIR functionality, based on most common Client's use cases. These high-level endpoints combine low-level functionality and reduce the amount of API calls needed.
  - name: Account
    description: >-
      Set of API endpoints exposing a lower-level AIR functionality allowing the calling application to operate on individual Account(s). The purpose of these endpoints is to supplement/extend supported flows or even allowing Clients to build their own flows utilizing more granular functionality, to satisfy specific requirements. Please note - all endpoints in this namespace accepts one of the following `accountId`, `accountId + walletId` or `token` (with obvious exception for Create Account endpoint)
  - name: Wallet Transaction
    description: >-
      Set of API endpoints exposing Wallet Transaction information to the calling application.
paths:
  /connect/wallet/open:
    post:
      summary: Open
      operationId: openWallet
      tags:
        - Wallet
      description: >-
        This API endpoint allows the calling application to open an AIR Wallet by providing an Identity Value (if no identity is passed then the end point can be configured to operate in unidentified customer mode). AIR will check if provided Identity Value is genuine, active and known to AIR; and if so - return details of Wallet(s) and details for presented Wallet Identity. Additionally the calling application could instruct AIR to return additional data related to returned default Entities, like `walletConsumer`, other `walletIdentities` from the same Wallet, list available `walletAccounts` from the same Wallet, etc. Additionally the calling application could instruct AIR to perform `Analyse Basket` and to return back a list of suggestions what are the applicable offers for that Consumer, based on configured in AIR rules and provided Consumer's Basket Content or even request a more sophisticated action like `Adjudicate Basket` where AIR would return adjudicated Basket Object with applied applicable promotions, offers, etc.
      requestBody:
        $ref: '#/components/requestBodies/openWalletPayload'
      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'
        - $ref: '#/components/parameters/eesDateTimeOverride'
      responses:
        200:
          $ref: '#/components/responses/200openWalletResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.WALLET.OPEN
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                      description: One item for each locked Account (please note LOCK changes an Account Status)
        207:
          $ref: '#/components/responses/207openWalletResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.WALLET.OPEN
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                      description: One item for each locked Account (please note LOCK changes an Account Status)
        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'

  /connect/wallet/open/settle:
    post:
      summary: OpenSettle
      operationId: openSettleTransaction
      tags:
        - Wallet
      description: >-
        This API endpoint allows the calling application to record in AIR a Consumer Transaction, by recording all Account's operations (like Coupon Redemption, Stored Value Credit/Debit amount, Loyalty Points Earn/Spend or Stamp received). Please note each operation on an Account will create an Account Transaction while overarching Wallet Transaction would link a Consumer's Transaction to individual AIR Account Transactions.
      requestBody:
        $ref: '#/components/requestBodies/openSettlePayload'
      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'
        - $ref: '#/components/parameters/eesDateTimeOverride'
      responses:
        200:
          $ref: '#/components/responses/200settleResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.WALLET.OPENSETTLE
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
                    description: One Item for each affected Account (redeemed, credited, debited, etc.)
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Wallet Transaction
        207:
          $ref: '#/components/responses/207settleResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.WALLET.OPENSETTLE
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
                    description: One Item for each affected Account (redeemed, credited, debited, etc.)
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Wallet Transaction
        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'

  /connect/wallet/settle:
    post:
      summary: Settle
      operationId: settleTransaction
      tags:
        - Wallet
      description: >-
        This API endpoint allows the calling application to record in AIR a Consumer Transaction, by recording all Account's operations (like Coupon Redemption, Stored Value Credit/Debit amount, Loyalty Points Earn/Spend or Stamp received). Please note each operation on an Account will create an  Account Transaction while overarching Wallet Transaction would link a Consumer's Transaction to individual AIR Account Transactions.
      requestBody:
        $ref: '#/components/requestBodies/settlePayload'
      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'
        - $ref: '#/components/parameters/eesDateTimeOverride'
      responses:
        200:
          $ref: '#/components/responses/200settleResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.WALLET.SETTLE
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
                    description: One Item for each affected Account (redeemed, credited, debited, etc.)
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Wallet Transaction
        207:
          $ref: '#/components/responses/207settleResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.WALLET.SETTLE
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
                    description: One Item for each affected Account (redeemed, credited, debited, etc.)
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Wallet Transaction
        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'

  /connect/wallet/transaction:
    get:
      summary: Get by Reference
      operationId: getWalletTransaction
      tags:
        - Wallet Transaction
      description: >-
        This API endpoint allows the calling application to retrieve an existing Wallet Transaction for the calling Unit.
      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'
        - $ref: '#/components/parameters/reference'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'

        400:
          $ref: '#/components/responses/error400Response'
        404:
          $ref: '#/components/responses/error404Response'
        500:
          $ref: '#/components/responses/error500Response'

  /connect/wallet/productExchange:
    post:
      summary: Product Exchange
      operationId: productExchangeWalletTransaction
      tags:
        - Wallet
      description: >-
        This API endpoint allows the exchange of one or more products for another set of products. The basket request attribute includes both the product(s) being returned salesKey=REFUND and the new product(s) being purchased salesKey=SALE.  The basket will then be readjudicated based on the offers that were available in the original transaction, against the new items in the basket, and any points rewards will be adjusted accordingly.

      requestBody:
        $ref: '#/components/requestBodies/productExchangePayload'
      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'
        - $ref: '#/components/parameters/httpMethodOverride'
        - $ref: '#/components/parameters/eesDateTimeOverride'
      responses:
        200:
          $ref: '#/components/responses/200productExchangeResponsePayload'
        207:
          $ref: '#/components/responses/207productExchangeResponsePayload'
        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'

  /connect/wallet/refund:
    post:
      summary: Refund
      operationId: refundWalletTransaction
      tags:
        - Wallet
      description: >-
        This API endpoint allows the calling application to record within AIR a refund (return) transaction. Request attribute `basket` should contain only a list of returned items (please note each returned item should have the attribute `salesKey=REFUND`), allowing  AIR to update the original transaction. If one or more returned items had triggered an offer redemption, then AIR will unredeem appropriate COUPON(s) and depending on a Campaign setting (`unredeemable`) will put them back into the Consumer Wallet or Cancel them. Likewise, if loyalty points were earned in the original transaction, then depending on Scheme configuration (`isRefundable`)  AIR will debit the difference arisen from the basket differences.
          Please note `location` provided to this endpoint will only be used to record where this refund happened (in which Store or Outlet); Settle's transaction location will be used for basket re-analysis, if applicable.

      requestBody:
        $ref: '#/components/requestBodies/refundPayload'
      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'
        - $ref: '#/components/parameters/httpMethodOverride'
        - $ref: '#/components/parameters/eesDateTimeOverride'
      responses:
        200:
          $ref: '#/components/responses/200refundResponsePayload'
        207:
          $ref: '#/components/responses/207refundResponsePayload'
        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'

  /connect/wallet/fulfil:
    post:
      summary: Fulfil
      operationId: fulfilWalletTransaction
      tags:
        - Wallet
      description: >-
        This API endpoint allows the calling application to record within AIR a fulfil (Partial Settle) transaction. Request attribute `basket` should contain list of items to be fulfilled with attribute `salesKey` as `FULFIL`. A new wallet transaction will be created and linked to original transaction and the status of the original transaction will be updated.
        If Request attribute `finalise` is set to `true`, any product level offers not yet fulfilled will be unlocked, qualifying basket level offers will be applied and the status of the original transaction will be updated. Any subsequent fulfil requests after this transaction will be errored.
      requestBody:
        $ref: '#/components/requestBodies/fulfilPayload'
      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'
        - $ref: '#/components/parameters/httpMethodOverride'
        - $ref: '#/components/parameters/eesDateTimeOverride'
      responses:
        200:
          $ref: '#/components/responses/200fulfilResponsePayload'
        207:
          $ref: '#/components/responses/207fulfilResponsePayload'
        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'

  /connect/wallet/replay:
    post:
      summary: Replay
      operationId: replayWalletTransactions
      tags:
        - Wallet
      description: >-
        This API endpoint involves reviewing wallet transactions made by a customer over the past seven days and 
        adjudicating any offers that were requested in the payload.

      requestBody:
        $ref: '#/components/requestBodies/replayPayload'
      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'
        - $ref: '#/components/parameters/httpMethodOverride'
        - $ref: '#/components/parameters/eesDateTimeOverride'
      responses:
        200:
          $ref: '#/components/responses/200replayResponsePayload'
        207:
          $ref: '#/components/responses/207replayResponsePayload'
        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'

  /connect/wallet/unlock:
    post:
      summary: Unlock
      operationId: unlockWallet
      tags:
        - Wallet
      description: >-
        This API endpoint allows the calling application to unlock all previously locked Accounts (by calling Open Wallet)
      requestBody:
        $ref: '#/components/requestBodies/unlockWalletPayload'
      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'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: details TBC
        207:
          description: >-
            EES AIR was able to process partially this Request, due to some errors. Special Response structure will contain all available details
          content:
            application/json:
              schema:
                type: object
                description: details TBC
        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'

  /connect/wallet/spend/calculate:
    post:
      summary: Calculate
      operationId: spendCalculate
      tags:
        - Wallet
      description: >-
        This API endpoint allows the calling application to work out the financial value of points based on the rules configured against the points scheme. These points are converted using the floor, ceiling, rate, step, bonus and pointsBack values.
      requestBody:
        $ref: '#/components/requestBodies/spendCalculatePayload'
      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'
      responses:
        200:
          $ref: '#/components/responses/spendCalculateResponsePayload'
        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'

  /connect/wallet/spend:
    post:
      summary: Spend
      operationId: spend
      tags:
        - Wallet
      description: >-
        This API applies the calculated operations from the spend-calculate API to a wallet and spends points from a customer's points account. This creates an active Wallet Transaction in the wallet found by the identity passed into the request.
      requestBody:
        $ref: '#/components/requestBodies/spendPayload'
      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'
      responses:
        200:
          $ref: '#/components/responses/200spendResponsePayload'
        207:
          $ref: '#/components/responses/207spendResponsePayload'
        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'

  /connect/wallet/spend/void:
    post:
      summary: Void
      operationId: spendVoid
      tags:
        - Wallet
      description: >-
        Void an ACTIVE spend transaction against the given wallet and undo the spending of points. This call is used in the case of a cancelled
        transaction where a customer has spent points but does not wish to complete the settle.
      requestBody:
        $ref: '#/components/requestBodies/spendVoidPayload'
      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'
      responses:
        200:
          $ref: '#/components/responses/200spendVoidResponsePayload'
        207:
          $ref: '#/components/responses/207spendVoidResponsePayload'
        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'

  /connect/wallet/activate:
    post:
      summary: Activate
      operationId: activateWallet
      tags:
        - Wallet
      description: >-
        This API endpoint allows the calling application to activate an AIR Wallet and/or Identity by providing its Identity Value. AIR will check the status of the identity, wallet and household wallet (if applicable).
      requestBody:
        $ref: '#/components/requestBodies/activateWalletPayload'
      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'
      responses:
        200:
          $ref: '#/components/responses/200activateWalletResponsePayload'
        207:
          $ref: '#/components/responses/207activateWalletResponsePayload'
        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'

  /connect/account:
    post:
      summary: Create
      operationId: createAccount
      tags:
        - Account
      description: This API endpoint allows the calling application to create a new AIR Account
      requestBody:
        $ref: '#/components/requestBodies/createAccountsPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/createAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.CREATE
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/verify:
    post:
      summary: Verify
      operationId: verifyAccount
      tags:
        - Account
      description: This API endpoint allows the calling application to verify an Account. Please note this endpoint should be used only in real-time mode
      requestBody:
        $ref: '#/components/requestBodies/verifyAccountPayload'
      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'
      responses:
        200:
          $ref: '#/components/responses/verifyAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.VERIFY
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/activate:
    post:
      summary: Activate
      operationId: activateAccount
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to activate an Account. Please note only `INACTIVE` Accounts could be Activated.
      requestBody:
        $ref: '#/components/requestBodies/activateAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/activateAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.ACTIVATE
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/load:
    post:
      summary: Load
      operationId: loadAccount
      tags:
        - Account
      description: This API endpoint allows the calling application to perform an initial Account Load and perform an optional Account `ACTIVATION` on successful load.
      requestBody:
        $ref: '#/components/requestBodies/loadAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/loadAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.LOAD
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    description: Load Account Transaction
                    operationType: CREATE
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
                    description: Activate Account Transaction, if applicable
        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'

  /connect/account/unlock:
    post:
      summary: Unlock
      operationId: unlockAccount
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to UNLOCK (`Release a Lock`) from `LOCKED` Wallet Account. Please note &#58;
        * This endpoint should be called in real-time only
        * Only the same unit which locked an Account(s) will be able to `UNLOCK` it (or `SETTLE`)
        * Lock will be automatically released, if Locked Account will not be `SETTLED` nor `UNLOCKED` within defined expiry lock time-out
      requestBody:
        $ref: '#/components/requestBodies/unlockAccountPayload'
      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'
      responses:
        200:
          $ref: '#/components/responses/unlockAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.UNLOCK
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/lock:
    post:
      summary: Lock
      operationId: lockAccount
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to explicitly request specified Account to be `locked`. Please note &#58;
        * this endpoint should be used in real-time only
        * Locked Wallet Accounts could not be used elsewhere,
        * all locked Accounts will automatically Expire if not `SETTLED` nor `UNLOCKED` within expiry lock time out
      requestBody:
        $ref: '#/components/requestBodies/lockAccountPayload'
      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'

      responses:
        200:
          $ref: '#/components/responses/lockAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.LOCK
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/redeem:
    post:
      summary: Redeem
      operationId: redeemAccount
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to Redeem an Individual AIR Account. Please note this endpoint is applicable for `COUPON` Type Accounts
      requestBody:
        $ref: '#/components/requestBodies/redeemAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/redeemAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.REDEEM
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/debit:
    post:
      summary: Debit
      operationId: debitAccount
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to Debit a Requested
        Account. Please note this endpoint is applicable for `STORED VALUE` or Loyalty `POINTS` Account Types
      requestBody:
        $ref: '#/components/requestBodies/debitAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/debitAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.DEBIT
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/credit:
    post:
      summary: Credit
      operationId: creditAccount
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to Credit a Requested
        Account. Please note this endpoint is applicable for `STORED VALUE` or Loyalty `POINTS` Account Types, and it will create an Account Transaction of type `CREDIT`
      requestBody:
        $ref: '#/components/requestBodies/creditAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'

      responses:
        200:
          $ref: '#/components/responses/creditAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.CREDIT
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/earn:
    post:
      summary: Earn
      operationId: earnPoints
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to Earn Points for a Requested
        Account of Type Loyalty Points
      requestBody:
        $ref: '#/components/requestBodies/earnAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/earnAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.EARN
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/spend:
    post:
      summary: Spend
      operationId: spendPoints
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to Spend Points from a Requested Account of Type (Loyalty) Points
      requestBody:
        $ref: '#/components/requestBodies/spendAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/spendAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.SPEND
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/stamp:
    post:
      summary: Stamp
      operationId: stampAccount
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to Stamp a Requested
        Account of Type (Loyalty) `STAMP CARD`
      requestBody:
        $ref: '#/components/requestBodies/stampAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      responses:
        200:
          $ref: '#/components/responses/stampAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.STAMP
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/unredeem:
    patch:
      summary: Unredeem
      operationId: unredeemAccountTransaction
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to Unredeem previously Redeemed Offer for Account type `COUPON`
      requestBody:
        $ref: '#/components/requestBodies/unredeemAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
        - $ref: '#/components/parameters/httpMethodOverride'
      responses:
        200:
          $ref: '#/components/responses/unredeemAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.UNREDEEM
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/refund:
    patch:
      summary: Refund
      operationId: refundAccountTransaction
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to perform a partial or full refund for a previously Debited  Account of type `STORED VALUE`
      requestBody:
        $ref: '#/components/requestBodies/refundAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
        - $ref: '#/components/parameters/httpMethodOverride'
      responses:
        200:
          $ref: '#/components/responses/refundAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.REFUND
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

  /connect/account/void:
    patch:
      summary: Void
      operationId: voidAccountTransaction
      tags:
        - Account
      description: >-
        This API endpoint allows the calling application to void previously Transacted Account. Please note&#58; a) not every AIR Transaction could be voided (i.e. creating an Account could not be voided) b) Voiding a Transaction will simply restore `accountEntity` to the state how it was just before voided transaction has happened, by creating "undo" account transaction.
      requestBody:
        $ref: '#/components/requestBodies/voidAccountPayload'
      parameters:
        - $ref: '#/components/parameters/httpAcceptEncodingRequest'
        - $ref: '#/components/parameters/httpConnectionRequest'
        - $ref: '#/components/parameters/httpContentTypeRequest'
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/eesDateTimeOverride'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
        - $ref: '#/components/parameters/httpMethodOverride'
      responses:
        200:
          $ref: '#/components/responses/voidAccountResponsePayload'
          x-eventNotifications:
            events:
              - eventName: POSCONNECT.ACCOUNT.VOID
                atomicOperations:
                  - schema:
                      allOf:
                        - $ref: '#/components/schemas/accountTransactionEntity'
                        - type: object
                          properties:
                            account:
                              $ref: '#/components/schemas/accountEntity'
                    operationType: CREATE
        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'

components:
  schemas:

    activateWalletResponse:
      type: object
      required:
        - identity
        - wallets
      properties:
        identity:
          $ref: '#/components/schemas/walletIdentityEntity'
        wallets:
          type: array
          description: An array of the affected wallets by the activate request.
          items:
            $ref: '#/components/schemas/walletEntity'
          nullable: false

    openWalletResponse:
      type: object
      required:
        - wallet
        - identity
        - accounts
        - additionalEntities
        - analyseBasketResults
        - basketAdjudicationResult
        - walletTransactions
        - accountLocks
        - walletTransaction
        - accountTransactions
        - spendAdjudicationResults
      properties:
        wallet:
          $ref: '#/components/schemas/walletEntity'
        identity:
          $ref: '#/components/schemas/walletIdentityEntity'
        accounts:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/accountEntity'
              - type: object
                required:
                  - enriched
                properties:
                  enriched:
                    $ref: '#/components/schemas/accountEnrichmentEntity'
        additionalEntities:
          type: object
          properties:
            consumer:
              allOf:
                - $ref: '#/components/schemas/walletConsumerEntity'
                - nullable: true
            identities:
              type: array
              items:
                $ref: '#/components/schemas/walletIdentityEntity'

        transactionCapabilities:
          type: object
          nullable: true
          description: >-
            Outlines the capabilities that a customer is allowed to complete in a transaction. This is an instruction
            to the POS, for example, to display the spend points options back to the customer
          properties:
            loyalty:
              nullable: false
              type: object
              description: >-
                Outlines the allowed capabilities of the customer for loyalty based operations
              properties:
                earn:
                  type: boolean
                  description: >-
                    States if the customer is in a state of being able to earn points in a transaction
                spend:
                  type: boolean
                  description: >-
                    States if the customer is in a state of being able to spend points in the transaction

        spendAdjudicationResults:
          type: object
          nullable: true
          properties:
            pointsValue:
              type: integer
              nullable: false
              description: >-
                The total number of points available to spend aggregated from ALL available points accounts
            pointsRemainder:
              type: integer
              nullable: false
              description: >-
                Any points that are not able to be spent due to spend rules configured against the scheme
            monetaryValue:
              type: integer
              nullable: false
              description: >-
                The calculated financial value of the points. This will be calculated from the rules configured
                against the relevant points schemes for each points account.
            operations:
              type: array
              items:
                type: object
                required:
                  - resourceId
                  - resourceType
                  - accountId
                  - walletId
                  - operationType
                  - value
                properties:
                  resourceType:
                    type: string
                    nullable: false
                    enum:
                      - "SCHEME"
                      - "CAMPAIGN"
                  resourceId:
                    type: string
                    format: string
                    nullable: false
                    description: >-
                      The ID of the campaign or scheme related to this operation.
                  accountId:
                    type: string
                    format: string
                    nullable: false
                    description: >-
                      The account ID to apply the operation against.
                  walletId:
                    type: string
                    format: string
                    nullable: false
                    description: >-
                      The wallet id in which the target account is housed.
                  operationType:
                    type: string
                    enum:
                      - "spend"
                      - "credit"
                      - "redeem"
                      - "createRedeem"
                  value:
                    type: integer
                    format: int32
                    description: >-
                      The value for which the intended operation should be completed.
                  details:
                    type: object
                    nullable: true
                    description: >-
                      Key-value pairs to apply to the account transaction.
                  balances:
                    type: object
                    nullable: true
                    description: >-
                      Required if a operation type is spend or credit.
                    properties:
                      current:
                        type: integer
                        description: >-
                          The value to credit or spend in the intended operation. This value is the number of points
                          to be spent.
                        nullable: false
                      lifetime_spend:
                        type: integer
                        description: >-
                          The value to add to the lifetime spend balance of the points account. Required
                          if the operationType is "spend". This value is the number of points to be spent.
                        nullable: false
                      lifetime_spend_value:
                        type: integer
                        description: >-
                          The value to add to the lifetime spend value balance field of the points account.
                          Required if the operationType is "spend". This value is the monetary value of the points
                          to be spent.
                  appliedTier:
                    $ref: '#/components/schemas/spendTierEntity'

            excludedProducts:
              type: object
              description: A list of all Scheme Ids which exclude products with their corresponding product identifiers.

        analyseBasketResults:
          type: object
          nullable: true
          properties:
            basket:
              $ref: '#/components/schemas/enrichedBasketEntity'
            points:
              $ref: '#/components/schemas/pointsEntity'
            bounceBack:
              $ref: '#/components/schemas/bounceBackEntity'
            discount:
              $ref: '#/components/schemas/discountEntity'
            tender:
              $ref: '#/components/schemas/discountEntity'

        basketAdjudicationResult:
          deprecated: true
          type: object
          nullable: true
          description: details TBC
        walletTransactions:
          type: array
          items:
            $ref: '#/components/schemas/walletTransactionEntity'
          nullable: true
        accountTransactions:
          type: array
          items:
            $ref: '#/components/schemas/accountTransactionEntity'
          nullable: true
        examine:
          type: array
          items:
            $ref: '#/components/schemas/enrichedExamineEntity'
          nullable: true

    tiersEnabledWalletAndAccountTransactionResponse:
      type: object
      required:
        - walletTransactions
        - accountTransactions
      properties:
        walletTransactions:
          type: array
          nullable: true
          description: Wallet Transaction(s) created as a result of this settle transaction.
          items:
            $ref: '#/components/schemas/walletTransactionEntity'
        accountTransactions:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/accountTransactionEntity'
        tierMembershipTransactions:
          type: array
          nullable: true
          description: Tier Membership Transaction(s) created as a result of this transaction.
          items:
            $ref: '#/components/schemas/tierMembershipTransactionEntity'
    walletAndAccountTransactionResponse:
      type: object
      required:
        - walletTransactions
        - accountTransactions
      properties:
        walletTransactions:
          type: array
          nullable: true
          description: Wallet Transaction(s) created as a result of this transaction.
          items:
            $ref: '#/components/schemas/walletTransactionEntity'
        accountTransactions:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/accountTransactionEntity'


    productExchangeResponse:
      type: object
      required:
        - walletTransactions
        - accountTransactions
      properties:
        walletTransactions:
          type: array
          nullable: false
          description: Wallet Transaction(s) created as a result of this product exchange operation.
          items:
            $ref: '#/components/schemas/walletTransactionEntity'
        accountTransactions:
          type: array
          nullable: true
          description: Account Transaction(s) created as a result of this product exchange operation.
          items:
            $ref: '#/components/schemas/accountTransactionEntity'

    fulfilResponse:
      type: object
      required:
        - walletTransactions
        - accountTransactions
      properties:
        walletTransactions:
          type: array
          nullable: false
          description: Wallet Transaction(s) created as a result of this fulfil operation
          items:
            $ref: '#/components/schemas/walletTransactionEntity'
        accountTransactions:
          type: array
          nullable: true
          description: Account Transaction(s) created as a result of this fulfil operation
          items:
            $ref: '#/components/schemas/accountTransactionEntity'

    verifyAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    activateAccountResponse:
      type: object
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'


    loadAccountResponse:
      type: object
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'

    redeemAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    unredeemAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    refundAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    voidAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    debitAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    creditAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    earnAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    stampAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    lockAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    createAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    createAccounts207Response:
      type: object
      oneOf:
        - type: object
          required:
            - successful
            - failed
            - all
          properties:
            successful:
              type: object
              required: [total, results]
              properties:
                total:
                  type: integer
                  format: int32
                  nullable: false
                  description: Successfully processed atomic operations count
                results:
                  type: array
                  nullable: true
                  items:
                    $ref: '#/components/schemas/walletAccountEntity'
            failed:
              type: object
              required: [total, results]
              properties:
                total:
                  type: integer
                  format: int32
                  nullable: false
                  description: Failed atomic operations count
                results:
                  type: array
                  nullable: true
                  items:
                    $ref: '#/components/schemas/defaultErrorEntity'
            all:
              type: object
              required: [total, results]
              properties:
                total:
                  type: integer
                  format: int32
                  nullable: false
                  description: Failed atomic operations count
                results:
                  type: array
                  nullable: true
                  items:
                    oneOf:
                      - $ref: '#/components/schemas/walletAccountEntity'
                      - $ref: '#/components/schemas/defaultErrorEntity'
            message:
              type: object
        - type: object
          properties:
            status:
              type: string
              default: SUCCESS
              enum:
                - SUCCESS
                - ERROR
                - PARTIAL SUCCESS
            details:
              type: array
              items:
                type: object

    createAccountTransactionsResponse:
      type: object
      oneOf:
        - type: object
          required:
            - accounts
          properties:
            accounts:
              type: array
              nullable: false
              items:
                $ref: '#/components/schemas/walletAccountEntity'
        - type: object
          properties:
            status:
              type: string
              default: SUCCESS
              enum:
                - SUCCESS
                - ERROR
                - PARTIAL SUCCESS
            details:
              type: array
              items:
                type: object

    spendAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    unlockAccountResponse:
      type: object
      required:
        - accountTransaction
      properties:
        accountTransaction:
          allOf:
            - $ref: '#/components/schemas/accountTransactionEntity'
            - type: object
              properties:
                account:
                  allOf:
                    - $ref: '#/components/schemas/accountEntity'
                    - type: object
                      properties:
                        enriched:
                          $ref: '#/components/schemas/accountEnrichmentEntity'
        message:
          type: object

    spendCalculateResponse:
      type: object
      properties:
        wallet:
          $ref: '#/components/schemas/walletEntity'
        identity:
          $ref: '#/components/schemas/walletIdentityEntity'
        transactionCapabilities:
          $ref: '#/components/schemas/transactionCapabilitiesEntity'
        spendAdjudicationResults:
          $ref: '#/components/schemas/spendAdjudicationResultsEntity'

    spendAdjudicationResultsEntity:
      type: object
      properties:
        pointsValue:
          type: integer
          description: >-
            The number of points that are allowed to be spent based on the number passed in.
        pointsRemainder:
          type: integer
          description: >-
            The number of points that cannot be spent due to the available tiers and stepping rules.
        monetaryValue:
          type: integer
          description: >-
            The monetary value of the points that are available to be spent in relation to `pointsValue`. This includes any available bonuses applied.
        balanceAfter:
          $ref: '#/components/schemas/spendBalancesAfterEntity'
        appliedTier:
          $ref: '#/components/schemas/spendTierEntity'
        operations:
          type: array
          items:
            $ref: '#/components/schemas/spendOperationsEntity'
        analysedDateTime:
          type: string
          format: ees-date-time
          description: SpendAdjudicationResults Date-Time in ATOM format
          nullable: false
        excludedProducts:
          type: object
          description: A list of all Scheme Ids which exclude products with their corresponding product identifiers.

    spendOperationsEntity:
      type: object
      properties:
        resourceType:
          type: string
          nullable: false
          description: >-
            The determination if this is a scheme or campaign based operation.
          enum:
            - SCHEME
            - CAMPAIGN
        resourceId:
          type: string
          format: string
          nullable: false
          description: >-
            The ID of the campaign or scheme related to this operation.
        accountId:
          type: string
          format: string
          nullable: false
          description: >-
            The account against which the determined operation is to be performed.
        walletId:
          type: string
          format: string
          nullable: false
          description: >-
            The walletId in which the account resides.
        operationType:
          type: string
          nullable: false
          enum:
            - spend
            - credit
            - redeem
            - createRedeem
          description: >-
            The type of operation to apply.
        value:
          type: integer
          nullable: false
          description: >-
            The value of the operation to apply.
        details:
          type: object
          nullable: true
        balances:
          type: object
          nullable: true
          description: >-
            The balances of the account to be adjusted. If the operation type is `spend`, the `current`,
            `lifetime_spend`, and `lifetime_spend_value` are all required. If the operation is `credit`, the current
            value is  required, if the operation type is `redeem` this key is not required.
          properties:
            current:
              type: integer
              description: >-
                The adjustment to make to the current balance. This value is a points value.
            lifetime_spend:
              type: integer
              description: >-
                The adjustment to make to the lifetime_spend balance. This value is a points value.
            lifetime_spend_value:
              type: integer
              description: >-
                The adjustment to make to the lifetime_spend_value balance. This value is a monetary value.

    transactionCapabilitiesEntity:
      type: object
      required:
        - loyalty
      description: >-
        This object outlines the operations which the customer is allowed to complete in relation to loyalty operations.
      properties:
        loyalty:
          type: object
          properties:
            earn:
              type: boolean
              description: >-
                Determines if the wallet allows earning of points.
            spend:
              type: boolean
              description: >-
                Determines if the wallet allows spending of points.

    openWalletEntity:
      type: object
      required:
        - wallets
        - analyseBasketResults
        - basketAdjudicationResult
        - walletTransactions
        - accountLocks
        - walletTransaction
        - accountTransactions
      properties:
        wallets:
          type: array
          description: >-
            Array of Wallets opened by Identities values, presented by calling
            application
          items:
            type: object
            required:
              - wallet
              - consumer
              - identities
              - accounts
              - accountsEnriched
            properties:
              wallet:
                allOf:
                  - $ref: '#/components/schemas/walletEntity'
              consumer:
                allOf:
                  - $ref: '#/components/schemas/walletConsumerEntity'
                  - nullable: true
              identities:
                type: object
                required:
                  - used
                  - other
                properties:
                  used:
                    type: object
                    required:
                      - total
                      - items
                    properties:
                      total:
                        type: integer
                        format: int32
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/walletIdentityEntity'
                  other:
                    type: object
                    nullable: true
                    properties:
                      filter:
                        type: array
                        items:
                          type: object
                      sortBy:
                        type: array
                        items:
                          type: object
                      total:
                        type: integer
                        format: int32
                      limit:
                        type: integer
                        format: int32
                      offset:
                        type: integer
                        format: int32
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/walletIdentityEntity'
              accounts:
                type: object
                nullable: true
                properties:
                  filter:
                    type: array
                    items:
                      type: object
                  sortBy:
                    type: array
                    items:
                      type: string
                      pattern: '^([a-zA-Z]+)(\,(ASC|DESC))?$'
                      enum:
                        - 'type,ASC'
                        - 'type,DESC'
                        - 'clientType,ASC'
                        - 'clientType,DESC'
                        - 'status,ASC'
                        - 'status,DESC'
                        - 'state,ASC'
                        - 'state,DESC'
                        - 'dateCreated,ASC'
                        - 'dateCreated,DESC'
                  total:
                    type: integer
                    format: int32
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/accountEntity'

        analyseBasketResults:
          type: object
          required:
            - redeem
            - issueAndRedeem
            - issue
            - credit
            - stamp
          properties:
            redeem:
              type: array
              description: >-
                Analyse Consumer's Basket and present back existing and issued
                COUPONS, available for Redemption, for that particular Client
              nullable: true
              items:
                type: object
                properties:
                  accountId:
                    type: string
                    format: string
                    description: EES AIR Wallet Account Id
                  type:
                    type: string
                    format: string
                    description: Wallet Account Type
                  campaignId:
                    type: string
                    format: string
                    description: EES AIR Campaign Id
                  campaignName:
                    type: string
                    format: string
                    description: EES AIR Campaign Name
                  offerId:
                    type: string
                    format: string
                    description: EES AIR Offer Id
                  offerName:
                    type: string
                    format: string
                    description: EES AIR Offer
                  promoId:
                    type: string
                    format: string
                    description: Offer Promo Id
            issueAndRedeem:
              description: >-
                Analyse Consumer's Basket and propose what COUPONS should be
                Issued and immediately Redeemed, as part of this Client
                Transaction
              nullable: true
              items:
                type: object
                properties:
                  type:
                    type: string
                    format: string
                    description: Wallet Account Type
                  campaignId:
                    type: string
                    format: string
                    description: EES AIR Campaign Id
                  campaignName:
                    type: string
                    format: string
                    description: EES AIR Campaign Name
                  offerId:
                    type: string
                    format: string
                    description: EES AIR Offer Id
                  offerName:
                    type: string
                    format: string
                    description: EES AIR Offer
            issue:
              description: >-
                Analyse Consumer's Basket and propose what COUPONS should be
                Issued and stored in Consumer's Wallet as part of this Client
                Transaction (for future use)
              nullable: true
              items:
                type: object
                properties:
                  type:
                    type: string
                    format: string
                    description: Wallet Account Type
                  campaignId:
                    type: string
                    format: string
                    description: EES AIR Campaign Id
                  campaignName:
                    type: string
                    format: string
                    description: EES AIR Campaign Name
                  offerId:
                    type: string
                    format: string
                    description: EES AIR Offer Id
                  offerName:
                    type: string
                    format: string
                    description: EES AIR Offer
            credit:
              description: >-
                Analyse Consumer's Basket and propose what existing Stored Value
                or POINTS Account(s) should be Credited, as part of this Client
                Transaction
              nullable: true
              items:
                type: object
                properties:
                  accountId:
                    type: string
                    format: string
                    description: EES AIR Wallet Account Id
                  type:
                    type: string
                    format: string
                    description: Wallet Account Type
                  campaignId:
                    type: string
                    format: string
                    description: EES AIR Programme or Scheme ID
                  campaignName:
                    type: string
                    format: string
                    description: EES AIR Programme or Scheme Name
                  amount:
                    type: integer
                    format: int32
                    description: >-
                      Proposed amount to be credited to appropriate EES AIR
                      Wallet Account
            stamp:
              description: >-
                Analyse Consumer's Basket and propose what existing `STAMP_CARD`
                Account(s) should be Stamped, as part of this Client Transaction
              nullable: true
              items:
                type: object
                properties:
                  accountId:
                    type: string
                    format: string
                    description: EES AIR Wallet Account Id
                  type:
                    type: string
                    format: string
                    description: Wallet Account Type
                  campaignId:
                    type: string
                    format: string
                    description: EES AIR Scheme ID
                  campaignName:
                    type: string
                    format: string
                    description: EES AIR Scheme Name
        basketAdjudicationResult:
          type: object
          nullable: true
          description: details TBC
        accountLocks:
          type: array
          items:
            type: object
            required:
              - accountId
              - lockExpire
            properties:
              accountId:
                type: string
                format: string
                description: EES AIR Wallet Account
              amountLocked:
                type: integer
                format: int32
                description: locked amount within that Wallet Account (if applicable)
                default: 0
              lockExpire:
                type: string
                format: date-time
        walletTransactions:
          type: array
          items:
            $ref: '#/components/schemas/walletTransactionEntity'
          nullable: true
        accountTransactions:
          type: array
          items:
            $ref: '#/components/schemas/accountTransactionEntity'
          nullable: true

    spendTierEntity:
      type: object
      properties:
        floor:
          type: integer
          format: int32
          description: Spend Tier lower limit
        ceiling:
          type: integer
          format: int32
          description: Spend Tier upper limit
        step:
          type: integer
          format: int32
          nullable: true
          description: >-
            Spend Tier increments that points can be spent in (e.g. if points
            can be exchanged at 5,000, 10,000, 15,000 and so on, the `step`
            should be equal 5,000)
        rate:
          type: number
          format: float
          nullable: true
          description: >-
            Spend Tier Exchange Rate (for example if `rate=0.1` would indicate
            each point is worth 1/10 of smallest currency denomination, i.e.
            1/10 of a penny or a cent)
        bonus:
          type: integer
          format: int32
          description: >-
            Spend Tier bonus to be added to the exchange value if this Tier
            definition is used.
        pointsBack:
          type: integer
          format: int32
          nullable: true
          description: >-
            Spend Tier number of points to be credited back to the points
            account following a points spend transaction if this Tier definition
            is used.

    earnTierEntity:
      type: object
      properties:
        tierName:
          type: string
          format: string
          nullable: true
          description: Earn Tier Name
        floor:
          type: integer
          format: int32
          description: Earn Tier lower limit
        ceiling:
          type: integer
          format: int32
          description: Earn Tier upper limit
        rate:
          type: number
          format: float
          nullable: true
          description: >-
            Earn Tier Exchange Rate (for example if `rate=0.1` would indicate
            each point is worth 1/10 of smallest currency denomination, i.e.
            1/10 of a penny or a cent)

    walletEntity:
      type: object
      required:
        - walletId
        - friendlyName
        - status
        - type
        - state
        - relationships
        - meta
        - dateCreated
        - lastUpdated
      properties:
        walletId:
          type: string
          description: Wallet ID
        friendlyName:
          type: string
          description: Friendly Name of the Wallet
        status:
          type: string
          description: Status of the Wallet.
          enum:
            - ACTIVE
            - SUSPENDED
            - INACTIVE
        type:
          type: string
          description: >-
            `TYPE` of that particular wallet. Could be defined per AIR Tenant as
            part of the Client Onboarding process and then used, if this list is
            not defined only NULL values are available.
        state:
          type: string
          description: >-
            `STATE` of that particular wallet. Could be defined per AIR Tenant
            as part of the Client Onboarding process and then used, if this list
            is not defined only NULL values are available.
        relationships:
          $ref: '#/components/schemas/walletRelationshipsEntity'
        meta:
          $ref: '#/components/schemas/metaEntity'
        dateCreated:
          description: Wallet creation date time
          type: string
          format: date-time
        lastUpdated:
          description: Wallet last updated date time
          type: string
          format: date-time

    walletIdentityEntity:
      type: object
      required:
        - identityId
        - walletId
        - type
        - friendlyName
        - value
        - safeValue
        - secret
        - dates
        - meta
        - state
        - status
        - dateCreated
        - lastUpdated
        - mobileWallet
      properties:
        identityId:
          type: string
          description: EES AIR Wallet Identity ID
        walletId:
          type: string
          description: EES AIR Wallet ID
        type:
          type: string
          description: >-
            Type of the Identity, list of possible enum values could be defined
            per Client as part of the Onboarding process.
        friendlyName:
          type: string
          description: Wallet Identity friendly name
        value:
          type: string
          description: Wallet Identity value
        safeValue:
          type: string
          description: >-
            Identity Safe Value (e.g. "original value salted and hashed") -
            safeValue could be than used in external systems like analytics,
            referencing original identity, provide uniqueness within a retailer,
            but without exposing sensitive information like card number.
        secret:
          type: string
          description: Wallet Identity secret
        dates:
          $ref: '#/components/schemas/datesEntity'
        meta:
          $ref: '#/components/schemas/metaEntity'
        state:
          type: string
          description: >-
            Wallet Identity state, list of possible values could be defined and
            set-up per Client during Onboarding process.
        status:
          type: string
          description: Identity status
          enum:
            - ACTIVE
            - DELETED
            - SUSPENDED
            - LOST
            - STOLEN
            - INACTIVE
        dateCreated:
          description: Date this identity was created
          type: string
          format: date-time
        lastUpdated:
          description: Date this identity was last updated
          type: string
          format: date-time
        mobileWallet:
          description: A url that can be used to add this identity to a mobile wallet (like Apple Wallet and Google Pay)
          type: string

    walletConsumerEntity:
      type: object
      required:
        - consumerId
        - walletId
        - friendlyName
        - type
        - status
        - state
        - data
        - meta
        - dateCreated
        - lastUpdated

      properties:
        consumerId:
          type: string
          description: EES AIR Wallet Consumer ID
        walletId:
          type: string
          description: EES AIR Wallet ID
        friendlyName:
          type: string
          description: Wallet Consumer Friendly Name
        type:
          type: string
          description: >-
            Wallet Consumer type. Types are managed per retailer base and could
            be set-up as part of the Onboarding process.
        status:
          type: string
          description: Wallet Consumer status.
          enum:
            - ACTIVE
            - DELETED
        state:
          type: string
          description: >-
            Wallet Consumer State. States are managed per retailer base and
            could be set-up as part of the Onboarding process.
        data:
          type: object
          description: >
            Additional Wallet Consumer Data. Please note Wallet Consumer Data
            structure could be defined within AIR per Client. If this structure
            is defined, AIR can provide validation of content using regular
            expressions.
          oneOf:
            - type: object
              title: Legacy Data
              description: Older key/value pair consumer data.
              properties:
                key:
                  title: Consumer data type name
                  type: array
                  items:
                    type: object
                    properties:
                      key1:
                        title: Data property name
                        description: Data property value.
                      key2:
                        title: Data property name
                        description: Data property value.
            - type: object
              title: Standard Consumer Data
              description: Structured data for a consumer.
              properties:
                key:
                  title: Consumer data type
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        title: Data property type name
                      segments:
                        type: array
                        title: Data property content
                        items:
                          description: Data property content value.
                          type: object
                          properties:
                            key1:
                              title: Data property name
                              description: Data property value.
                            key2:
                              title: Data property name
                              description: Data property value.
        meta:
          $ref: '#/components/schemas/metaEntity'
        dateCreated:
          description: Date this Wallet Consumer was created
          type: string
          format: date-time
        lastUpdated:
          description: Date this Wallet Consumer was last updated
          type: string
          format: date-time

    accountEntity:
      type: object
      required:
        - accountId
        - walletId
        - campaignId
        - campaign
        - type
        - clientType
        - accountMeta
        - overrides
        - status
        - state
        - dates
        - meta
        - balances
        - dateCreated
        - lastUpdated
      description: EES AIR Account object.
      properties:
        accountId:
          type: string
          format: string
          nullable: true
          description: EES AIR Account ID. (Please note for open offers this field will be null)
        walletId:
          type: string
          format: string
          nullable: true
          description: EES AIR Wallet ID. (Please note for non-wallet Clients this value will be empty)
        campaignId:
          type: string
          nullable: false
          description: >-
            The Campaign ID (Scheme ID, Programme ID or Plan ID) this Account belongs to.
        campaign:
          type: object
          description: >-
            The campaign payload. See campaign documentation for details.
          properties:
            campaignId:
              type: string
              nullable: false
              description: >-
                The Campaign ID (Scheme ID, Programme ID or Plan ID) this Account belongs to.
            campaignTypeId:
              type: string
              nullable: false
              description: The Campaign type ID of this campaign.
            campaignMode:
              type: string
              nullable: false
              enum:
                - OPEN
                - RESTRICTED
              description:
                Determines if the campaign operates in open or restricted mode.
            campaignName:
              type: string
              nullable: false
              description:
                The name of the campaign.
            accountTypeId:
              type: integer
              description: Account Type ID (EES Internal Type Reference).
            startDate:
              type: string
              format: ees-date-time
              description: Start date of the campaign.
            endDate:
              type: string
              format: ees-date-time
              description: End date of the campaign.
              nullable: true
            status:
              type: string
              description: The status of the Campaign.
              enum:
                - ACTIVE
                - INACTIVE
                - EXPIRED
                - DELETED
                - PENDING
                - DRAFT
                - REJECTED
                - READY
                - STOPPED
                - SUSPENDED
            sequenceKey:
              type: string
              nullable: true
              description: The value of the barcode.
            reference:
              type: string
              format: string
              description: A reference string that is unique to this campaign.
              nullable: true
            dateCreated:
              type: string
              format: ees-date-time
              description: Date that this campaign was created on.
            lastUpdated:
              type: string
              format: ees-date-time
              description: Date that this campaign was last updated.
            relationships:
              type: object
              nullable: true
              properties:
                OBJECTIVE_OF:
                  type: object
                  nullable: true
                  properties:
                    CAMPAIGN:
                      type: array
                      items:
                        type: object
                        properties:
                          campaignId:
                            type: string
                            description: The ID of the campaign that this campaign is an objective of.
                          dateCreated:
                            type: string
                            format: ees-date-time
                            description: The date that this relationship was created on.
                OBJECTIVE:
                  type: object
                  nullable: true
                  properties:
                    CAMPAIGN:
                      type: array
                      items:
                        type: object
                        properties:
                          campaignId:
                            type: string
                            description:  The campaign ID of the objective campaign
                          dateCreated:
                            type: string
                            format: ees-date-time
                            description: The date that this relationship was created on.
                ENTITLEMENT:
                  type: object
                  nullable: true
                  properties:
                    CAMPAIGN:
                      type: array
                      items:
                        type: object
                        properties:
                          accountId:
                            type: string
                            description: The campaignId that the entitlement accounts will be created from.
                          dateCreated:
                            type: string
                            format: ees-date-time
                            description: The date that this relationship was created on.
                ENTITLEMENT_OF:
                  type: object
                  nullable: true
                  properties:
                    PLAN:
                      type: array
                      items:
                        type: object
                        properties:
                          campaignId:
                            type: string
                            description: The campaignId of the plan that uses this campaign to create entitlement accounts.
                          dateCreated:
                            type: string
                            format: ees-date-time
                            description: The date that this relationship was created on.
                AGGREGATE_CHILD:
                  type: object
                  nullable: true
                  properties:
                    SCHEME:
                      type: array
                      items:
                        type: object
                        properties:
                          campaignId:
                            type: string
                            description: The campaignId of the scheme that is a child of this scheme.
                          dateCreated:
                            type: string
                            format: ees-date-time
                            description: The date that this relationship was created on.
                AGGREGATE_CHILD_OF:
                  type: object
                  nullable: true
                  properties:
                    SCHEME:
                      type: array
                      items:
                        type: object
                        properties:
                          campaignId:
                            type: string
                            description: The campaignId of the scheme that this is the child of.
                          dateCreated:
                            type: string
                            format: ees-date-time
                            description: The date that this relationship was created on.
                PROMOTION:
                  type: object
                  nullable: true
                  properties:
                    CAMPAIGN:
                      type: array
                      items:
                        type: object
                        properties:
                          campaignId:
                            type: string
                            description: The campaignId of promotions a customer maybe eligible for..
                          dateCreated:
                            type: string
                            format: ees-date-time
                            description: The date that this relationship was created on.
                PROMOTION_OF:
                  type: object
                  nullable: true
                  properties:
                    CAMPAIGN:
                      type: array
                      items:
                        type: object
                        properties:
                          campaignId:
                            type: string
                            description: The campaignId of the multi-discount coupon that triggers rewards from this campaign.
                          dateCreated:
                            type: string
                            format: ees-date-time
                            description: The date that this relationship was created on.
        type:
          type: string
          nullable: false
          description: EES AIR Wallet Account Type.
          enum:
            - ECOUPON
            - VOUCHER
            - STAMP_CARD
            - PAPER
            - DEBIT
            - PLASTIC
            - POINTS
            - BASIC_SUBSCRIPTION
            - CONTINUITY
        clientType:
          type: string
          description: >-
            Account Client's type, managed per EES AIR tenant, list of possible enum values could be set-up as part of the Onboarding process. (Please note&#58; for non-wallet Clients this value will be empty)
          format: string
          nullable: true
        status:
          type: string
          description: Account Status
          nullable: false
          enum:
            - ACTIVE
            - BLOCKED
            - CANCELLED
            - DELETED
            - EXPIRED
            - INACTIVE
            - INVALIDATED
            - LOCKED
            - STOLEN
            - USED
        state:
          type: string
          format: string
          nullable: true
          description: >-
            Account State, managed per EES AIR tenant, list of possible enum values could be set-up as part of the Onboarding process. (Please note&#58; for non-wallet Clients this value will be empty)
        dates:
          $ref: '#/components/schemas/datesEntity'
        accountMeta:
          $ref: '#/components/schemas/metaEntity'
        balances:
          $ref: '#/components/schemas/accountBalancesEntity'
        overrides:
          $ref: '#/components/schemas/accountOverridesEntity'
        dateCreated:
          description: Account Creation Date-Time (Atom format)
          type: string
          format: ees-date-time
          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])$
        lastUpdated:
          description: Account Last Update Date-Time (Atom format)
          type: string
          format: ees-date-time
          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])$
    accountOverridesEntity:
      oneOf:
        - $ref: '#/components/schemas/couponAccountOverridesEntity'
        - $ref: '#/components/schemas/continuityAccountOverridesEntity'

    continuityAccountOverridesEntity:
      type: object
      nullable: true
      description: Account Override for Continuity Type Account.
      properties:
        continuityQualification:
          type: object
          description: Overrides for continuity qualification.
          nullable: true
          properties:
            totalTransactionCount:
              type: integer
              description: Account override for totalTransactionCount - Only valid if campaign uses totalTransactionCount.
              nullable: true
            totalTransactionSpend:
              type: integer
              description: Account override for totalTransactionSpend - Only valid if campaign uses totalTransactionSpend.
              nullable: true
            totalTransactionUnits:
              type: integer
              description: Account override for totalTransactionUnits - Only valid if campaign uses totalTransactionUnits.
              nullable: true
        reward:
          type: object
          description: Overrides for continuity rewards
          nullable: true
          properties:
            creditAmount:
              type: integer
              description: Account override for the amount of points to be awarded.

    couponAccountOverridesEntity:
      type: object
      nullable: true
      required: [offer,campaign]
      properties:
        offer:
          type: object
          description: Account's Offer Override (applicable for `COUPON` Account type)
          required: [reward,qualification]
          properties:
            reward:
              type: object
              nullable: true
              minProperties: 0
              maxProperties: 5
              description: Account's Offer Reward Override
              properties:
                discountValue:
                  type: number
                  format: float
                  description: EES AIR Account Override&#58; Discount Value
                  nullable: true
                discountPercentage:
                  type: number
                  format: float
                  description: EES AIR Account Override&#58; Discount Percentage
                  nullable: true
                creditAmount:
                  type: number
                  format: float
                  description: EES AIR Account Override&#58; Credit Amount
                  nullable: true
                finalAmount:
                  type: number
                  format: float
                  description: EES AIR Account Override&#58; Final Amount
                  nullable: true
                percentageAmount:
                  type: number
                  format: float
                  description: EES AIR Account Override&#58; Percentage Amount
                  nullable: true
            qualification:
              type: object
              description: Account's Offer Qualification Override (Structure TBC)
        campaign:
          type: object
          description: Campaign Rules Override (applicable for `COUPON` Account type )
          nullable: true
          properties:
            rules:
              type: object
              properties:
                couponLimit:
                  type: integer
                  format: int32
                  nullable: true
                  description: >-
                    Limit of Maximum number of times a Coupon Account can be redeemed

    walletAccountEntity:
      type: object
      required:
        - accountId
        - walletId
        - campaignId
        - type
        - clientType
        - status
        - state
        - dates
        - meta
        - balances
        - dateCreated
        - lastUpdated
      description: The Wallet Account object.
      properties:
        accountId:
          type: string
          format: string
          description: EES AIR Wallet Account ID
        walletId:
          type: string
          format: string
          description: EES AIR Wallet ID
        campaignId:
          type: string
          description: >-
            The Campaign ID (Scheme ID, Programme ID or Plan ID) this Wallet
            Account belongs to.
        type:
          type: string
          description: EES AIR Wallet Account Type.
          enum:
            - ECOUPON
            - VOUCHER
            - STAMP_CARD
            - PAPER
            - DEBIT
            - PLASTIC
            - POINTS
            - BASIC_SUBSCRIPTION
        clientType:
          type: string
          description: Account client type.
        status:
          type: string
          description: Account status
          enum:
            - ACTIVE
            - BLOCKED
            - CANCELLED
            - DELETED
            - EXPIRED
            - INACTIVE
            - INVALIDATED
            - LOCKED
            - STOLEN
            - USED
        state:
          type: string
          description: >-
            Account state, managed per retailer base, list of possible enum
            values could be set-up as part of the Onboarding process.
        dates:
          $ref: '#/components/schemas/datesEntity'
        meta:
          $ref: '#/components/schemas/metaEntity'
        balances:
          $ref: '#/components/schemas/accountBalancesEntity'
        dateCreated:
          description: Date this Account was created
          type: string
          format: date-time
        lastUpdated:
          description: Date this Account was last updated
          type: string
          format: date-time

    campaignAccountEnrichment:
      type: object
      required:
        - enrichmentType
        - campaignName
        - campaignReference
        - qualifier
        - reward
      properties:
        enrichmentType:
          type: string
          enum:
            - COUPON
        campaignName:
          type: string
          format: string
          description: Campaign Name
        campaignReference:
          type: string
          format: string
          description: Campaign Reference
        qualifier:
          type: array
          nullable: true
          items:
            type: object
            description: TBC (reserved for future use)
        token:
          type: string
          format: string
          description: Token
          nullable: true
        reward:
          type: object
          nullable: true
          required:
            - offerId
            - offerName
            - posReference
          properties:
            offerId:
              type: string
              format: string
              description: Offer ID
              nullable: true
            offerName:
              type: string
              format: string
              description: Offer Name
              nullable: true
            posReference:
              type: string
              format: string
              description: Offer reference (Promo Id)
              nullable: true
        custom:
          description: Configured custom form fields in key-value pair format, grouped by form.
          nullable: true
          type: object
        restrictions:
          type: object
          properties:
            limits:
              type: object
              properties:
                period:
                  type: array
                  items:
                    type: object
                    properties:
                      threshold:
                        type: string
                        description: Redemption Restriction Type.
                        enum:
                          - LIFETIME
                          - DAY
                          - WEEK
                          - MONTH
                          - YEAR
                      start:
                        type: string
                        format: ees-date-time
                        description: Information when next restriction cycle would start in ATOM date-time format.
                        nullable: false
                      limit:
                        type: integer
                        format: int32
                        description: Numeric limit for this Redemption Restriction Type.
                        nullable: false
                      used:
                        type: integer
                        format: int32
                        description: Amount of Redemptions for that particular Restriction Type.
                        nullable: false
                      remaining:
                        type: integer
                        format: int32
                        description: Remaining Redemptions for that particular Restriction Type.
                        nullable: false
                      lockedRedemptions:
                        type: integer
                        format: int32
                        description: The number of locked redemptions prior to this open call.
                        nullable: false
                creditsPerPeriod:
                  type: array
                  items:
                    type: object
                    properties:
                      threshold:
                        type: string
                        description: Credit Restriction Type.
                        enum:
                          - ACCOUNT_REWARD_DAY
                          - ACCOUNT_REWARD_WEEK
                      start:
                        type: string
                        format: date-time
                        description: Information when next restriction cycle would start in ATOM date-time format.
                        nullable: false
                      limit:
                        type: integer
                        format: int32
                        description: Numeric limit for this Credit Restriction Type.
                        nullable: false
                      used:
                        type: integer
                        format: int32
                        description: Amount of Credits for that particular Restriction Type.
                        nullable: false
                      remaining:
                        type: integer
                        format: int32
                        description: Remaining Credits for that particular Restriction Type.
                        nullable: false
                rewardsPerPeriod:
                  type: array
                  items:
                    type: object
                    properties:
                      threshold:
                        type: string
                        description: Reward Restriction Type.
                        enum:
                          - ACCOUNT_REWARD_DAY
                          - ACCOUNT_REWARD_UNITS_DAY
                          - ACCOUNT_REWARD_UNITS_WEEK                          -
                          - ACCOUNT_REWARD_MONTH
                          - ACCOUNT_REWARD_UNITS_MONTH
                          - ACCOUNT_REWARD_UNITS_YEAR
                          - ACCOUNT_REWARD_UNITS_LIFETIME
                      start:
                        type: string
                        format: date-time
                        description: Information when next restriction cycle would start in ATOM date-time format.
                        nullable: false
                      limit:
                        type: integer
                        format: int32
                        description: Numeric limit for this Reward Restriction Type.
                        nullable: false
                      used:
                        type: integer
                        format: int32
                        description: Amount of Rewards for that particular Restriction Type.
                        nullable: false
                      remaining:
                        type: integer
                        format: int32
                        description: Remaining Rewards for that particular Restriction Type.
                        nullable: false
                lifetime:
                  type: array
                  items:
                    type: object
                    properties:
                      limit:
                        type: integer
                        format: int32
                        description: The maximum number of redemptions for this account. 0 means an unlimited account.
                        nullable: false
                      used:
                        type: integer
                        format: int32
                        description: The number of redemptions that have been used.
                        nullable: false
                      remaining:
                        type: integer
                        format: int32
                        description: The number of remaining redemptions. Will be null for unlimited accounts.
                        nullable: true
                      lockedRedemptions:
                        type: integer
                        format: int32
                        description: The number of locked redemptions prior to this request.
                        nullable: false
        redemptionWindows:
          type: object
          properties:
            rolling:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/windowEntity'
            exclusions:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/exclusionWindowEntity'

    programmeAccountEnrichment:
      type: object
      required:
        - enrichmentType
        - programmeName
        - programmeReference
      properties:
        enrichmentType:
          type: string
          nullable: false
          enum:
            - PROGRAMME
        programmeName:
          type: string
          format: string
          nullable: false
          description: Programme Name
        programmeReference:
          type: string
          format: string
          nullable: false
          description: Programme Reference
        token:
          type: string
          format: string
          description: Token
          nullable: true

    stampAccountEnrichment:
      type: object
      required:
        - enrichmentType
        - schemeName
        - schemeReference
      properties:
        enrichmentType:
          type: string
          enum:
            - STAMP
        schemeName:
          type: string
          format: string
          description: Scheme Name
        schemeReference:
          type: string
          format: string
          description: Scheme Reference
        properties:
          type: object

    pointsAccountEnrichment:
      type: object
      required:
        - enrichmentType
        - schemeName
        - schemeReference
      properties:
        enrichmentType:
          type: string
          enum:
            - POINTS
        schemeName:
          type: string
          format: string
          description: Scheme Name
        schemeReference:
          type: string
          format: string
          description: Scheme Reference
        properties:
          type: object
          properties:
            redemptionRates:
              type: object
              nullable: true
              description: Scheme Redemption Rates
            goodwill:
              type: object
              nullable: true
              description: Scheme Goodwill
            credit:
              type: object
              nullable: true
              description: Scheme Redemption Rates
            debit:
              type: object
              nullable: true
              description: Scheme Debit
            details:
              type: object
              nullable: true
              description: Scheme Details
            earnRates:
              type: object
              nullable: true
              description: Scheme Earn Rates
            baseEarn:
              type: object
              nullable: true
              description: Scheme Base Earn
            pointsExpiry:
              type: object
              nullable: true
              properties:
                validTo:
                  type: string
                  format: date-time
                  nullable: false
                  description: Time at which the points expire.
                points:
                  type: integer
                  format: int32
                  nullable: false
                  default: 0
                  description: Number of points.
        tierMembership:
          type: object
          required:
            - tierMembershipId
            - tierId
            - status
            - accountIds
            - balances
            - expiryDate
            - dateCreated
            - lastUpdated
          nullable: true
          properties:
            tierMembershipId:
              type: integer
              description: The Id of the tier membership.
            tierId:
              type: integer
              description: The Id of the tier the membership belongs to.
            status:
              type: string
              description: The current status of this tier membership.
              enum:
                - ACTIVE
                - DELETED
            accountIds:
              type: array
              description: A list of any accountIds in this membership
              items:
                type: string
                format: string
                description: EES AIR Account ID
            balances:
              type: object
              required:
                - points
                - spend
                - transactions
              properties:
                points:
                  type: integer
                  description: The tier membership points balance.
                spend:
                  type: integer
                  description: The tier membership total spend.
                transactions:
                  type: integer
                  description: The number of transactions against this tier membership.
            expiryDate:
              type: string
              format: date-time
              description: DateTime string with the expiry date of the membership.
            dateCreated:
              type: string
              format: date-time
              description: DateTime string with the time the membership was created.
            lastUpdated:
              type: string
              format: date-time
              description: DateTime string with the time the membership was last updated.
            tierBalancesResetDate:
              type: string
              format: date-time
              nullable: true
              description: DateTime string containing the date when membership balances reset (if set)
            enriched:
              type: object
              description: Holds any extra details required about the tier membership.
              properties:
                tierName:
                  type: string
                  description: The name of the tier associated with this membership.

    continuityAccountEnrichment:
      type: object
      required:
        - enrichmentType
        - campaignName
        - campaignReference
      properties:
        token:
          type: string
          nullable: true
          description: The account's token
        qualifier:
          type: object
          description: The campaign's qualifications
          properties:
            continuity:
              type: object
              properties:
                totalTransactionCount:
                  nullable: true
                  type: integer
                  description: The number of transactions required to qualify for this coupon.
                totalTransactionSpend:
                  nullable: true
                  type: integer
                  description: The total spend amount required to qualify for this coupon.
                totalTransactionUnits:
                  nullable: true
                  type: integer
                  description: Account override for totalTransactionUnits - Only valid if campaign uses totalTransactionUnits.
        reward:
          type: object
          nullable: true
          required:
            - offerId
            - offerName
            - posReference
          properties:
            offerId:
              type: string
              format: string
              description: Offer ID
              nullable: true
            offerName:
              type: string
              format: string
              description: Offer Name
              nullable: true
            posReference:
              type: string
              format: string
              description: Offer reference (Promo Id)
              nullable: true
        custom:
          description: Configured custom form fields in key-value pair format, grouped by form
          nullable: true
          type: object
        restrictions:
          type: object
          properties:
            limits:
              type: object
              properties:
                period:
                  type: array
                  items:
                    type: object
                    properties:
                      threshold:
                        type: string
                        description: Redemption Restriction Type
                        enum:
                          - LIFETIME
                          - DAY
                          - WEEK
                          - MONTH
                          - YEAR
                      start:
                        type: string
                        format: ees-date-time
                        description: Information when next restriction cycle would start in ATOM date-time format
                        nullable: false
                      limit:
                        type: integer
                        format: int32
                        description: Numeric limit for this Redemption Restriction Type
                        nullable: false
                      used:
                        type: integer
                        format: int32
                        description: Amount of Redemptions for that particular Restriction Type
                        nullable: false
                      remaining:
                        type: integer
                        format: int32
                        description: Remaining Redemptions for that particular Restriction Type
                        nullable: false
        redemptionWindows:
          type: object
          properties:
            rolling:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/windowEntity'
            exclusions:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/exclusionWindowEntity'
        enrichmentType:
          type: string
          enum:
            - CONTINUITY
        campaignName:
          type: string
          format: string
          description: Campaign Name.
        campaignReference:
          type: string
          format: string
          description: Campaign Reference.

    accountEnrichmentEntity:
      oneOf:
        - $ref: '#/components/schemas/campaignAccountEnrichment'
        - $ref: '#/components/schemas/programmeAccountEnrichment'
        - $ref: '#/components/schemas/pointsAccountEnrichment'
        - $ref: '#/components/schemas/stampAccountEnrichment'
        - $ref: '#/components/schemas/continuityAccountEnrichment'

    windowEntity:
      type: object
      required:
        - startDay
        - startTime
        - endDay
        - endTime
      properties:
        startDay:
          type: string
          description: Window definition Start Day (Weekday name)
          enum:
            - MONDAY
            - TUESDAY
            - WEDNESDAY
            - THURSDAY
            - FRIDAY
            - SATURDAY
            - SUNDAY
        startTime:
          type: string
          format: time
          pattern: '^([01]?[0-9]|2[0-3]):([0-5][0-9])$'
          description: Window definition Start Time (in 24h format)
        endDay:
          type: string
          description: Window definition End Day (Weekday name)
          enum:
            - MONDAY
            - TUESDAY
            - WEDNESDAY
            - THURSDAY
            - FRIDAY
            - SATURDAY
            - SUNDAY
        endTime:
          type: string
          format: time
          pattern: '^([01]?[0-9]|2[0-3]):([0-5][0-9])$'
          description: Window definition End Time (in 24h format)

    exclusionWindowEntity:
      type: object
      required:
        - start
        - end
      properties:
        start:
          type: string
          format: ees-date-time
          description: Exclusion Window Start (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])$
        end:
          type: string
          format: string
          description: Exclusion Window End (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])$
    tokenAccountEntity:
      type: object
      properties:
        accountId:
          type: integer
          format: int32
          description: Account ID (EES Reference)
        accountTypeId:
          type: integer
          format: int32
          description: Account Type ID (EES Internal Type Reference)
        accountType:
          type: string
          description: 'Account Type (Loyalty Scheme, Coupon, Programme)'
        accountSubType:
          type: string
          description: >-
            Account Sub-type (ECOUPON, PAPER, CONTINUITY, VOUCHER, DEBIT,
            PLASTIC, STAMP_CARD, POINTS)
          enum:
            - ECOUPON
            - PAPER
            - CONTINUITY
            - VOUCHER
            - DEBIT
            - PLASTIC
            - STAMP_CARD
            - POINTS
        token:
          type: string
          description: Token Value
        tokenId:
          type: integer
          format: int32
          description: Token ID (EES Reference)
        consumerId:
          type: integer
          format: int32
          description: Consumer ID (EES Reference)
        issuerId:
          type: integer
          format: int32
          description: Issuer ID
        barcodeImage:
          type: string
          description: >
            [Optional] Base64-encoded Barcode of the generated Token. Please
            note currently only 128C subset standard is supported.
        accountStatus:
          type: string
          description: Account status
          enum:
            - ACTIVE
            - BLOCKED
            - CANCELLED
            - DELETED
            - EXPIRED
            - INACTIVE
            - INVALIDATED
            - LOCKED
            - STOLEN
            - USED
        tokenStatus:
          type: string
          description: Token status
          enum:
            - INACTIVE
            - ACTIVE
            - REDEEMED
            - CANCELLED
            - EXPIRED
            - INVALIDATED
        balances:
          $ref: '#/components/schemas/accountBalancesEntity'
        serialNumber:
          type: string
          description: Serial Number
        tokenDates:
          type: object
          properties:
            start:
              type: string
              format: date-time
              description: Date-time from which Token is valid.
            end:
              type: string
              format: date-time
              description: Date-time to which Token is valid.
        resourceType:
          type: string
          description: |
            Resource Type
          enum:
            - PROGRAMME
            - SCHEME
            - CAMPAIGN
        resourceId:
          type: integer
          format: int32
          description: |
            Programme ID, Campaign ID or Scheme ID
        pin:
          type: string
          description: >
            This JSON property exist in the Response for Token (Account)
            Creation / Update to return randomly generated by EES AIR PIN.
            Because of security reasons, it is not be possible to retrieve
            the PIN value for a Token (Account)

    enrichedExamineEntity:
      type: object
      description: Stating if an examined object is valid.
      required:
        - value
        - resourceType
        - resourceId
        - errorCode
        - errorMessage

      properties:
        value:
          type: string
          description: Unique identifier analysed
          nullable: false
        resourceType:
          type: string
          description: The type of internal resource the value is associated to
          nullable: true
          enum:
            - ACCOUNT
            - CAMPAIGN
        resourceId:
          type: string
          description: The id associated with the resourceType.
          nullable: true
        errorCode:
          type: string
          description: If there is an error, this field will be populated.
          nullable: true
          enum:
            - PCEXNF
            - PCEXO
            - PCEXNV
        errorMessage:
          type: string
          description: A human friendly error message explaining why the examined object threw an error.
          nullable: true

    accountTransactionEntity:
      type: object
      description: Object representing an account transaction.
      required:
        - accountTransactionId
        - accountId
        - parentAccountTransactionId
        - event
        - value
        - source
        - transactionDetails
        - balancesBefore
        - balancesAfter
        - properties
        - dateCreated
        - lastUpdated
      properties:
        accountTransactionId:
          type: string
          description: The account transaction ID.
          nullable: false
        accountId:
          type: string
          description: The account id related to this transaction.
          nullable: false
        parentAccountTransactionId:
          type: string
          description: The parent account transaction.
          nullable: true
        event:
          type: string
          description: The type of transaction.
          nullable: false
          enum:
            - CREATE
            - REDEEM
            - LOCK
            - UNLOCK
            - UNREDEEM
            - VERIFY
            - ACTIVATE
            - INACTIVATE
            - REACTIVATE
            - LOAD
            - CREDIT
            - DEBIT
            - BALANCE
            - INVALIDATE
            - BLOCK
            - UNBLOCK
            - RESEND
            - STOLEN
            - CANCEL
            - VOID
            - REISSUE
            - REFUND
            - TRANSFER
            - TRANSFER_IN
            - TOPUP
            - AUTOTOPUP
            - STAMP
            - SPEND
        value:
          type: integer
          format: int32
          description: >-
            The value related to this Account Transaction. Typically, if an account transaction like credit was executed with a value, then this value will be stored here. For Continuity, however, this value should always be 0, and the same for Coupon (since there is no value for a coupon).
        source:
          type: string
          nullable: false
          description: >-
            The source of this transaction e.g. from a client (1), or triggered automatically (2) from within EES AIR (e.g. auto-top-up or the incrementation of Quest balances).
          enum:
            - 1
            - 2
        transactionDetails:
          type: object
          nullable: true
          description: >-
            An simple object of key value pairs representing the transaction details.
        balancesBefore:
          $ref: '#/components/schemas/accountTransactionBalancesHistoryEntity'
        balancesAfter:
          $ref: '#/components/schemas/accountTransactionBalancesHistoryEntity'
        properties:
          type: object
          description: Properties related to the account transaction.
          nullable: true
        dateCreated:
          description: Date-time (ATOM format) this account transaction was created
          type: string
          format: date-time
          nullable: false
        lastUpdated:
          description: Date-time (ATOM format) this account transaction was last updated
          type: string
          format: date-time
          nullable: false

    tierMembershipTransactionEntity:
      type: object
      required:
        - tierMembershipTransactionId
        - tierMembershipId
        - transactionType
        - parentTierMembershipTransactionId
        - walletTransactionId
        - dateCreated
        - lastUpdated
        - actions
      properties:
        tierMembershipTransactionId:
          type: string
          nullable: false
          description: The ID of the tier membership Transaction.
        tierMembershipId:
          type: string
          nullable: false
          description: The ID of the tier membership related to this transaction.
        transactionType:
          type: string
          nullable: false
          description: The type of this tier membership transaction.
          enum:
            - CREDIT
            - DEBIT
            - ADJUSTMENT
            - MOVE
            - RESET
        parentTierMembershipTransactionId:
          type: string
          nullable: true
          description: The ID of any TierMembershipTransaction this is the child of.
        walletTransactionId:
          type: string
          nullable: false
          description: The ID of the walletTransaction that contains this transaction.
        dateCreated:
          description: Time the transaction was created.
          type: string
          format: date-time
        lastUpdated:
          description: Time the transaction was updated.
          type: string
          format: date-time
        actions:
          type: array
          nullable: false
          items:
            type: object
            description: The actions to be taken to complete this tier membership transaction.
            properties:
              balanceType:
                type: string
                description: The type of balance to be changed.
                enum:
                  - POINTS
                  - TRANSACTIONS
                  - SPEND
              amount:
                type: integer
                description: The amount to change the balance by.
              balanceBefore:
                type: integer
                description: The balance before this transaction takes place.
              balanceAfter:
                type: integer
                description: The balance after this transaction takes place.

    walletTransactionEntity:
      type: object
      required:
        - walletTransactionId
        - parentWalletTransactionId
        - walletId
        - reference
        - identityId
        - type
        - status
        - meta
        - state
        - transactionDateTime
        - expiryDate
        - accounts
        - basket
        - channel
        - location
        - dateCreated
        - lastUpdated
      properties:
        walletTransactionId:
          type: string
          description: Wallet Transaction ID
          nullable: false
        parentWalletTransactionId:
          type: string
          description: Parent Wallet Transaction ID
          nullable: true
        walletId:
          type: string
          description: Wallet ID
          nullable: true
        reference:
          type: string
          description: Calling party's reference to this transaction
          nullable: true
        identityId:
          type: string
          description: The Identity ID responsible for this transaction.
          nullable: true
        identity:
          $ref: '#/components/schemas/walletIdentityEntity'
        type:
          type: string
          description: 'Transaction Type, defined per retailer'
          nullable: true
        status:
          type: string
          description: Transaction status
          nullable: false
          enum:
            - ACTIVE
            - SETTLED
            - EXPIRED
            - CANCELLED
            - DELETED
            - PURGED
            - FULFILLING
            - FULFILLED
        meta:
          $ref: '#/components/schemas/metaEntity'
        state:
          type: string
          description: Transaction state
          nullable: true
        transactionDateTime:
          type: string
          format: date-time
          description: Transaction date-time in ATOM format
          nullable: false
        expiryDate:
          type: string
          format: date-time
          description: >-
            Transaction Expiry Timestamp (date-time in ATOM format), when transaction should
            expiry and automatically be settled.
          nullable: true
        accounts:
          type: array
          minItems: 1
          items:
            type: object
            required: [accountId, accountTransactionId]
            properties:
              accountId:
                type: string
                description: Account ID
                nullable: false
              accountTransactionId:
                type: string
                description: Account Transaction ID
                nullable: false
        basket:
          $ref: '#/components/schemas/walletTransactionBasketEntity'
        channel:
          type: string
          description: Channel used for Transaction creation or update
        location:
          $ref: '#/components/schemas/locationResponseEntity'
        dateCreated:
          description: Date this Wallet Transaction was created
          type: string
          format: date-time
        lastUpdated:
          description: Date this Wallet Transaction was last updated
          type: string
          format: date-time

    walletRelationshipsEntity:
      type: object
      properties:
        parent:
          type: array
          description: an Array of Wallet IDs that current Wallet should be / is parent
          items:
            type: string
            format: string
        child:
          type: array
          description: an Array of Wallet IDs that current Wallet should be / is child
          items:
            type: string
            format: string
        associate:
          type: array
          description: >-
            an Array of existing Wallet IDs that current Wallet should be / is
            associated to
          items:
            type: string
            format: string
        donor:
          type: array
          description: >-
            an Array of existing Wallet IDs that current Wallet is
            donating into
          items:
            type: string
            format: string

    metaEntity:
      type: object
      description: >-
        Key-Value object, please note key name length should be less then 255
        characters and key values should be less then 255 characters

    metaWalletTransactionEntity:
      type: object
      description: >-
        Key-Value object that will appear in the Wallet Transaction created. Note: You will only see this in the
        response if you have `showWalletTransactionMeta` enabled in your posConnect responseFilters config.  
        Key name and key values should be less then 255 characters.

    transactionDetailsEntity:
      type: object
      description: >-
        Key-Value object that will appear in the transaction details of any account transaction created as part of this request.<br>
        Please note: In case the same key is defined in the property accountTransactionDetails on unit config, the Unit accountTransactionDetails will overwrite the value of the same key defined on this entry.<br>
        Key Name and Value length should be less then 255.

    adjustmentRulesEntity:
      type: object
      properties:
        externalAdjustment:
          type: boolean
          nullable: false
          default: false
          description: If the object (summary/basket item) has been modified by the POS at all with information we don't know about
        externalAdjustmentReason:
          type: string
          description: The reason for externalAdjustment
        ignore:
          type: boolean
          nullable: false
          default: false
          description: Ignore object as if not sent

    reportingEntity:
      type: object
      nullable: true
      properties:
        byOutlet:
          type: array
          nullable: true
          description: Reporting values of coupon redemptions and scheme base earn by outlet
          items:
            type: object
            properties:
              resultsType:
                type: string
                format: string
                description: Shows whether the results are from Adjudication or Adjustment
                nullable: false
                enum:
                  - ADJUDICATION
                  - ADJUSTMENT
              redemptionPartnerIncomingIdentifier:
                type: string
                format: string
                description: Product's Redemption Partner's Incoming Identifier
                nullable: true
              outletIncomingIdentifier:
                type: string
                format: string
                description: Incoming Identifier for Outlet
                nullable: true
              resourceId:
                type: string
                format: string
                description: EES AIR Campaign or Scheme Id
                nullable: false
              type:
                type: string
                format: string
                nullable: false
                enum:
                  - REDEEM
                  - EARN
              value:
                type: integer
                format: int32
                description: Value of transaction
              accountTransactionId:
                type: string
                format: string
                description: Account Transaction Id

    fulfilledBaseEarnEntity:
      description: Records the base earn points rewarded to customer during mid fulfil requests.
      type: array
      items:
        type: object
        properties:
          targetedAccountId:
            type: string
            format: string
            nullable: false
            description: EES AIR Account ID.
          points:
            type: integer
            format: int32
            nullable: false
            default: 0
            description: Total value of base earn points rewarded.

    expectedPointsEntity:
      description: Indicates the intended base earn and credits for any Scheme (during fulfil flow), along with whether these points will go into the `pending` bucket. N.B. Even if all coupons are not redeemed and threshold is not met, points will still go `pending`.
      type: array
      items:
        type: object
        properties:
          schemeId:
            type: string
            format: string
            nullable: false
            description: Scheme ID which the points relate to.
          earn:
            type: integer
            format: int32
            nullable: false
            default: 0
            description: Total value of base earn points.
          credit:
            type: integer
            format: int32
            nullable: false
            default: 0
            description: Total value of points to be credited.
          isPending:
            type: boolean
            nullable: false
            default: false
            description: Indicated whether the points will be put into `pending`.

    qualifiesResultsEntity:
      description: If an offer was buy a pizza and get a free garlic bread, the pizza would have this entity against it.
      type: array
      items:
        type: object
        properties:
          totalMatchingUnits:
            type: integer
            format: int32
            description: The number of products forming part of the offer's qualification.
          totalMatchingSpend:
            type: integer
            format: int32
            description: The monetary value this product contributes towards the offer's qualification.
          totalOverallMatchingSpend:
            type: integer
            format: int32
            description: The monetary value this product contributes towards the offer's overall qualification across valid Redemption Partners.
          instanceId:
            type: string
            format: string
            description: The reference back to the offer reward which these qualifiers relate.

    contributionResultsEntity:
      description: If an offer was spend £30 get £5 off, this entity would be against each of the products contributing to the £5 off, with their combined `value`s adding up to the £5.
      type: array
      nullable: true
      items:
        type: object
        properties:
          value:
            type: integer
            format: int32
            description: The proportional contribution to the discount/points given
          instanceId:
            type: string
            format: string
            description: The reference back to the offer which these items contributed

    lockTimeOverrideEntity:
      type: object
      description: >-
        If this optional attribute is set and lock is true, will override the unit's default lock time with the number of seconds in the request
      nullable: true
      properties:
        CAMPAIGN:
          type: integer
          description: The number of seconds that coupons should be locked for, minimum 1 second.
          nullable: false
        SCHEME:
          type: integer
          description: The number of seconds that points should be locked for, minimum 1 second.
          nullable: false

    adjudicationResultsEntity:
      type: array
      items:
        type: object
        properties:
          resourceType:
            type: string
            description: EES Resource Type
            nullable: false
            enum:
              - CAMPAIGN
              - PROGRAMME
              - SCHEME
          resourceId:
            type: string
            format: string
            description: EES AIR Resource ID (Campaign ID, Programme ID, Scheme ID)
            nullable: false
          playOrderPosition:
            type: integer
            format: int32
            nullable: true
            description: The exact position the offer was triggered during analysis
          success:
            type: boolean
            nullable: true
          type:
            type: string
            description: Operation Type
            nullable: false
            enum:
              - redeem
              - credit
              - debit
              - earn
              - spend
          value:
            type: integer
            format: int32
            nullable: false
            description: Operation Amount (please note&#58; value and balances attributes are mutually exclusive)
          balances:
            $ref: '#/components/schemas/accountBalancesEntity'
          isRefundable:
            type: boolean
            nullable: false
            description: Boolean Flag indicating if this offer should be refundable
          isUnredeemable:
            type: boolean
            nullable: false
            description: Boolean Flag indicating if this offer should be Unredeemable
          relatedAccountIds:
            type: array
            items:
              type: string
              format: string
              description: EES AIR Account ID
          relatedWalletId:
            type: string
            format: string
            description: EES AIR Wallet ID.
            nullable: true
          targetedAccountId:
            type: string
            format: string
            description: EES AIR Account ID
          targetedWalletId:
            type: string
            format: string
            description: EES AIR Wallet ID.
            nullable: true
          totalMatchingUnits:
            type: integer
            nullable: true
            format: int32
            description: The minimum number of products required to trigger offer
          totalRewardUnits:
            type: integer
            nullable: true
            format: int32
            description: The number of units the reward applies to within this item.
          rewardType:
            type: string
            nullable: true
            enum:
              - standard
              - boltOn
            description: Indicates whether a `credit` type was a standard reward or is a bolt on. All other operations will have be `null`, when present.

    adjustmentResultsEntity:
      type: array
      items:
        type: object
        properties:
          resourceType:
            type: string
            description: EES Resource Type
            nullable: false
            enum:
              - CAMPAIGN
          resourceId:
            type: string
            format: string
            description: EES AIR Resource ID (Campaign ID, Programme ID, Scheme ID)
            nullable: false
          playOrderPosition:
            type: integer
            format: int32
            nullable: true
            description: The exact position the offer was triggered during analysis
          success:
            type: boolean
            nullable: true
          type:
            type: string
            description: Operation Type
            nullable: false
            enum:
              - redeem
              - createRedeem
          value:
            type: integer
            format: int32
            nullable: false
            description: Operation Amount
          isUnredeemable:
            type: boolean
            nullable: false
            description: Boolean Flag indicating if this offer should be Unredeemable
          relatedAccountIds:
            type: array
            items:
              type: string
              format: string
              description: EES AIR Account ID
          targetedAccountId:
            type: string
            format: string
            description: EES AIR Account ID
          targetedWalletId:
            type: string
            format: string
            description: EES AIR Wallet ID. Nullable
            nullable: true
          multiItem:
            type: array
            items:
              type: string
              format: string
              description: Used for coupons that can span multiple SKU's in a basket, links basket items together based on SKU
          totalDiscountAmount:
            type: integer
            format: int32
            description: The monetary effect of the discount in the lowest unit of currency
          totalMatchingUnits:
            type: integer
            format: int32
            description: The number of products the adjustment was applied to
          instanceId:
            type: string
            format: string
            description: A mechanism to distinguish each individual reward that has been given for any account
          totalRewardUnits:
            type: integer
            nullable: true
            format: int32
            description: The number of units the reward applies to within this item.

    tenderResultsEntity:
      type: array
      items:
        type: object
        properties:
          resourceType:
            type: string
            description: EES Resource Type
            nullable: false
            enum:
              - CAMPAIGN
          resourceId:
            type: string
            format: string
            description: EES AIR Resource ID (Campaign ID, Programme ID, Scheme ID)
            nullable: false
          playOrderPosition:
            type: integer
            format: int32
            nullable: true
            description: The exact position the offer was triggered during analysis
          success:
            type: boolean
            nullable: true
          type:
            type: string
            description: Operation Type
            nullable: false
            enum:
              - redeem
              - createRedeem
          value:
            type: integer
            format: int32
            nullable: false
            description: Operation Amount
          isUnredeemable:
            type: boolean
            nullable: false
            description: Boolean Flag indicating if this offer should be Unredeemable
          relatedAccountIds:
            type: array
            items:
              type: string
              format: string
              description: EES AIR Account ID
          targetedAccountId:
            type: string
            format: string
            description: EES AIR Account ID
          targetedWalletId:
            type: string
            format: string
            description: EES AIR Wallet ID. Nullable
            nullable: true
          multiItem:
            type: array
            items:
              type: string
              format: string
              description: Used for coupons that can span multiple SKU's in a basket, links basket items together based on SKU
          totalTenderAmount:
            type: integer
            format: int32
            description: The amount of tender value in the lowest unit of currency

    datesEntity:
      type: object
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time

    accountBalancesEntity:
      type: object
      description: >
        The object of balances. Some balances only apply to certain types of
        accounts. See notes below on balances.
      properties:
        available:
          type: integer
          description: >
            The available balance. This is applicable for all account types,
            except POINTS and CONTINUITY, which
            uses its own balance keys. For ECOUPON account type this property
            will be returned and will be equal to zero.
        refundable:
          type: integer
          description: >
            The refundable balance. This is applicable for all account types
            except POINTS and CONTINUITY,
            but is not used during account creation. For an Account Entity, the
            amount displayed here is the
            total refundable balance available. Please note for ECOUPON account
            type this property will be returned and equal to zero.
        totalSpend:
          type: integer
          description: >
            The total spend balance. Applicable only to accounts of type
            CONTINUITY.
        transactionCount:
          type: integer
          description: >
            The transaction counter. Applicable only to accounts of type
            CONTINUITY.
        current:
          type: integer
          description: >
            The current balance. Applicable only to accounts of type POINTS and
            STAMP. If current is not provided on
            creation, this will be set to 0.
        usable:
          type: integer
          description: >
            The usable balance. Applicable only to accounts of type POINTS. If
            usable is not provided on creation,
            this will be set to 0.
        locked:
          type: integer
          description: >
            The locked balance. Applicable only to accounts of type POINTS. If
            locked is not provided on creation,
            this will be set to 0.
        lifetime:
          type: integer
          description: >-
            The lifetime balance. Applicable only to accounts of type POINTS and
            STAMP. If lifetime is not provided on creation, this will be set to
            0.
        totalUnits:
          type: integer
          description: >
            The total units purchased balance. Applicable only to accounts of type
            CONTINUITY.

    spendBalancesAfterEntity:
      type: object
      description: >
        The object of balanceAfter.
      properties:
        current:
          type: integer
          description: >
            The current balance.
        usable:
          type: integer
          description: >
            The usable balance.
        locked:
          type: integer
          description: >
            The locked balance.
        lifetime:
          type: integer
          description: >-
            The lifetime balance.
        lifetimeSpend:
          type: integer
          description: >-
            The amount that has been spent on this account it's lifetime.
        lifetimeSpendValue:
          type: integer
          description: >-
            The monetary value of the points that have been spent over the lifetime of this account.            

    accountTransactionBalancesHistoryEntity:
      type: object
      description: >
        The object of balances to show for either before or after the account
        transaction. Some balances only apply to
        certain types of accounts. See notes below on balances.
      properties:
        available:
          description: >
            The available balance. This is applicable for all account types,
            except STAMP, POINTS and CONTINUITY, which
            uses its own balance keys, and ECOUPON, which has no concept of a
            balance.
          type: integer
        refundable:
          description: >
            The refundable balance. This is applicable for all account types,
            except STAMP, ECOUPON, POINTS and
            CONTINUITY.
          type: integer
        current:
          type: integer
          description: >
            The current balance. Applicable only to accounts of type Points and
            Stamp.
        lifetime:
          type: integer
          description: >
            The lifetime balance. Applicable only to accounts of type Points and
            Stamp.
        totalSpend:
          type: integer
          description: >
            The total spend balance. Applicable only to accounts of type
            Continuity.
        transactionCount:
          type: integer
          description: >
            The transaction counter. Applicable only to accounts of type
            Continuity.
    walletTransactionBasketEntity:
      oneOf:
        - $ref: '#/components/schemas/standardBasketEntity'
        - $ref: '#/components/schemas/enrichedBasketEntity'
      discriminator:
        propertyName: type

    walletTransactionOverrideEntity:
      type: object
      minProperties: 1
      nullable: false
      description: >
        Contains key-value pairs that are used to override some default transaction values.
        If the value or the key is not configured for the unit or invalid then it will fallback to the default.
      properties:
        type:
          type: string
          format: string
          description: Wallet transaction type

    locationEntity:
      type: object
      nullable: false
      required:
        - incomingIdentifier
      properties:
        incomingIdentifier:
          type: string
          format: string
          nullable: false
          description: >-
            Optional Outlet Incoming Identifier allowing to override location arisen from used API Key of where this transaction has happened
        parentIncomingIdentifier:
          type: string
          format: string
          nullable: false
          description: >-
            Outlet's Parent unit Incoming Identifier allowing to uniquely identify an Outlet override arisen from used API Key location where this transaction has happened. Please note this optional JSON attribute should be used in case incoming identifiers are not unique within a Client's Hierarchy

    locationResponseEntity:
      type: object
      properties:
        storeId:
          type: string
          format: string
          description: The Incoming Identifier of the Outlet.
        storeParentId:
          type: string
          format: string
          description: The Incoming Identifier of the Outlet's Parent Unit.

    standardPaymentEntity:
      type: array
      nullable: true
      items:
        type: object
        required:
          - tenderType
          - amount
        properties:
          tenderType:
            type: string
            format: string
            description: Tender type - predefined by Eagle Eye
          amount:
            type: integer
            format: int32
            description: Monetary amount of payment in lowest unit of currency
          bin:
            type: string
            format: string
            description: The bin for the tender
          identifier:
            type: string
            format: string
            description: >-
              An identifying value of what was scanned, could be a token, barcode, gift-card

    enrichedPaymentEntity:
      type: array
      nullable: true
      description: Similar to standardPaymentEntity, except that any _tender_ offers used during adjustment, have an entry injected here, stipulating the tender amount to take off basket
      items:
        type: object
        required:
          - tenderType
          - amount
        properties:
          tenderType:
            type: string
            format: string
            description: Tender type - predefined by Eagle Eye, including a further type of _tenderCoupon_
          amount:
            type: integer
            format: int32
            description: Monetary amount of payment/tender in lowest unit of currency
          bin:
            type: string
            format: string
            description: The bin for the tender
          identifier:
            type: string
            format: string
            description: >-
              An identifying value of what was scanned, could be a token, barcode, gift-card
          accountId:
            type: string
            format: string
            description: >-
              The EE AIR Account ID (only populated when tender is owned by EE)

    examineEntity:
      type: array
      description: List the tokens to be used with the basket (optional)
      nullable: false
      items:
        type: object
        required:
          - value
          - type
        properties:
          value:
            type: string
            format: string
            description: Unique identifier to analyse
          type:
            type: string
            enum:
              - TOKEN
            description: Denotes the type of the unique identifier

    excludedAccountsEntity:
      type: array
      description: List the accounts to exclude from analysis (optional)
      nullable: true
      items:
        type: object
        required:
          - value
          - type
        properties:
          value:
            type: string
            format: string
            description: Unique identifier to exclude from analysis
          type:
            type: string
            format: string
            enum:
              - ACCOUNT
            description: Denotes the type of the unique identifier

    includedAccountsEntity:
      type: array
      description: List the accounts to include in the analysis - all other accounts excluded (optional)
      nullable: true
      items:
        type: object
        required:
          - value
          - type
        properties:
          value:
            type: string
            format: string
            description: Unique identifier to include in the analysis - Either the campaign/scheme tag or accountId
          type:
            type: string
            format: string
            enum:
              - ACCOUNT
              - TAG
            description: Denotes the type of the unique identifier

    pointsEntity:
      type: array
      items:
        type: object
        properties:
          resourceType:
            type: string
            description: EES Resource Type
            nullable: false
            enum:
              - SCHEME
              - CAMPAIGN
          resourceId:
            type: string
            format: string
            description: EES AIR Scheme ID
            nullable: false
          operationType:
            type: string
            description: Operation Type
            enum:
              - credit
              - debit
              - earn
          value:
            type: integer
            format: int32
            description: Amount of points
            nullable: false
          accountId:
            type: string
            format: string
            description: EES AIR Account ID
            nullable: false
          relatedSchemeId:
            type: string
            format: string
            description: EES AIR Scheme ID
            nullable: false
          details:
            type: object
            nullable: true
            properties:
              appliedAnalyseBasketType:
                description: 'The offer type (list is examples more may be added)'
                enum:
                  - "FIXED_POINTS"
                  - "FIXED_POINTS_BASKET"
                  - "FIXED_POINTS_PRODUCTS"
                  - "VARIABLE_POINTS_BASKET"
                  - "VARIABLE_POINTS_PRODUCTS"
          totalMatchingUnits:
            type: integer
            description: The total number of products that matched the qualification.
            nullable: true
    discountEntity:
      type: array
      nullable: true
      items:
        type: object
        properties:
          accountId:
            type: string
            format: string
            nullable: false
            description: EES AIR Account Id
          walletId:
            type: string
            format: string
            nullable: false
            description: EES AIR Wallet Id
          type:
            type: string
            nullable: false
            description: EES AIR Account Type
            enum:
              - "ECOUPON"
              - "VOUCHER"
              - "STAMP_CARD"
              - "PAPER"
              - "DEBIT"
              - "PLASTIC"
              - "POINTS"
              - "STANDARD_SUBSCRIPTION"
          clientType:
            type: string
            format: string
            nullable: true
            description: Client defined account type
          campaignId:
            type: string
            format: string
            nullable: false
            description: EES AIR Campaign / Programme / Scheme ID
          campaignName:
            type: string
            format: string
            nullable: false
            description: Campaign Name
          offerId:
            type: string
            format: string
            nullable: true
            description: Offer Id
          offerName:
            type: string
            format: string
            nullable: true
            description: Offer Name
          reward:
            type: object
            properties:
              product:
                $ref: '#/components/schemas/productsCollectionEntity'
              promoId:
                type: string
                format: string
                nullable: true
              basket:
                type: object
                nullable: true
                properties:
                  points:
                    type: object
                    properties:
                      interval:
                        $ref: '#/components/schemas/intervalEntity'
                      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 included in this object.
                                * TOTAL - Will use the value of the products included in this object.
                              enum:
                              - SPEND
                              - UNITS
                              - TOTAL
                          values:
                            type: array
                            uniqueItems: true
                            minItems: 1
                            items:
                              type: object
                              properties:
                                floor:
                                  nullable: true
                                  type: integer
                                  description: The minimum threshold of the value used for the decider.
                                ceiling:
                                  nullable: true
                                  type: integer
                                  description: The maximum threshold of the value used for the decider.
                                discountAmount:
                                  type: integer
                                  description: The discount amount to apply.
                                discountPercentage:
                                  nullable: true
                                  type: integer
                                  format: float
                                  description: The discount percentage to apply.
              pointSpendRates:
                type: array
                nullable: true
                description: Reward that overrides the normal points spend rate for a scheme.
                items:
                  type: object
                  properties:
                    bonus:
                      type: integer
                      description: Bonus monetary value to be applied per step.
                    ceiling:
                      type: integer
                      description: The maximum threshold of the value used for the decider.
                    floor:
                      type: integer
                      description: The minimum threshold of the value used for the decider.
                    rate:
                      type: integer
                      description: Rate at which points should be spent at.
                    step:
                      type: integer
                      description: Number of points required to be spent above the floor to get an additional bonus reward - repeatable.
                    pointsBack:
                      type: integer
                      description: Number of points to be awarded.
              standard:
                type: object
                properties:
                  discountAmount:
                    type: integer
                    format: int32
                    nullable: true
                    description: Discount Amount
                  percentageAmount:
                    type: number
                    format: float
                    nullable: true
                    description: Percentage Amount
                  points:
                    type: object
                    nullable: true
                    properties:
                      creditAmount:
                        type: integer
                        nullable: false
                        description: Number of points to be awarded.
                      multiplierValue:
                        type: integer
                        nullable: true
                        description: Multiplier of base-earn points to award.
                      schemeId:
                        type: string
                        nullable: false
                        description: The ID of the base-earn scheme to multiply.
                  tax:
                    type: object
                    description: object that contains the tax saver reward
                    properties:
                      taxSaver:
                        type: boolean
                        nullable: true
                  value:
                    type: object
                    nullable: true
                    description: Contains the type of deduction.
                    properties:
                      discountAmount:
                        type: integer
                        format: int32
                        nullable: true
                        description: The discount amount to apply.
                      percentageAmount:
                        type: number
                        format: float
                        nullable: true
                        description: The percentage amount to apply.
              treatAs:
                nullable: true
                type: object
                description: Sets if this coupon should be treated as tender.
                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.
                    enum:
                      - DISCOUNT
                      - TENDER
    bounceBackEntity:
      type: array
      items:
        type: object
        properties:
          accountId:
            type: string
            format: string
            description: EES AIR Account ID
            nullable: false
          walletId:
            type: string
            format: string
            description: EES AIR Wallet ID
            nullable: false
          type:
            type: string
            enum:
              - ECOUPON
          clientType:
            type: string
            format: string
            nullable: true
            description: Client defined account type
          campaignId:
            type: string
            format: string
            nullable: false
            description: EES AIR Campaign ID
          campaignName:
            type: string
            format: string
            nullable: false
            description: Campaign Name
          offerId:
            type: string
            format: string
            nullable: true
            description: Offer Id
          offerName:
            type: string
            format: string
            nullable: true
            description: Offer Name
          reward:
            type: object
            nullable: true
            description: The reward is always null for bounceBacks.
          bounceBacks:
            type: array
            items:
              type: object
              properties:
                resourceType:
                  type: string
                  description: EES Resource Type
                  nullable: false
                  enum:
                    - CAMPAIGN
                resourceId:
                  type: string
                  format: string
                  description: EES AIR Resource ID (Campaign ID, Programme ID, Scheme ID)
                  nullable: false

    bounceBackResultsEntity:
      type: array
      deprecated: true
      items:
        type: object
        properties:
          resourceType:
            type: string
            description: EES Resource Type
            nullable: false
            enum:
              - CAMPAIGN
          resourceId:
            type: string
            format: string
            description: EES AIR Campaign Id
            nullable: false
          playOrderPosition:
            type: integer
            format: int32
            nullable: true
            description: The exact position the offer was triggered during analysis
          success:
            type: boolean
            nullable: true
          type:
            type: string
            enum:
              - redeem
          value:
            type: integer
            format: int32
            description: Value of transaction
          balances:
            $ref: '#/components/schemas/accountBalancesEntity'
          isRefundable:
            type: boolean
            nullable: false
            description: Boolean Flag indicating if this offer should be refundable
          isUnredeemable:
            type: boolean
            nullable: false
            description: Boolean Flag indicating if this offer should be Unredeemable
          relatedAccounts:
            type: array
            items:
              type: string
              format: string
              description: EES AIR Account ID
          targetedAccountId:
            type: string
            format: string
            description: EES AIR Account ID
          targetedWalletId:
            type: string
            format: string
            description: EES AIR Wallet ID.
            nullable: true

    standardBasketEntity:
      title: Standard Basket Entity
      type: object
      required:
        - type
        - items
      properties:
        type:
          type: string
          enum:
            - STANDARD
        summary:
          $ref: '#/components/schemas/standardBasketSummaryEntity'
        contents:
          $ref: '#/components/schemas/standardBasketContentsCollectionEntity'
        payment:
          $ref: '#/components/schemas/standardPaymentEntity'

    standardBasketSummaryEntity:
      type: object
      required:
        - totalItems
        - totalBasketValue
      properties:
        totalItems:
          type: integer
          format: int32
          nullable: false
          description: Basket Items count
        totalBasketValue:
          type: integer
          format: int32
          nullable: false
          description: >-
            Total Basket monetary Value after discounts, denominated to a
            smallest currency unit (e.g. for `USD` this value should be
            provided in `cents`)
        totalDiscountAmount:
          type: object
          properties:
            promotions:
              type: integer
              format: int32
              description: Promotions Discount Amount. If basket adjustment adds to discounts, this amount will be added to
              nullable: true
            staff:
              type: integer
              format: int32
              description: Staff Discount Amount
              nullable: true
            general:
              type: integer
              format: int32
              description: General Discount Amount
              nullable: true
        totalQualifyingAmount:
          type: object
          nullable: true
          minProperties: 1
          maxProperties: 4
          properties:
            points:
              type: integer
              format: int32
              nullable: false
              description: Basket Monetary Value for Loyalty Points calculations
            baseEarn:
              type: integer
              format: int32
              nullable: false
              description: Basket Monetary Value used for calculating base earn, overriding totalBasketValue. Adheres to basket discounts
            promotions:
              type: integer
              format: int32
              nullable: false
              description: Basket Monetary Value for Promotion Offer selections
            discount:
              type: integer
              format: int32
              nullable: false
              description: Basket Monetary Value for Discount calculations
            staff:
              type: integer
              format: int32
              nullable: false
              description: Basket Monetary Value for Staff Discount or Promotions
        totalTaxAmount:
          type: integer
          format: int32
          description: >-
            Total Tax Amount denominated to a smallest currency unit (e.g.
            for `USD` this value should be provided in `cents`)
        adjustmentRules:
          $ref: '#/components/schemas/adjustmentRulesEntity'
        redemptionChannel:
          description: The redemption channel used for this request
          type: string
          format: string
          nullable: false
        fulfilledBaseEarn:
          $ref: '#/components/schemas/fulfilledBaseEarnEntity'

    fulfilBasketContentsCollectionEntity:
      type: array
      nullable: true
      items:
        type: object
        allOf:
          - $ref: '#/components/schemas/standardBasketContentsCollectionEntity/items'
          - type: object
            properties:
              salesKey:
                type: string
                enum:
                  - FULFIL
                description: >-
                  Determines the nature of the transaction, requests related to product sales, refunds,
                  and fulfillment operations.

    openBasketContentsCollectionEntity:
      type: array
      nullable: true
      items:
        type: object
        allOf:
          - $ref: '#/components/schemas/standardBasketContentsCollectionEntity/items'
          - type: object
            properties:
              salesKey:
                type: string
                enum:
                  - SALE
                description: >-
                  Determines the nature of the transaction, requests related to product sales, refunds,
                  and fulfillment operations.

    refundBasketContentsCollectionEntity:
      type: array
      nullable: true
      items:
        type: object
        allOf:
          - $ref: '#/components/schemas/standardBasketContentsCollectionEntity/items'
          - type: object
            properties:
              salesKey:
                type: string
                enum:
                  - REFUND
                description: >-
                  Determines the nature of the transaction, requests related to product sales, refunds,
                  and fulfillment operations.

    exchangeBasketContentsCollectionEntity:
      type: array
      nullable: true
      items:
        type: object
        allOf:
          - $ref: '#/components/schemas/standardBasketContentsCollectionEntity/items'
          - type: object
            properties:
              salesKey:
                type: string
                enum:
                  - SALE
                  - REFUND
                default: SALE
                description: >-
                  Determines the nature of the transaction, requests related to product sales, refunds,
                  and fulfillment operations.

    standardBasketContentsCollectionEntity:
      type: array
      nullable: true
      items:
        type: object
        properties:
          sku:
            type: string
            format: string
            nullable: false
            description: Item SKU
          upc:
            type: string
            format: string
            nullable: false
            description: Item SKU
          description:
            type: string
            format: string
            nullable: false
            description: Product Name
          redemptionPartnerIncomingIdentifier:
            type: string
            format: string
            nullable: true
            description: Allows a product belonging to another redemption partner to be adjudicated alongside the calling. Must be provided if `outletIncomingIdentifier` is used.
          outletIncomingIdentifier:
            type: string
            format: string
            nullable: false
            description: The outlet the product should be adjudicated against. Belongs directly to the product's `redemptionPartnerIncomingIdentifier`. (For Future Use)
          itemUnitCost:
            type: integer
            format: int32
            nullable: false
            description: 'Item Price per unit, denominated to a smaller currency unit'
          itemUnitMetric:
            type: string
            description: 'The metric in which the item is measure (nullable)'
            enum:
              - LITRES
              - GRAMS
              - MILLILITERS
              - KILOGRAMS
              - POUNDS
              - OUNCES
              - PIECE
              - EACH
          itemUnitCount:
            type: integer
            format: int32
            nullable: false
            description: Item Quantity
          itemUnitDiscount:
            type: integer
            format: int32
            nullable: false
            description: Discount per Item
          totalUnitCost:
            type: integer
            format: int32
            nullable: false
            description: Total cost for this item
          totalUnitCostAfterDiscount:
            type: integer
            format: int32
            nullable: false
            description: >-
              Total cost for this item after discount (please note this does
              not take into account whole basket discounts)
          taxRate:
            type: number
            format: float
            nullable: false
            description: Tax Rate (Percentage)
          taxAmount:
            type: integer
            format: int32
            nullable: false
            description: >-
              Tax Amount for that item, denominated to a smallest currency
              unit
          qualifies:
            type: object
            nullable: true
            required:
              - discount
              - points
            properties:
              discount:
                type: boolean
                description: >
                  Determines if the item is eligible for basket level discounting. If false this item will not
                  qualify for basket level discounts but still qualify for product level discounts.
              points:
                type: boolean
                description: >
                  Determines if the item is eligible for Base Earn points. If false this item will not qualify for
                  Base Earn points but still qualify for basket and product level discounts.
          meta:
            $ref: '#/components/schemas/metaEntity'
          adjustmentRules:
            $ref: '#/components/schemas/adjustmentRulesEntity'
          relatedContents:
            description: Recursive list of contents related to the parent item with the same schema as this object.
            type: array
            items:
                type: object
                properties:
                  sku:
                    type: string
                    format: string
                    nullable: false
                    description: Item SKU
                  upc:
                    type: string
                    format: string
                    nullable: false
                    description: Item SKU
                  salesKey:
                    type: string
                    enum:
                      - SALE
                      - REFUND
                      - FULFIL
                    default: SALE
                    description: '`SALE`/`REFUND`/`FULFIL` Flag'
                  description:
                    type: string
                    format: string
                    nullable: false
                    description: Product Name
                  itemUnitCost:
                    type: integer
                    format: int32
                    nullable: false
                    description: 'Item Price per unit, denominated to a smaller currency unit'
                  itemUnitMetric:
                    type: string
                    description: 'The metric in which the item is measure (nullable)'
                    enum:
                      - LITRES
                      - GRAMS
                      - MILLILITERS
                      - KILOGRAMS
                      - POUNDS
                      - OUNCES
                      - PIECE
                  itemUnitCount:
                    type: integer
                    format: int32
                    nullable: false
                    description: Item Quantity
                  itemUnitDiscount:
                    type: integer
                    format: int32
                    nullable: false
                    description: Discount per Item
                  totalUnitCost:
                    type: integer
                    format: int32
                    nullable: false
                    description: Total cost for this item
                  totalUnitCostAfterDiscount:
                    type: integer
                    format: int32
                    nullable: false
                    description: >-
                      Total cost for this item after discount (please note this does
                      not take into account whole basket discounts)
                  taxRate:
                    type: number
                    format: float
                    nullable: false
                    description: Tax Rate (Percentage)
                  taxAmount:
                    type: integer
                    format: int32
                    nullable: false
                    description: >-
                      Tax Amount for that item, denominated to a smallest currency
                      unit
                  qualifies:
                    type: object
                    nullable: true
                    required:
                      - discount
                      - points
                    properties:
                      discount:
                        type: boolean
                        description: >
                          Determines if the item is eligible for basket level discounting. If false this item will not
                          qualify for basket level discounts but still qualify for product level discounts.
                      points:
                        type: boolean
                        description: >
                          Determines if the item is eligible for Base Earn points. If false this item will not qualify for
                          Base Earn points but still qualify for basket and product level discounts.
                  meta:
                    $ref: '#/components/schemas/metaEntity'
                  adjustmentRules:
                    $ref: '#/components/schemas/adjustmentRulesEntity'
                  relatedContents:
                    description: Recursive list of contents related to the parent item with the same schema as this object.


    enrichedBasketContentsCollectionEntity:
      type: array
      nullable: true
      items:
        type: object
        properties:
          sku:
            type: string
            format: string
            nullable: false
            description: Item SKU
          upc:
            type: string
            format: string
            nullable: false
            description: Item SKU
          salesKey:
            type: string
            enum:
              - SALE
              - REFUND
              - FULFIL
            default: SALE
            description: '`SALE`/`REFUND`/`FULFIL` Flag'
          description:
            type: string
            format: string
            nullable: false
            description: Product Name
          itemUnitCost:
            type: integer
            format: int32
            nullable: false
            description: 'Item Price per unit, denominated to a smaller currency unit'
          redemptionPartnerIncomingIdentifier:
            type: string
            format: string
            nullable: true
            description: Allows a product belonging to another redemption partner to be adjudicated alongside the calling. Must be provided if `outletIncomingIdentifier` is used.
          outletIncomingIdentifier:
            type: string
            format: string
            nullable: false
            description: The outlet the product should be adjudicated against. Belongs directly to the product's `redemptionPartnerIncomingIdentifier`. (For Future Use)
          itemUnitMetric:
            type: string
            description: 'The metric in which the item is measure (nullable)'
            enum:
              - LITRES
              - GRAMS
              - MILLILITERS
              - KILOGRAMS
              - POUNDS
              - OUNCES
              - PIECE
              - EACH
          itemUnitCount:
            type: integer
            format: int32
            nullable: false
            description: Item Quantity
          itemFulfilmentCount:
            type: integer
            format: int32
            nullable: true
            description: Number Of Items Fulfilled
          itemUnitDiscount:
            type: integer
            format: int32
            nullable: false
            description: Discount per Item
          totalUnitCost:
            type: integer
            format: int32
            nullable: false
            description: Total cost for this item
          totalUnitCostAfterDiscount:
            type: integer
            format: int32
            nullable: false
            description: >-
              Total cost for this item after discount (please note this does
              not take into account whole basket discounts)
          taxRate:
            type: number
            format: float
            nullable: false
            description: The rate of tax being applied to this item (percentage)
          taxAmount:
            type: integer
            format: int32
            nullable: false
            description: >-
              Tax Amount for that item, denominated to a smallest currency
              unit
          qualifies:
            type: object
            nullable: true
            required:
              - discount
              - points
            properties:
              discount:
                type: boolean
                description: Determines if the item is eligible for discounting
              points:
                type: boolean
                description: Determines if the item is eligible for points
          meta:
            $ref: '#/components/schemas/metaEntity'
          adjustmentRules:
            $ref: '#/components/schemas/adjustmentRulesEntity'
          adjustmentResults:
            $ref: '#/components/schemas/adjustmentResultsEntity'
          tenderResults:
            $ref: '#/components/schemas/tenderResultsEntity'
          bounceBackResults:
            $ref: '#/components/schemas/bounceBackResultsEntity'
          qualifiesResults:
            $ref: '#/components/schemas/qualifiesResultsEntity'
          contributionResults:
            $ref: '#/components/schemas/contributionResultsEntity'
          adjudicationResults:
            $ref: '#/components/schemas/adjudicationResultsEntity'
          relatedContents:
            type: array
            description: Recursive list of contents related to the parent item with the same schema as this object.
            items:
                type: object
                properties:
                  sku:
                    type: string
                    format: string
                    nullable: false
                    description: Item SKU
                  upc:
                    type: string
                    format: string
                    nullable: false
                    description: Item SKU
                  salesKey:
                    type: string
                    enum:
                      - SALE
                      - REFUND
                      - FULFIL
                    default: SALE
                    description: '`SALE`/`REFUND`/`FULFIL` Flag'
                  description:
                    type: string
                    format: string
                    nullable: false
                    description: Product Name
                  itemUnitCost:
                    type: integer
                    format: int32
                    nullable: false
                    description: 'Item Price per unit, denominated to a smaller currency unit'
                  itemUnitMetric:
                    type: string
                    description: 'The metric in which the item is measure (nullable)'
                    enum:
                      - LITRES
                      - GRAMS
                      - MILLILITERS
                      - KILOGRAMS
                      - POUNDS
                      - OUNCES
                      - PIECE
                  itemUnitCount:
                    type: integer
                    format: int32
                    nullable: false
                    description: Item Quantity
                  itemFulfilmentCount:
                    type: integer
                    format: int32
                    nullable: true
                    description: Number Of Items Fulfilled
                  itemUnitDiscount:
                    type: integer
                    format: int32
                    nullable: false
                    description: Discount per Item
                  totalUnitCost:
                    type: integer
                    format: int32
                    nullable: false
                    description: Total cost for this item
                  totalUnitCostAfterDiscount:
                    type: integer
                    format: int32
                    nullable: false
                    description: >-
                      Total cost for this item after discount (please note this does
                      not take into account whole basket discounts)
                  taxRate:
                    type: number
                    format: float
                    nullable: false
                    description: The rate of tax being applied to this item (percentage)
                  taxAmount:
                    type: integer
                    format: int32
                    nullable: false
                    description: >-
                      Tax Amount for that item, denominated to a smallest currency
                      unit
                  qualifies:
                    type: object
                    nullable: true
                    required:
                      - discount
                      - points
                    properties:
                      discount:
                        type: boolean
                        description: Determines if the item is eligible for discounting
                      points:
                        type: boolean
                        description: Determines if the item is eligible for points
                  meta:
                    $ref: '#/components/schemas/metaEntity'
                  adjustmentRules:
                    $ref: '#/components/schemas/adjustmentRulesEntity'
                  adjustmentResults:
                    $ref: '#/components/schemas/adjustmentResultsEntity'
                  tenderResults:
                    $ref: '#/components/schemas/tenderResultsEntity'
                  bounceBackResults:
                    $ref: '#/components/schemas/bounceBackResultsEntity'
                  qualifiesResults:
                    $ref: '#/components/schemas/qualifiesResultsEntity'
                  adjudicationResults:
                    $ref: '#/components/schemas/adjudicationResultsEntity'
                  relatedContents:
                    description: Recursive list of contents related to the parent item with the same schema as this object.

    tierMembershipResultsEntity:
      type: array
      nullable: true
      items:
        type: object
        properties:
          tierMembershipId:
            type: string
            description: The ID of the tierMembership.
          type:
            type: string
            enum:
              - credit
          balances:
            type: object
            properties:
              points:
                type: integer
                nullable: false
                format: int32
                description: The number of tier membership points awarded to this membership in this transaction.
              transactions:
                type: integer
                nullable: false
                format: int32
                description: The number of tier membership transactions completed.
              spend:
                type: integer
                nullable: false
                format: int32
                description: The total spend counting towards tier membership.
          success:
            type: boolean
            nullable: true
            description: If this has been successfully settled (always null in open response).

    enrichedBasketSummaryResultsEntity:
      title: Transaction Summary Results Entity
      type: object
      properties:
        pointsByScheme:
          type: array
          nullable: true
          items:
            type: object
            properties:
              points:
                $ref: '#/components/schemas/resultsPointsEntity'
        points:
          $ref: '#/components/schemas/resultsPointsEntity'
        tiers:
          type: object
          properties:
            points:
              description: The total amount of tier membership points for this transaction.
              type: integer
              format: int32
              nullable: false
            transactions:
              description: The total number of tier transactions to be awarded for this transaction.
              type: integer
              format: int32
              nullable: false
            spend:
              description: The total amount of spend to credit for this transaction.
              type: integer
              format: int32
              nullable: false
    resultsPointsEntity:
      type: object
      properties:
        spend:
          description: Total value of points spent during transaction.
          type: integer
          format: int32
          nullable: false
        debit:
          description: Total value of points debited during transaction.
          type: integer
          format: int32
          nullable: false
        refund:
          description: Total value of points clawed-back during refund transaction.
          type: integer
          format: int32
          nullable: false
        totalPointsTaken:
          description: Sum of all negative balance actions (spend + debit + refund).
          type: integer
          format: int32
          nullable: false
        earn:
          description: Total value of points earned during transaction.
          type: integer
          format: int32
          nullable: false
        credit:
          description: Total value of points credited during transaction.
          type: integer
          format: int32
          nullable: false
        totalPointsGiven:
          description: Sum of all positive balance actions (earn + credit).
          type: integer
          format: int32
          nullable: false
        totalMonetaryValue:
          description: Monetary value of points using Scheme rules.
          type: integer
          format: int32
          nullable: false
        redemptionChannel:
          description: The redemption channel used for this request.
          type: string
          format: string
          nullable: false

    enabledAdjudicationEntity:
      type: boolean
      default: false
      description: >-
        Determine if points spend adjudication should be completed in the open call
    includeOpenOffersEntity:
      type: boolean
      default: false
      description: >-
        Determine if open Spend Rate Modifier coupons should be included in the analysis
    overrideTransactionCapabilitiesEntity:
      type: boolean
      default: false
      description: >-
        If set to true, the spend adjudication will be completed regardless of the output from the
        transactionCapabilities analysis. If set to false, analysis will only be performed if
        transactionCapabilities.loyalty.spend is true.
    overrideTransactionCapabilitiesDisallowSpendEntity:
      type: boolean
      default: false
      description: >-
        If set to true, the spend adjudication will be disabled regardless of
        any other settings. Can not be true if overrideTransactionCapabilities is true.

    adjudicatePointsSpendEntity:
      type: object
      required:
        - enabled
      properties:
        enabled:
          $ref: '#/components/schemas/enabledAdjudicationEntity'
        includeOpenOffers:
          $ref: '#/components/schemas/includeOpenOffersEntity'
        overrideTransactionCapabilities:
          $ref: '#/components/schemas/overrideTransactionCapabilitiesEntity'
        overrideTransactionCapabilitiesDisallowSpend:
          $ref: '#/components/schemas/overrideTransactionCapabilitiesDisallowSpendEntity'

    openAdjudicatePointsSpendEntity:
      type: object
      required:
        - enabled
      properties:
        enabled:
          $ref: '#/components/schemas/enabledAdjudicationEntity'
        includeOpenOffers:
          $ref: '#/components/schemas/includeOpenOffersEntity'
        overrideTransactionCapabilities:
          $ref: '#/components/schemas/overrideTransactionCapabilitiesEntity'
        overrideTransactionCapabilitiesDisallowSpend:
          $ref: '#/components/schemas/overrideTransactionCapabilitiesDisallowSpendEntity'
        hideSpendRateModifierAccounts:
          type: boolean
          default: false
          description: If set to true, it will hide the accounts that are spend rate modifiers in the response.

    enabledAdjustEntity:
      type: boolean
      default: false
      description: Whether to carry out basket adjust.
    includeOpenOffersAdjustEntity:
      type: boolean
      default: false
      description: Whether to include open offers.
    adjustBasketEntity:
      type: object
      required:
        - enabled
      description: >-
        This option instructs AIR to perform Basket Adjustment.
      properties:
        enabled:
          $ref: '#/components/schemas/enabledAdjustEntity'
        includeOpenOffers:
          $ref: '#/components/schemas/includeOpenOffersAdjustEntity'

    openAdjustBasketEntity:
      type: object
      required:
        - enabled
      description: >-
        This option instructs AIR to perform Basket Adjustment.
      properties:
        enabled:
          $ref: '#/components/schemas/enabledAdjustEntity'
        includeOpenOffers:
          $ref: '#/components/schemas/includeOpenOffersAdjustEntity'
        hideAccounts:
          type: boolean
          default: false
          description: If set to true, it will hide the accounts that are discount offer type in the response.

    enabledAnalyseEntity:
      type: boolean
      default: false
      description: Whether to carry out basket analysis. Replaces "perform"
    performEntity:
      type: boolean
      default: false
      deprecated: true
    includeOpenOffersAnalyseEntity:
      type: boolean
      default: false
    rateNameEntity:
      type: string
      default: default
      description: The rate used for calculating base earn if you want to override the default

    analyseBasketEntity:
      type: object
      required:
        - enabled
      description: >-
        This option instructs AIR to perform Basket Analyse.
      properties:
        enabled:
          $ref: '#/components/schemas/enabledAnalyseEntity'
        perform:
          $ref: '#/components/schemas/performEntity'
        includeOpenOffers:
          $ref: '#/components/schemas/includeOpenOffersAnalyseEntity'
        rateName:
          $ref: '#/components/schemas/rateNameEntity'

    openAnalyseBasketEntity:
      type: object
      required:
        - enabled
      description: >-
        This option instructs AIR to perform Basket Analyse.
      properties:
        enabled:
          $ref: '#/components/schemas/enabledAnalyseEntity'
        perform:
          $ref: '#/components/schemas/performEntity'
        includeOpenOffers:
          $ref: '#/components/schemas/includeOpenOffersAnalyseEntity'
        rateName:
          $ref: '#/components/schemas/rateNameEntity'
        hideAccounts:
          type: boolean
          default: false
          description: If set to true, it will hide the accounts that are not discount offer, nor spend rate modifier, nor loyalty points type in the response.
        hidePointsAccounts:
          type: boolean
          default: false
          description: If set to true, it will hide the accounts that are loyalty points type in the response.

    storeBasketEntity:
      type: object
      required:
        - enabled
      description: >-
        If this optional request attribute is available and enabled is set to true, and if unique `reference` is provided then analysed basket contents will be stored in wallet transaction
      properties:
        enabled:
          type: boolean
          default: false
          nullable: false
          description: When true stores basket in wallet transaction

    inclusionExclusionEntity:
      nullable: true
      type: object
      properties:
        items:
          nullable: true
          type: array
          uniqueItems: true
          description: A list of product `UPC`s which must be in basket. N.B. either `items` or `SKUs` will be set, not both.
          items:
            type: string
        groups:
          nullable: true
          type: object
          uniqueItems: true
          description: Groups is an object with group type as the key, and group reference as the array reference.
          properties:
            exampleItem:
              nullable: false
              type: array
              description: ExampleItem is a placeholder name intended for substitution based on client preferences. It represents an array with product information, allowing clients to specify items for the included or excluded section.
              items:
                type: string
        skus:
          nullable: true
          type: array
          uniqueItems: true
          description: A list of potential products that could be included or excluded from rewards.
          items:
            type: string
        ups:
          nullable: true
          type: array
          uniqueItems: true
          description: A list of potential products that could be included or excluded from rewards.
          items:
            type: string
        tags:
          nullable: true
          type: array
          uniqueItems: true
          description: A list of tags which refers to a product or multiple products that could be included or excluded from rewards.
          items:
            type: string

    intervalEntity:
      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 included in this object.
              * TOTAL - Will use the value of the products included in this object.
              * QUALIFICATION - Will use the number of times the customer has qualified as the interval decider.
          enum:
            - SPEND
            - UNITS
            - TOTAL
            - QUALIFICATION
        step:
          type: integer
          description: Number of points required to be spent above the floor to get an additional bonus reward - repeatable.
        discountValue:
          nullable: true
          type: integer
          description: The discount value to apply.
        floor:
          nullable: true
          type: integer
          description: The minimum threshold of the value used for the decider.
        ceiling:
          nullable: true
          type: integer
          description: The maximum threshold of the value used for the decider.
        discountPercentage:
          nullable: true
          type: integer
          format: float
          description: The discount percentage to apply.

    productsCollectionEntity:
      nullable: true
      type: object
      description: The products that this reward applies to.
      properties:
        unitSafeName:
          type: object
          nullable: true
          description: The Unit Safe Name is a dynamic string made up of user's name eg EagleEye.
          properties:
            logicalOperator:
              nullable: true
              type: string
              description: Defines how each of the collections interact with each other.
              enum:
                - AND
                - OR
                - ANYOF
            collections:
              type: array
              uniqueItems: false
              minItems: 1
              description: The list of products that can be rewarded.
              items:
                type: object
                properties:
                  minimumNumberOfUnits:
                    nullable: true
                    type: integer
                    description: The reward qualifies only when the minimum number of units is achieved.
                  maximumNumberOfUnits:
                    nullable: true
                    type: integer
                    description: The reward is applicable up to a 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:
                        $ref: '#/components/schemas/inclusionExclusionEntity'
                      excluded:
                        $ref: '#/components/schemas/inclusionExclusionEntity'
                  value:
                    nullable: true
                    type: object
                    properties:
                      standard:
                        nullable: true
                        type: object
                        properties:
                          discountAmount:
                            nullable: true
                            type: integer
                            description:  The discount amount to apply.
                          allFree:
                            nullable: true
                            type: boolean
                            description: All the rewarded products should be free eg buy a pizza get a free garlic bread.
                          percentageAmount:
                            nullable: true
                            type: integer
                            format: float
                            description:  The percentage amount to apply.
                          finalAmount:
                            nullable: true
                            type: integer
                            description: The final prices in the basket for the rewarded products only.
                      interval:
                        $ref: '#/components/schemas/intervalEntity'
                      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.
                                * TOTAL - Will use the value of the products included in this object.
                              enum:
                              - SPEND
                              - UNITS
                              - TOTAL
                          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.
                                ceiling:
                                  nullable: true
                                  type: integer
                                  description: The maximum threshold of the value used for the decider.
                                discountAmount:
                                  type: integer
                                  description: The discount amount to apply.
                                discountPercentage:
                                  nullable: true
                                  type: integer
                                  format: float
                                  description: The discount percentage to apply.
    enrichedBasketEntity:
      title: Enriched Basket Entity
      type: object
      required:
        - type
        - items
        - summary
      properties:
        type:
          type: string
          enum:
            - ENRICHED
        summary:
          type: object
          required:
            - totalItems
            - totalBasketValue
          properties:
            totalItems:
              type: integer
              format: int32
              nullable: false
              description: Basket Items count
            totalBasketValue:
              type: integer
              format: int32
              nullable: false
              description: >-
                Total Basket monetary Value after discounts, denominated to a
                smallest currency unit (e.g. for `USD` this value should be
                provided in `cents`)
            totalQualifyingAmount:
              type: object
              nullable: true
              minProperties: 1
              maxProperties: 4
              properties:
                points:
                  type: integer
                  format: int32
                  nullable: true
                  description: Basket Monetary Value for Loyalty Points calculations
                baseEarn:
                  type: integer
                  format: int32
                  nullable: false
                  description: Basket Monetary Value used for calculating base earn, overriding totalBasketValue. Adheres to basket discounts
                promotions:
                  type: integer
                  format: int32
                  nullable: true
                  description: Basket Monetary Value for Promotion Offer selections
                discount:
                  type: integer
                  format: int32
                  nullable: true
                  description: Basket Monetary Value for Discount calculations
                staff:
                  type: integer
                  format: int32
                  nullable: true
                  description: Basket Monetary Value for Staff Discount or Promotions
            totalTaxAmount:
              type: integer
              format: int32
              nullable: true
              description: >-
                Total Tax Amount denominated to a smallest currency unit (e.g.
                for `USD` this value should be provided in `cents`)
            totalDiscountAmount:
              type: object
              properties:
                promotions:
                  type: integer
                  format: int32
                  description: Promotions Discount Amount. If basket adjustment adds to discounts, this amount will be added to
                  nullable: true
                staff:
                  type: integer
                  format: int32
                  description: Staff Discount Amount
                  nullable: true
                general:
                  type: integer
                  format: int32
                  description: General Discount Amount
                  nullable: true
            reporting:
              $ref: '#/components/schemas/reportingEntity'
            fulfilledBaseEarn:
              $ref: '#/components/schemas/fulfilledBaseEarnEntity'
            expectedPoints:
              $ref: '#/components/schemas/expectedPointsEntity'
            adjustmentRules:
              $ref: '#/components/schemas/adjustmentRulesEntity'
            tenderResults:
              $ref: '#/components/schemas/tenderResultsEntity'
            adjustmentResults:
              $ref: '#/components/schemas/adjustmentResultsEntity'
            bounceBackResults:
              $ref: '#/components/schemas/bounceBackResultsEntity'
            qualifiesResults:
              $ref: '#/components/schemas/qualifiesResultsEntity'
            adjudicationResults:
              $ref: '#/components/schemas/adjudicationResultsEntity'
            results:
              $ref: '#/components/schemas/enrichedBasketSummaryResultsEntity'
            tierMembershipResults:
              $ref: '#/components/schemas/tierMembershipResultsEntity'
            redemptionChannel:
              description: The redemption channel used for this request
              type: string
              format: string
              nullable: false

        contents:
          $ref: '#/components/schemas/enrichedBasketContentsCollectionEntity'

        payment:
          $ref: '#/components/schemas/enrichedPaymentEntity'

        analysedDateTime:
          type: string
          format: ees-date-time
          description: Basket Analysis Date-Time in ATOM format
          nullable: false

    optionsEntity:
      type: object
      properties:
        adjudicatePointsSpend:
          $ref: '#/components/schemas/adjudicatePointsSpendEntity'
        adjustBasket:
          $ref: '#/components/schemas/adjustBasketEntity'
        analyseBasket:
          $ref: '#/components/schemas/analyseBasketEntity'
        storeBasket:
          $ref: '#/components/schemas/storeBasketEntity'
        lockTimeOverride:
          $ref: '#/components/schemas/lockTimeOverrideEntity'

    openOptionsEntity:
      type: object
      properties:
        adjudicatePointsSpend:
          $ref: '#/components/schemas/openAdjudicatePointsSpendEntity'
        adjustBasket:
          $ref: '#/components/schemas/openAdjustBasketEntity'
        analyseBasket:
          $ref: '#/components/schemas/openAnalyseBasketEntity'
        storeBasket:
          $ref: '#/components/schemas/storeBasketEntity'
        lockTimeOverride:
          $ref: '#/components/schemas/lockTimeOverrideEntity'

    defaultErrorEntity:
      type: object
      properties:
        errorCode:
          type: string
          description: EES AIR Error Code
          enum:
            - NF
            # Not Found
            - IR
            # Invalid Request
            - U
            # Unknown Error
            - AF
            # Authorisation Failed
            - AT
            # Account Type
            - IFU
            # Insufficient Funds
            - CE
            # Configuration Error
            - IPR
            # IP Address Rejected
            - MNA
            # Method Not Allowed
            - MPA
            # Missing Parameter
            - P
            # Privileges
            - ALR
            # Account Limit Reached
            - CX
            # Campaign Expired
            - CI
            # Campaign Inactive
            - CP
            # Campaign Pending
            - CR
            # Campaign Removed
            - CU
            # Campaign Unknown
            - CORQ
            # Consumer Required
            - CTNR
            # Consumer Type Not Recognized
            - DSN
            # Duplicated Serial Number
            - IW
            # Voucher Can Not Be Created
            - RW
            # Voucher Can Not Be Redeemed
            - VURC
            # No Voucher Available to Redeem for Campaign
            - VURI
            # No Voucher Available to Redeem for this Identity
            - FES
            # Scheduling Format Incorrect
            - IOC
            # Improper Offer Configuration
            - AA
            # Invalid Access to API Method
            - ILA
            # Invalid Load Amount
            - IP
            # Invalid Parameter
            - LIR
            # Outlet Identifier Required
            - LNA
            # Outlet Not Allowed
            - LPR
            # Outlet Prohibited by Campaign Settings
            - MAC
            # Maximum Number of Code Variations
            - MTLE
            # Max Active Tokens Limit Exceeded
            - MLV
            # Maximum Voucher Value Exceeded
            - MAR
            # Minimum Amount Required
            - OC
            # Campaign has no Offer
            - RWI
            # Token can not be Redeemed at this time. Blocked by redemption windows.
            - TEXP
            # Token Expired
            - TULR
            # Token Usage Limit Reached
            - UAS
            # Transaction Not Allowed by current account status
            - UV
            # Voucher Unknown
            - VA
            # Voucher already been sent
            - VC
            # Voucher Cancelled
            - VXP
            # Voucher Expired
            - VI
            # Voucher Invalid
            - VL
            # Voucher Locked
            - VNL
            # Voucher Not Locked
            - VPUF
            # You don't have privileges to unlock this token
            - VSM
            # Voucher Serial Mismatch
            - VUA
            # No vouchers available for this campaign
            - VU
            # Voucher already redeemed
            - ITID
            # Invalid Transaction ID
            - WTF
            # Wallet Transaction Failure
            - IH
            # Invalid Header set
            - RFL
            # Max redemption limit ... per period ... has been exceeded
        errorMessage:
          type: string
          format: string
          description: Human Friendly Error Message
      x-enum:
        - { errorCode: NF, errorMessage: Not Found }
        - { errorCode: IR, errorMessage: Invalid Request }
        - { errorCode: U, errorMessage: Unknown Error }
        - { errorCode: AF, errorMessage: Authorisation Failed }
        - { errorCode: AT, errorMessage: Account Type }
        - { errorCode: IFU, errorMessage: Insufficient Funds }
        - { 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: ALR, errorMessage: Account Limit Reached }
        - { errorCode: CX, errorMessage: Campaign Expired }
        - { errorCode: CI, errorMessage: Campaign Inactive }
        - { errorCode: CP, errorMessage: Campaign Pending }
        - { errorCode: CR, errorMessage: Campaign Removed }
        - { errorCode: CU, errorMessage: Campaign Unknown }
        - { errorCode: CORQ, errorMessage: Consumer Required }
        - { errorCode: CTNR, errorMessage: Consumer Type Not Recognized }
        - { errorCode: DSN, errorMessage: Duplicated Serial Number }
        - { errorCode: IW, errorMessage: Voucher Can Not Be Created }
        - { errorCode: RW, errorMessage: Voucher Can Not Be Redeemed }
        - { errorCode: VURC, errorMessage: No Voucher Available to Redeem for Campaign }
        - { errorCode: VURI, errorMessage: No Voucher Available to Redeem for this Identity }
        - { errorCode: FES, errorMessage: Scheduling Format Incorrect }
        - { errorCode: IOC, errorMessage: Improper Offer Configuration }
        - { errorCode: AA, errorMessage: Invalid Access to API Method }
        - { errorCode: ILA, errorMessage: Invalid Load Amount }
        - { errorCode: IP, errorMessage: Invalid Parameter }
        - { errorCode: LIR, errorMessage: Outlet Identifier Required }
        - { errorCode: LNA, errorMessage: Outlet Not Allowed }
        - { errorCode: LPR, errorMessage: Outlet Prohibited by Campaign Settings }
        - { errorCode: MAC, errorMessage: Maximum Number of Code Variations }
        - { errorCode: MTLE, errorMessage: Max Active Tokens Limit Exceeded }
        - { errorCode: MLV, errorMessage: Maximum Voucher Value Exceeded }
        - { errorCode: MAR, errorMessage: Minimum Amount Required }
        - { errorCode: OC, errorMessage: Campaign has no Offer }
        - { errorCode: RWI, errorMessage: Token can not be Redeemed at this time. Blocked by redemption windows. }
        - { errorCode: TEXP, errorMessage: Token Expired }
        - { errorCode: TULR, errorMessage: Token Usage Limit Reached }
        - { errorCode: UAS, errorMessage: Transaction Not Allowed by current account status }
        - { errorCode: UV, errorMessage: Voucher Unknown }
        - { errorCode: VA, errorMessage: Voucher already been sent }
        - { errorCode: VC, errorMessage: Voucher Cancelled }
        - { errorCode: VXP, errorMessage: Voucher Expired }
        - { errorCode: VI, errorMessage: Voucher Invalid }
        - { errorCode: VL, errorMessage: Voucher Locked }
        - { errorCode: VNL, errorMessage: Voucher Not Locked }
        - { errorCode: VPUF, errorMessage: Voucher You don't have privileges to unlock this token }
        - { errorCode: VSM, errorMessage: Voucher Serial Mismatch }
        - { errorCode: VUA, errorMessage: No vouchers available for this campaign }
        - { errorCode: VU, errorMessage: Voucher already redeemed }
        - { errorCode: ITID, errorMessage: Invalid Transaction ID }
        - { errorCode: WTF, errorMessage: Wallet Transaction Failure }
        - { errorCode: IH, errorMessage: Invalid Header set }
        - { "errorCode": "RFL", "errorMessage": "Redemption failed: Max redemption limit ... per period ... has been exceeded" }

  requestBodies:
    activateWalletPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - identity
            properties:
              identity:
                type: object
                nullable: false
                description: Identifies a customer, whether scanned or typed.
                properties:
                  identityValue:
                    type: string
                    format: string
                    description: Identity Value
    openWalletPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - location
            properties:
              identity:
                type: object
                minProperties: 1
                maxProperties: 1
                nullable: true
                description: Identifies a customer, whether scanned or typed. Optional  for cases where a customer is unknown. Without an identity, objects such as wallet and identity will not be possible.
                properties:
                  identityValue:
                    type: string
                    format: string
                    description: Identity Value
                  #secret:
                  #  type: string
                  #  format: string
                  #  description: '[Optional] additional Identity Secret, if applicable'
              reference:
                type: string
                format: string
                nullable: false
                description: Merchant Reference (please note this reference has to be unique). In combination with `lock`, analysed accounts can be locked using this reference
              location:
                $ref: '#/components/schemas/locationEntity'
              basket:
                type: object
                required:
                  - type
                  - items
                properties:
                  type:
                    type: string
                    enum:
                      - STANDARD
                  summary:
                    $ref: '#/components/schemas/standardBasketSummaryEntity'
                  contents:
                    $ref: '#/components/schemas/openBasketContentsCollectionEntity'
                  payment:
                    $ref: '#/components/schemas/standardPaymentEntity'
              includeAdditionalEntities:
                type: object
                description: >-
                  This optional attribute allows to instruct AIR to include additional and related entities.
                minProperties: 1
                maxProperties: 2
                properties:
                  consumer:
                    type: object
                  identities:
                    type: object
              lock:
                type: boolean
                default: false
                nullable: false
                description: >-
                  Optional boolean flag, allowing the calling application to instruct AIR to lock the accounts in the transaction. A `reference` must be passed which will be used to lock the transactions
              examine:
                $ref: '#/components/schemas/examineEntity'
              excludedAccounts:
                $ref: '#/components/schemas/excludedAccountsEntity'
              includedAccounts:
                $ref: '#/components/schemas/includedAccountsEntity'
              options:
                $ref: '#/components/schemas/openOptionsEntity'
              walletTransactionOverride:
                $ref: '#/components/schemas/walletTransactionOverrideEntity'

    unlockWalletPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - reference
            properties:
              reference:
                type: string
                format: string
                nullable: false
                description: Reference of the Open Operation (which locked some accounts)
              walletId:
                type: string
                format: string
                nullable: false
                description: EES Wallet ID

    openSettlePayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - reference
            properties:
              identity:
                type: object
                minProperties: 1
                maxProperties: 1
                nullable: false
                description: Identifies a customer, whether scanned or typed.
                properties:
                  identityValue:
                    type: string
                    format: string
                    description: Identity Value
              reference:
                type: string
                format: string
                nullable: false
                description: Merchant Reference (please note this reference has to be unique)
              location:
                $ref: '#/components/schemas/locationEntity'
              basket:
                $ref: '#/components/schemas/standardBasketEntity'
              options:
                $ref: '#/components/schemas/optionsEntity'
              walletTransactionOverride:
                $ref: '#/components/schemas/walletTransactionOverrideEntity'
              meta:
                allOf:
                  - $ref: '#/components/schemas/metaEntity'
                  - nullable: true
              transactionDetails:
                allOf:
                  - $ref: '#/components/schemas/transactionDetailsEntity'
                  - nullable: true

    settlePayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - reference
            description: >-
              please note&#58; at least one of the following Request attributes `operations` and `accountTransactions` has to be provided
            properties:
              mode:
                type: string
                description: Mode of operation
                enum:
                  - ACTIVE
                  - PASSIVE
                  - RECALL
              walletId:
                type: string
                format: string
                nullable: true
                description: If passed, the EES Wallet ID to associate the wallet transaction to. Optional
              identity:
                type: object
                minProperties: 1
                maxProperties: 1
                nullable: true
                description: Identifies a customer, whether scanned or typed. Optional for cases where a identity is unknown. Without an identity, no identity will be set on the wallet transaction
                properties:
                  identityValue:
                    type: string
                    format: string
                    description: Identity Value
              operations:
                type: array
                description: >-
                  Please note&#58; `balances` and `amount` are mutually exclusive Request Parameters. The account, to perform the operation on, must be identified by either a `token` or an `accountId` / `walletId` combination.
                items:
                  type: object
                  required:
                    - operationType
                  properties:
                    walletId:
                      type: string
                      format: string
                      description: EES AIR Wallet ID
                    accountId:
                      type: string
                      format: string
                      description: EES AIR Wallet Account ID
                    resourceId:
                      type: string
                      format: string
                      description: >-
                        The ID of the resource in AIR to operate upon. For open offers, this is the AIR campaignId.
                        This field is required if the "operationType" is "createRedeem".
                    resourceType:
                      type: string
                      nullable: false
                      description: >-
                        The AIR Resource Type against which the operation is taking an action. If the "operationType"
                        field is "createRedeem" this field is required
                      enum:
                        - CAMPAIGN
                    token:
                      type: string
                      format: string
                      description: Token value belonging to an account
                    operationType:
                      type: string
                      description: Operation Type
                      enum:
                        - redeem
                        - credit
                        - debit
                        - earn
                        - spend
                        - stamp
                        - createRedeem
                    amount:
                      type: integer
                      format: int32
                      nullable: false
                      description: Amount to be credited / debited / earned / spend / stamped
                    balances:
                      $ref: '#/components/schemas/accountBalancesEntity'
                    meta:
                      allOf:
                        - $ref: '#/components/schemas/metaEntity'
                        - nullable: true
              accountTransactions:
                type: array
                nullable: false
                minItems: 1
                uniqueItems: true
                description: >-
                  This optional Request attribute allows the calling application to instruct EES AIR to include into delayed Wallet Transaction some Account Transaction performed in real time (e.g. to reduce fraud risk)
                items:
                  type: object
                  required: [accountTransactionId]
                  properties:
                    accountTransactionId:
                      type: string
                      format: string
                      nullable: false
                      description: Account Transaction ID
              walletTransactions:
                type: array
                nullable: false
                uniqueItems: true
                description: >-
                  This optional Request attribute allows the calling application to instruct EES AIR to complete the stated operation against a previously created wallet transaction
                items:
                  type: object
                  required:
                    - reference
                    - walletId
                    - link
                  properties:
                    reference:
                      type: string
                      format: string
                      nullable: false
                      description: >-
                        The reference for the transaction to operate upon
                    walletId:
                      type: string
                      format: string
                      nullable: false
                      description: >-
                        The walletId in which the wallet transaction resides. Provides an element of protection that the correct wallet transaction is being operated upon.
                    operationType:
                      type: string
                      nullable: true
                      description: >-
                        The operation to perform against the wallet transaction
                          - SETTLE: Mark this wallet transaction as settled
                      enum:
                        - SETTLE
                    link:
                      type: boolean
                      nullable: false
                      description: >-
                        Flag to determine if the wallet transaction should be linked as a child of the settle transaction
                    overrides:
                      type: array
                      nullable: true
                      description: >-
                        Overrides to be used instead of the previous spend wallet transaction's.
                      items:
                        type: object
                        required:
                          - accountId
                          - balances
                        properties:
                          accountId:
                            type: string
                            format: string
                            nullable: false
                            description: The id of the account the points are being spent from.
                          balances:
                            type: object
                            nullable: false
                            required:
                              - current
                              - lifetime_spend
                              - lifetime_spend_value
                            description: >-
                              The balances to override.
                            properties:
                              current:
                                type: integer
                                format: integer
                                nullable: false
                                description: >-
                                  The current balance to override the spend transaction with.
                              lifetime_spend:
                                type: integer
                                format: integer
                                nullable: false
                                description: >-
                                  The lifetime_spend balance to override the spend transaction with.
                              lifetime_spend_value:
                                type: integer
                                format: integer
                                nullable: false
                                description: >-
                                  The lifetime_spend_value balance to override the spend transaction with.
              reference:
                type: string
                format: string
                nullable: false
                description: Merchant Reference (please note this reference has to be unique)
              location:
                $ref: '#/components/schemas/locationEntity'
              basket:
                $ref: '#/components/schemas/enrichedBasketEntity'
              options:
                type: object
                description: details TBC
                nullable: true
                deprecated: true
              walletTransactionOverride:
                $ref: '#/components/schemas/walletTransactionOverrideEntity'
              meta:
                allOf:
                  - $ref: '#/components/schemas/metaEntity'
                  - nullable: true
              transactionDetails:
                allOf:
                  - $ref: '#/components/schemas/transactionDetailsEntity'
                  - nullable: true

    amendSettlePayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - walletTransactionId
              - location
            properties:
              walletTransactionId:
                type: string
                format: string
                description: ID of a Wallet Transaction to be amended
              operations:
                type: array
                items:
                  type: object
                  required:
                    - walletId
                    - accountId
                    - operationType
                    - identityId
                  properties:
                    walletId:
                      type: string
                      format: string
                      description: EES AIR Wallet ID
                    accountId:
                      type: string
                      format: string
                      description: EES AIR Wallet Account ID
                    operationType:
                      type: string
                      description: Operation Type
                      enum:
                        - redeem
                        - credit
                        - debit
                        - earn
                        - spend
                        - stamp
                    amount:
                      type: integer
                      format: int32
                      description: Amount to be credited / debited / stamped
                    identityId:
                      type: string
                      format: string
                      description: EES AIR Identity ID
                    meta:
                      allOf:
                        - $ref: '#/components/schemas/metaEntity'
                        - nullable: true
              accountTransactions:
                type: array
                nullable: false
                minItems: 1
                uniqueItems: true
                description: >-
                  This optional Request attribute allows the calling application to instruct EES AIR to include into delayed Wallet Transaction some Account Transactions performed in previously (e.g. in real time)
                items:
                  type: object
                  required: [transactionId]
                  properties:
                    transactionId:
                      type: string
                      format: string
                      description: Account Transaction ID

              reference:
                type: string
                format: string
                description: Operation Reference
              location:
                $ref: '#/components/schemas/locationEntity'
              basket:
                type: object
                description: >-
                  Basket Object (details TBC)
                nullable: true
              options:
                type: object
                description: details TBC
                nullable: true
                properties:
                  transactionDateTime:
                    type: string
                    format: string
                    description: >-
                      Transaction Date-time to override Server's `now` (i.e. for
                      offline Transactions)

    productExchangePayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - originalTransaction
              - basket
              - location
              - reference
            properties:
              reference:
                type: string
                format: string
                description: Product Exchange Transaction Reference.
              originalTransaction:
                type: object
                required:
                  - reference
                properties:
                  reference:
                    type: string
                    format: string
                    description: Settle Transaction Reference.
              basket:
                type: object
                required:
                  - type
                  - items
                properties:
                  type:
                    type: string
                    enum:
                      - STANDARD
                  summary:
                    $ref: '#/components/schemas/standardBasketSummaryEntity'
                  contents:
                    $ref: '#/components/schemas/exchangeBasketContentsCollectionEntity'
                  payment:
                    $ref: '#/components/schemas/standardPaymentEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    refundPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - originalTransaction
              - basket
              - location
              - reference
            properties:
              reference:
                type: string
                format: string
                description: Refund Transaction Reference
              originalTransaction:
                type: object
                required:
                  - reference
                properties:
                  reference:
                    type: string
                    format: string
                    description: Settle Transaction Reference
              basket:
                type: object
                required:
                  - type
                  - items
                properties:
                  type:
                    type: string
                    enum:
                      - STANDARD
                  summary:
                    $ref: '#/components/schemas/standardBasketSummaryEntity'
                  contents:
                    $ref: '#/components/schemas/refundBasketContentsCollectionEntity'
                  payment:
                    $ref: '#/components/schemas/standardPaymentEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    replayPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - walletId
              - accountIds
            properties:
              walletId:
                type: string
                format: string
                nullable: false
                description:
                  walletId is a unique identifier representing a wallet entity.
              accountIds:
                type: array
                nullable: false
                description: Adjudicates the offers associated with these accounts.
                items:
                  type: string


    fulfilPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - originalTransaction
              - location
              - reference
            properties:
              originalTransaction:
                type: object
                required:
                  - reference
                properties:
                  reference:
                    type: string
                    format: string
                    description: Open Transaction Reference
              reference:
                type: string
                format: string
                description: Fulfil Transaction Reference
              basket:
                type: object
                required:
                  - type
                  - items
                properties:
                  type:
                    type: string
                    enum:
                      - STANDARD
                  summary:
                    $ref: '#/components/schemas/standardBasketSummaryEntity'
                  contents:
                    $ref: '#/components/schemas/fulfilBasketContentsCollectionEntity'
                  payment:
                    $ref: '#/components/schemas/standardPaymentEntity'
              location:
                $ref: '#/components/schemas/locationEntity'
              meta:
                allOf:
                  - $ref: '#/components/schemas/metaEntity'
                  - nullable: true
              transactionDetails:
                allOf:
                  - $ref: '#/components/schemas/transactionDetailsEntity'
                  - nullable: true
              finalise:
                type: boolean
                nullable: true
                description: >-
                  If this optional attribute is set to `true`, the original Transaction will be settled by re-adjudicating the delta-basket and applying basket level offers.
              walletTransactions:
                type: array
                nullable: false
                uniqueItems: true
                description: >-
                  This optional Request attribute allows the calling application to instruct EES AIR to complete the stated operation against a previously created wallet transaction.
                items:
                  type: object
                  required:
                    - reference
                    - walletId
                    - link
                  properties:
                    reference:
                      type: string
                      format: string
                      nullable: false
                      description: >-
                        The reference for the transaction to operate upon
                    walletId:
                      type: string
                      format: string
                      nullable: false
                      description: >-
                        The walletId in which the wallet transaction resides. Provides an element of protection that the correct wallet transaction is being operated upon.
                    operationType:
                      type: string
                      nullable: true
                      description: >-
                        The operation to perform against the wallet transaction
                          - SETTLE: Mark this wallet transaction as settled
                      enum:
                        - SETTLE
                    link:
                      type: boolean
                      nullable: false
                      description: >-
                        Flag to determine if the wallet transaction should be linked as a child of the settle transaction.
    spendCalculatePayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
              - identity
              - pointsValue
              - monetaryValue
              - schemeReference
              - basket
            properties:
              location:
                $ref: '#/components/schemas/locationEntity'
              identity:
                type: object
                properties:
                  identityValue:
                    type: string
                    format: string
                    description: >-
                      The value of the identity to use to find a wallet
              pointsValue:
                type: integer
                description: >-
                  The number of points for which to calculate the financial value. Either monetaryValue or pointsValue must be passed in the request.
                nullable: true
              monetaryValue:
                type: integer
                description: >-
                  The currency value for which to use to calculate the points value. Either monetaryValue or pointsValue must be passed in the request.
                nullable: true
              overrideTransactionCapabilities:
                type: boolean
                default: false
                description: >-
                  Allows the calling application to override the response from the state machine and request a response
                  on the spend calculations regardless of the state machine output.
              scheme:
                type: object
                description: >-
                  The details of the points scheme to find accounts in the target wallet. Either `id` or `reference` must be passed and not empty
                properties:
                  reference:
                    type: string
                    format: string
                    nullable: true
                    description: >-
                      The scheme reference to use to lookup a points account in the wallet associated to the identity passed
                  id:
                    type: string
                    format: string
                    nullable: true
                    description: >-
                      The schemeId to use to lookup a points account in the wallet associated to the identity passed.
              basket:
                $ref: '#/components/schemas/walletTransactionBasketEntity'
              options:
                type: object
                properties:
                  adjudicatePointsSpend:
                    type: object
                    properties:
                      includeOpenOffers:
                        type: boolean
                        default: false
                        description: >-
                          Determine if open Spend Rate Modifier coupons should be included in the analysis
    spendPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            properties:
              location:
                $ref: '#/components/schemas/locationEntity'
              identity:
                type: object
                properties:
                  identityValue:
                    type: string
                    format: string
                    description: >-
                      The value of the identity to use to find a wallet
                    nullable: false
              reference:
                type: string
                format: string
                description: >-
                  A unique transaction reference which will be applied to the created wallet transaction.
                nullable: false
              lock:
                type: boolean
                default: false
                nullable: false
                description: >-
                  Optional boolean flag, allowing the calling application to instruct AIR to lock verified Accounts.
                  If provided as true no operations (e.g. spending points or redeeming accounts) will be performed until
                  you Settle the transaction, otherwise operations will be performed.
              parentWalletTransactionReference:
                type: string
                format: string
                description: >-
                  The reference of the open transaction to link to as the parent of this spend transaction.
                nullable: false
              spendAdjudicationResults:
                $ref: '#/components/schemas/spendAdjudicationResultsEntity'
              options:
                type: object
                properties:
                  lockTimeOverride:
                    $ref: '#/components/schemas/lockTimeOverrideEntity'
              transactionDetails:
                $ref: '#/components/schemas/transactionDetailsEntity'
              meta:
                $ref: '#/components/schemas/metaWalletTransactionEntity'

    lockAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    spendVoidPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            properties:
              identity:
                type: object
                properties:
                  identityValue:
                    type: string
                    format: string
                    description: >-
                      The value of the identity to use to find a wallet.
                    nullable: false
              reference:
                type: string
                format: string
                description: >-
                  The reference of the Spend transaction to be voided.
                nullable: false

    createAccountsPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - resourceType
              - resourceId
              - location
            properties:
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  EES AIR Wallet ID for which an Account will be created. Please note&#58; this attribute is mandatory for EES AIR Wallet Clients
              resourceType:
                type: string
                nullable: false
                description: EES AIR Resource Type
                enum:
                  - CAMPAIGN
                  - PROGRAMME
                  - SCHEME
                  - PLAN
              resourceId:
                type: string
                format: string
                nullable: false
                description: >-
                  EES AIR Resource ID (Campaign ID, Programme ID, Scheme ID, Plan ID, etc.)
              status:
                type: string
                nullable: false
                description: >-
                  EES AIR Account Status (Please note&#58; enum below is different compared to all available Account Statuses)
                enum:
                  - ACTIVE
                  - INACTIVE
              state:
                type: string
                format: string
                nullable: true
                description: >-
                  Client specific Account State (available items will be agreed during Client onboarding if applicable)
              meta:
                $ref: '#/components/schemas/metaEntity'
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              dates:
                $ref: '#/components/schemas/datesEntity'
              amount:
                type: integer
                format: int32
                description: Account Initial Balance; if applicable for an Account Type
              balances:
                $ref: '#/components/schemas/accountBalancesEntity'
              location:
                $ref: '#/components/schemas/locationEntity'
              overrides:
                $ref: '#/components/schemas/accountOverridesEntity'

    createAccountTransactionsPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required: [operations]
            properties:
              operations:
                type: array
                nullable: false
                minItems: 1
                uniqueItems: true
                items:
                  type: object
                  properties:
                    walletId:
                      type: string
                      format: string
                      description: EES AIR Wallet ID
                    accountId:
                      type: string
                      format: string
                      description: EES AIR Wallet Account ID
                    operationType:
                      type: string
                      description: Operation Type
                      enum:
                        - redeem
                        - credit
                        - debit
                        - earn
                        - spend
                        - stamp
                    amount:
                      type: integer
                      format: int32
                      description: Operation Amount
              location:
                $ref: '#/components/schemas/locationEntity'
              options:
                type: object
                description: details TBC
                nullable: true

    unlockAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    redeemAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    unredeemAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
            properties:
              accountTransactionId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account Transaction ID to be Unredeemed
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    voidAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            properties:
              accountTransactionId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account Transaction ID to be Unredeemed
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    refundAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
            properties:
              accountTransactionId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account Transaction ID to be Unredeemed
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    activateAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    loadAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              location:
                $ref: '#/components/schemas/locationEntity'
              autoActivateOnLoad:
                type: boolean
                default: false
                description: >-
                  Optional Flag allowing to instruct AIR to perform an Activate on successful load

    verifyAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            type: object
            required: [location]
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              lock:
                type: boolean
                default: false
                nullable: false
                description: >-
                  Optional boolean flag, allowing the calling application to instruct AIR to lock verified Account
              location:
                $ref: '#/components/schemas/locationEntity'

    debitAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
            type: object
            description: >-
              Please note&#58; `amount` and `balances` Request's attributes are mutually exclusive (`balance` attribute allows to deduct different amounts from a specified balance)
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              amount:
                type: integer
                format: int32
                nullable: false
                description: >-
                  Debit Amount denominated to a currency smallest unit (e.g. for USD this value should be in cents)
              balances:
                $ref: '#/components/schemas/accountBalancesEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    creditAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
            type: object
            description: >-
              Please note&#58; `amount` and `balances` Request's attributes are mutually exclusive (`balance` attribute allows to credit different amounts to a specified balance)
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              amount:
                type: integer
                format: int32
                nullable: false
                description: >-
                  Credit Amount denominated to a currency smallest unit (e.g. for USD this value should be in cents)
              balances:
                $ref: '#/components/schemas/accountBalancesEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    earnAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
            type: object
            description: >-
              Please note&#58; `amount` and `balances` Request's attributes are mutually exclusive (`balance` attribute allows to earn different amounts to a specified balance)
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              amount:
                type: integer
                format: int32
                nullable: false
                description: >-
                  Earn Amount denominated to a currency smallest unit (e.g. for USD this value should be in cents)
              balances:
                $ref: '#/components/schemas/accountBalancesEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    spendAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
            type: object
            description: >-
              Please note&#58; `amount` and `balances` Request's attributes are mutually exclusive (`balance` attribute allows to spend different amounts from a specified balance)
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              amount:
                type: integer
                format: int32
                nullable: false
                description: >-
                  Spend Amount denominated to a currency smallest unit (e.g. for USD this value should be in cents)
              balances:
                $ref: '#/components/schemas/accountBalancesEntity'
              location:
                $ref: '#/components/schemas/locationEntity'

    stampAccountPayload:
      description: JSON Payload
      required: true
      content:
        application/json:
          schema:
            required:
              - location
            type: object
            properties:
              token:
                type: string
                format: string
                nullable: false
                description: Token identifying an EES AIR Account
              accountId:
                type: string
                format: string
                nullable: false
                description: EES AIR Account ID
              walletId:
                type: string
                format: string
                nullable: false
                description: >-
                  Wallet ID, if this optional attribute is provided EES AIR will perform an additional sanity check if requested accountId belongs to a specified Wallet
              pin:
                type: string
                format: string
                nullable: false
                description: Optional Token' PIN
              transactionDetails:
                $ref: '#/components/schemas/metaEntity'
              amount:
                type: integer
                format: int32
                nullable: false
                description: >-
                  Stamp Amount
              location:
                $ref: '#/components/schemas/locationEntity'

  parameters:
    reference:
      name: reference
      in: query
      required: true
      description: The reference of the Wallet Transaction to return.
      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

    eesDateTimeOverride:
      name: X-POSCONNECT-TRANSACTION-DATETIME
      in: header
      required: false
      description: >-
        The ability to specify the date and time that should be used to adjudicate. This can be used to create transactions for past events, whilst ensuring the consumer receives the rewards that they were eligible for at that time.
        This functionality is only available for events less than 6 months in the past. 
        Please note requested transaction date-time has to 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

    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
        default: ''''''
        enum:
          - ''''''
          - '''gzip'''
          - '''deflate'''
          - '''gzip,deflate'''
          - '''deflate,gzip'''
      allowEmptyValue: true
    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
        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
        enum:
          - PUT
          - PATCH
          - DELETE
          - HEAD
          - OPTIONS
          - CONNECT
          - TRACE
      allowEmptyValue: false
    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
        enum:
          - keep-alive
          - close
        default: close
    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
        enum:
          - keep-alive
          - close
        default: close
    eesAuthenticationClientId:
      name: X-EES-AUTH-CLIENT-ID
      in: header
      description: >-
        Client ID, provided by EES during on-boarding. Please note&#58; the authentication mechanic requires the receipt of the full payload so any headers that would chunk the request up, such as `transfer-encoding: chunked` could potentially cause authentication failures.
      required: true
      schema:
        type: string
        format: string
    eesAuthenticationRequestHash:
      name: X-EES-AUTH-HASH
      in: header
      description: >-
        Request Authentication Hash, calculated by concatenating Request URI
        Path with API prefix, Request Query String(s) if applicable, Request
        Payload if applicable and Client Secret. Please note&#58; the authentication mechanic requires the receipt of the full payload so any headers that would chunk the request up, such as `transfer-encoding: chunked` could potentially cause authentication failures.
      required: true
      schema:
        type: string
        format: string
    eesMessageId:
      name: X-EES-TRANSACTION-ID
      in: header
      description: >-
        Optional Unique Reference for the API Request (Transaction) within the
        calling company
      required: false
      schema:
        type: string
        format: string
    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
  responses:

    verifyAccountResponsePayload:
      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/verifyAccountResponse'

    activateAccountResponsePayload:
      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/activateAccountResponse'

    loadAccountResponsePayload:
      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/loadAccountResponse'

    redeemAccountResponsePayload:
      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/redeemAccountResponse'

    unredeemAccountResponsePayload:
      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/unredeemAccountResponse'

    voidAccountResponsePayload:
      description: EES AIR has successfully processed a Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voidAccountResponse'

    refundAccountResponsePayload:
      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/refundAccountResponse'

    debitAccountResponsePayload:
      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/debitAccountResponse'

    creditAccountResponsePayload:
      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/creditAccountResponse'

    earnAccountResponsePayload:
      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/earnAccountResponse'


    stampAccountResponsePayload:
      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/stampAccountResponse'

    lockAccountResponsePayload:
      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/lockAccountResponse'

    createAccountResponsePayload:
      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/createAccountResponse'

    createAccounts207ResponsePayload:
      description: >-
        EES AIR was able to process partially this Request, due to some errors. Special Response structure will contain all available details
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/createAccounts207Response'

    createAccountTransactionsResponsePayload:
      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/createAccountTransactionsResponse'

    spendAccountResponsePayload:
      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/spendAccountResponse'

    unlockAccountResponsePayload:
      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/unlockAccountResponse'

    200settleResponsePayload:
      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/tiersEnabledWalletAndAccountTransactionResponse'

    207settleResponsePayload:
      description: EES AIR has processed a partially successful Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/tiersEnabledWalletAndAccountTransactionResponse'

    200productExchangeResponsePayload:
      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/productExchangeResponse'

    207productExchangeResponsePayload:
      description: EES AIR has processed a partially successful Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/productExchangeResponse'

    200refundResponsePayload:
      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/tiersEnabledWalletAndAccountTransactionResponse'

    207refundResponsePayload:
      description: EES AIR has processed a partially successful Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/tiersEnabledWalletAndAccountTransactionResponse'

    200replayResponsePayload:
      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/walletAndAccountTransactionResponse'

    207replayResponsePayload:
      description: EES AIR has processed a partially successful Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/walletAndAccountTransactionResponse'

    200fulfilResponsePayload:
      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/fulfilResponse'

    207fulfilResponsePayload:
      description: EES AIR has processed a partially successful Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/fulfilResponse'

    200activateWalletResponsePayload:
      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/activateWalletResponse'

    207activateWalletResponsePayload:
      description: EES AIR has processed a partially successful Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/activateWalletResponse'

    200openWalletResponsePayload:
      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/openWalletResponse'


    207openWalletResponsePayload:
      description: EES AIR has processed a partially successful Request
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/openWalletResponse'

    spendCalculateResponsePayload:
      description: Response payload from calling the spend calculate endpoint
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/spendCalculateResponse'

    200spendResponsePayload:
      description: Response payload from calling the spend endpoint
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/walletAndAccountTransactionResponse'

    207spendResponsePayload:
      description: Partially successful response payload from calling the spend endpoint
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/walletAndAccountTransactionResponse'

    200spendVoidResponsePayload:
      description: Response payload from calling the spend void endpoint
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/walletAndAccountTransactionResponse'

    207spendVoidResponsePayload:
      description: Partially successful response payload from calling the spend void endpoint
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/walletAndAccountTransactionResponse'

    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 is
        unprocessable, etc)
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'

    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'
    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'

    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'

    error409Response:
      description: >-
        EES AIR understands this request, but refuses 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'

    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'

    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'

    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'

    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'

    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'

    defaultErrorResponse:
      description: Default Error Response
      headers:
        X-EES-TRANSACTION-ID-RESULT:
          $ref: '#/components/headers/uniquenessCheckResult'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
  #    errorSuppressedRestEntity:
  #      description: aaaaa
  #      content:
  #        application/json:
  #          schema:
  #            type: object
  #            properties:
  #              errorCode:
  #                type: string
  #                format: string
  #                description: EES AIR Error Code
  #              errorMessage:
  #                type: string
  #                format: string
  #                description: Human Friendly Error Message

  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
        enum:
          - keep-alive
          - close
        default: close

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

security:
  - eesAuthClientId: []
    eesAuthHash: []
