x-explorer-enabled: false
openapi: 3.0.3
servers:
  - url: 'https://wallet.uk.eagleeye.com/2.0'
    description: UK Production
info:
  title: Wallet API
  description: >-
    These API's are used for the interaction with the Eagle Eye AIR platform
    when using Wallets. A Wallet is a data container that links multiple other
    data objects. Wallets are typically accessed through the walletId which is
    obtained by calling application by looking up from an identity. Each wallet
    can have one or many identities.<br/><br/>For the avoidance of doubt this
    specification documents error codes thrown by the application it, does not
    cover error codes such as 429 to many requests, 503 service unavailable or
    504 Gateway timeout.<br/><br/>The API supports standard Keep Alive as passed
    in through the Connection header (as supported by Google Cloud) and
    compression through the Accept-Encoding header is supported (gzip and
    deflate). Other standard HTTP headers maybe supported but not explicitly
    documented here.<br/><br/>This API is secured by Eagle Eye's standard
    security mechanic which is a client-id and hash where the hash is generated
    during the request. All API requests require the X-EES-AUTH-CLIENT-ID and
    X-EES-AUTH-HASH headers to be correct and valid (for more details see the
    authorise section) and as such are not directly specified per API definition
    below. <br/><br/>There are some additional headers supported by the system
    which are available on all API requests so documented in the table below to
    keep the specification cleaner<table><th
    width=25%>Header</th><th>Description</th></tr><tr><td>X-EES-TRANSACTION-ID</td><td>Unique
    Reference for the API transaction within the calling
    company</td></tr><tr><td>X-CUSTOM-SUBSYSTEM-ID</td><td>Optional header
    provided by the calling application for EES AIR to identify what was the
    external Subsystem that made the request, this is passed through in the
    atomic events and used for clients for their own
    purposes</td></tr><tr><td>X-CUSTOM-KEY</td><td>Optional header(s) provided
    by the calling application to EES AIR. Please note this header name has to
    follow pattern X-CUSTOM-* and is passed through to the atomic events for
    clients own purposes</td></tr></table>
  version: 2.162.0
  contact:
    name: Eagle Eye Solutions
    url: 'https://www.eagleeye.com/'
tags:
  - name: Wallets
    description: >-
      API endpoints exposed in this file allow for the interaction with and
      management of Wallets and their contents
  - name: Identities
    description: API endpoints for interacting with identity objects.
  - name: Accounts
    description: API endpoints for interacting with account objects.
  - name: Account Transactions
    description: API endpoints for interacting with account transaction objects.
  - name: Consumers
    description: API endpoints for interacting with the consumer objects.
  - name: Relationships
    description: API endpoints for managing the relationships between wallets.
  - name: Transactions
    description: API endpoints to interacting with transaction objects.
  - name: Invites
    description: API endpoints for interacting with invite objects.
  - name: Recommendations
    description: API endpoints for interacting with recommendations objects.
  - name: Links
    description: API endpoints for interacting with links objects.
  - name: Statistics
    description: >-
      API endpoints to retrieve statistics of the wallet. Statistics are client
      specific.
  - name: Services
    description: >-
      Service end points to perform business logic and can interact with
      multiple data objects.
  - name: Audiences
    description: API endpoints for interacting with audiences objects.
paths:
  /wallet:
    get:
      summary: Get by Identity
      operationId: getWalletByIdentityValue
      description: >-
        This API method allows the calling application to retrieve a Wallet's
        details for a specific identity.
      tags:
        - Wallets
      parameters:
        - name: identity-value
          in: query
          required: true
          description: Value of the Wallet Identity
          schema:
            type: string
            format: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletEntity'
            request:
              examples:
                response:
                  value:
                    Connection: keep-alive
                    Accept-Encoding: 'gzip,deflate'
                    X-EES-TRANSACTION-ID: external-system-unique-reference-1123
                    X-CUSTOM-SUBSYSTEM-ID: CRM
                    identity-value: john.doe@domain.org
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '10663859'
                      friendlyName: John's Wallet
                      status: ACTIVE
                      type: CONSUMER
                      state: EARNBURN
                      relationships:
                        parent: []
                        child:
                          - '10663858'
                        associate: []
                      meta:
                        key1: Value1
                      dateCreated: '2017-01-03T16:25:58+00:00'
                      lastUpdated: '2017-01-03T16:25:58+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    post:
      summary: Create
      operationId: createWallet
      description: >-
        This method allows the calling application to create a Wallet within the
        Eagle Eye Platform.
      tags:
        - Wallets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletCreatePayload'
        description: JSON payload
        required: true
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.CREATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletEntity'
            request:
              examples:
                response:
                  value:
                    X-EES-TRANSACTION-ID: external-system-unique-reference-1124
                    X-CUSTOM-SUBSYSTEM-ID: CRM
                    body:
                      type: CONSUMER
                      status: ACTIVE
                      state: EARNBURN
                      friendlyName: Susan's Wallet
                      meta:
                        key2: Value2
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '1066'
                      friendlyName: Susan's Wallet
                      status: ACTIVE
                      type: CONSUMER
                      state: EARNBURN
                      relationships:
                        parent: []
                        child: []
                        associate: []
                      meta:
                        key2: Value2
                      dateCreated: '2017-01-03T16:25:58+00:00'
                      lastUpdated: '2017-01-03T16:25:58+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}:
    get:
      summary: Get by Id
      operationId: getWalletByWalletId
      description: >-
        This API method allows the calling application to retrieve a Wallet's
        details by Id.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      tags:
        - Wallets
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 1066
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '1066'
                      friendlyName: Susan's Wallet
                      status: ACTIVE
                      type: CONSUMER
                      state: EARNBURN
                      relationships:
                        parent: []
                        child: []
                        associate: []
                      meta:
                        key2: Value2
                      dateCreated: '2017-01-03T16:25:58+00:00'
                      lastUpdated: '2017-01-03T16:25:58+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    patch:
      summary: Update
      operationId: updateWalletMainProperties
      description: >-
        This API method allows the calling application to amend wallet
        properties.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletPatchPayload'
        description: JSON payload
        required: true
      tags:
        - Wallets
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletEntity'
                  - type: object
                    example:
                      walletId: '1066'
                      friendlyName: Susan's new Wallet
                      status: ACTIVE
                      type: CONSUMER
                      state: EARNBURN
                      relationships:
                        parent: []
                        child: []
                        associate: []
                        donor: []
                      meta:
                        key2: Value2
                      dateCreated: '2017-01-03T16:25:58+00:00'
                      lastUpdated: '2017-01-08T13:45:55+00:00'
            request:
              examples:
                response:
                  value:
                    walletId: 1066
                    body:
                      friendlyName: Susan's new Wallet
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '1066'
                      friendlyName: Susan's new Wallet
                      status: ACTIVE
                      type: CONSUMER
                      state: EARNBURN
                      relationships:
                        parent: []
                        child: []
                        associate: []
                      meta:
                        key2: Value2
                      dateCreated: '2017-01-03T16:25:58+00:00'
                      lastUpdated: '2017-01-08T13:45:55+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    delete:
      summary: Delete
      operationId: deleteWallet
      description: >-
        This API method allows the calling application to delete a Wallet (soft
        deletion)
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      tags:
        - Wallets
      responses:
        '204':
          description: No Content
          x-eventNotifications:
            events:
              - eventName: WALLET.DELETE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: DELETE
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/stats:
    get:
      summary: Get
      operationId: getWalletStats
      description: >-
        This API method allows the calling application to retrieve a Wallet's
        stats. Please note set of Statistics should be agreed during Client's
        onboarding and documented elsewhere.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirDateFrom'
        - $ref: '#/components/parameters/eesAirDateTo'
      tags:
        - Wallets
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: key-value pairs
            request:
              examples:
                response:
                  value:
                    walletId: 1066
                    dateFrom: '2019-07-01'
                    dateTo: '2019-07-02'
            response:
              examples:
                response:
                  value:
                    payload:
                      wallet.transactionType.donate: 37
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/activate:
    patch:
      summary: Activate
      operationId: activateWallet
      description: This API method allows the calling application to activate a wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      tags:
        - Wallets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 10646
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: EARNBURN
                      relationships:
                        parent: []
                        child: []
                        associate: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T09:10:11+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/suspend:
    patch:
      summary: Suspend
      operationId: suspendWallet
      description: This API method allows the calling application to suspend a wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      tags:
        - Wallets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletEntity'
                  - type: object
                    example:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: SUSPENDED
                      type: CONSUMER
                      state: EARNBURN
                      relationships:
                        parent: []
                        child: []
                        associate: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T11:11:12+00:00'
            request:
              examples:
                response:
                  value:
                    walletId: 10646
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: SUSPENDED
                      type: CONSUMER
                      state: EARNBURN
                      relationships:
                        parent: []
                        child: []
                        associate: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T11:11:12+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/terminate:
    patch:
      summary: Terminate a Wallet
      operationId: terminateWallet
      description: This API method allows the calling application to Terminate a wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      tags:
        - Wallets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletEntity'
                  - type: object
                    example:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: TERMINATED
                      type: CONSUMER
                      state: EARNBURN
                      relationships:
                        parent: []
                        child: []
                        associate: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T11:11:12+00:00'
            request:
              examples:
                response:
                  value:
                    walletId: 10646
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: TERMINATED
                      type: CONSUMER
                      state: EARNBURN
                      relationships:
                        parent: []
                        child: []
                        associate: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T11:11:12+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/state:
    patch:
      summary: Update State
      operationId: updateWalletState
      description: >-
        This API method allows the calling application to change a state of a
        Wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/statePatchPayload'
        description: JSON Payload
        required: true
      tags:
        - Wallets
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 10646
                    body:
                      state: OTHER_STATE
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: OTHER_STATE
                      relationships:
                        parent: []
                        child: []
                        associate: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T11:11:12+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/join/{relationshipWalletId}/child:
    patch:
      summary: Create Child
      operationId: createWalletChildRelation
      description: >-
        This API method allows the calling application to set up a child
        relationship between the wallets, Wallet {walletId} will become a child
        of the Wallet {relationshipWalletId}
      tags:
        - Relationships
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirRelationshipWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.RELATION
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: Parent Wallet Entity
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: Child Wallet Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 10646
                    relationshipWalletId: 777
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: OTHER_STATE
                      relationships:
                        parent: []
                        child:
                          - '777'
                        associate: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T11:11:12+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/join/{relationshipWalletId}/associate:
    patch:
      summary: Create Associate
      operationId: createWalletAssociateRelation
      description: >-
        This API method allows the calling application to set up an associate
        relationship between the wallets, Wallet {walletId} will become an
        associate of of the Wallet {relationshipWalletId}
      tags:
        - Relationships
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirRelationshipWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.RELATION
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: walletId Entity
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: relationshipWalletId Entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletEntity'
                  - type: object
                    example:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: OTHER_STATE
                      relationships:
                        parent: []
                        child:
                          - '777'
                        associate:
                          - '888'
                        donor: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T12:31:42+00:00'
            request:
              examples:
                response:
                  value:
                    walletId: 10646
                    relationshipWalletId: 888
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: OTHER_STATE
                      relationships:
                        parent: []
                        child:
                          - '777'
                        associate:
                          - '888'
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T12:31:42+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/join/{recipientWalletId}/donor:
    patch:
      summary: Create Donor
      operationId: createWalletDonorRelation
      description: >-
        This API method allows the calling application to set up a donor
        relationship between two wallets, Wallet identified by the {walletId}
        will become a donor for a Wallet identified by {recipientWalletId}.
        Please note&#58; relationship of type `donor` is a
        `one-way-relationship` (it will only show-up when examine a donor
        wallet)
      tags:
        - Relationships
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirRecipientWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.RELATION
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: walletId Entity
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: relationshipWalletId Entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletEntity'
                  - type: object
                    example:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: OTHER_STATE
                      relationships:
                        parent: []
                        child:
                          - '777'
                        associate:
                          - '888'
                        donor: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T12:31:42+00:00'
            request:
              examples:
                response:
                  value:
                    walletId: 10646
                    relationshipWalletId: 888
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: OTHER_STATE
                      relationships:
                        parent: []
                        child:
                          - '777'
                        associate:
                          - '888'
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T12:31:42+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/split/{relationshipWalletId}:
    patch:
      summary: Remove
      operationId: splitWalletRelation
      description: >-
        This API method allows the calling application to remove any
        relationship between two wallets. Please note that only child, associate
        and donor relations could be removed, if you want to remove parent
        relationship replace values {walletId} and {relationshipWalletId} and
        relationship type will be child.
      tags:
        - Relationships
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirRelationshipWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.RELATION
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: walletId Entity
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: relationshipWalletId Entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletEntity'
                  - type: object
                    example:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: OTHER_STATE
                      relationships:
                        parent: []
                        child: []
                        associate:
                          - '888'
                        donor: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T17:24:25+00:00'
            request:
              examples:
                response:
                  value:
                    walletId: 10646
                    relationshipWalletId: 777
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: OTHER_STATE
                      relationships:
                        parent: []
                        child: []
                        associate:
                          - '888'
                        donor: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T17:24:25+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/move/from/{oldRelationshipWalletId}/to/{newRelationshipWalletId}:
    patch:
      summary: Move
      operationId: moveWalletRelations
      description: >-
        This API method allows the calling application to move any
        relationship(s) from a Wallet, identified by {oldRelationshipWalletId}
        into another Wallet, identified by {newRelationshipWalletId}. Please
        note that only child, associate and donor relations could be moved.
      tags:
        - Relationships
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - name: oldRelationshipWalletId
          in: path
          required: true
          description: EES AIR Wallet ID
          schema:
            type: string
            format: string
        - name: newRelationshipWalletId
          in: path
          required: true
          description: EES AIR Wallet ID
          schema:
            type: string
            format: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.RELATION
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: oldRelationshipWalletId Entity
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: walletId Entity
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: newRelationshipWalletId Entity
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletEntity'
                  - type: object
                    example:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: OTHER_STATE
                      relationships:
                        parent: []
                        child: []
                        associate:
                          - '897'
                        donor: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T18:13:14+00:00'
            request:
              examples:
                response:
                  value:
                    walletId: 10646
                    oldRelationshipWalletId: 888
                    newRelationshipWalletId: 897
            response:
              examples:
                response:
                  value:
                    payload:
                      walletId: '10646'
                      friendlyName: Wallet Friendly Name
                      status: ACTIVE
                      type: CONSUMER
                      state: OTHER_STATE
                      relationships:
                        parent: []
                        child: []
                        associate:
                          - '897'
                        donor: []
                      meta:
                        key3: Value3
                      dateCreated: '2017-01-11T16:25:58+00:00'
                      lastUpdated: '2017-01-13T18:13:14+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/bank/pointsreward/links:
    get:
      summary: Get
      operationId: getWalletBankRewardLinks
      description: >-
        This API method allows the calling application to retrieve a list of
        links between a requested Wallet, identified by a Wallet ID, and a
        `PRIVATE` Reward Banks (of type Points Reward). Optionally this endpoint
        would perform a result filtering, if an appropriate query strings
        parameters are passed in.
      tags:
        - Links
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - name: status
          in: query
          required: false
          description: '[Optional] Filter by Link STATUS'
          schema:
            type: string
            format: string
        - name: state
          in: query
          required: false
          description: '[Optional] Filter by Link STATE'
          schema:
            type: string
            format: string
        - name: validFrom
          in: query
          required: false
          description: >-
            [Optional] Filter by Link Valid From (please note this value should
            be in ATOM format)
          schema:
            type: string
            format: string
        - name: validTo
          in: query
          required: false
          description: >-
            [Optional] Filter by Link Valid To (please note this value should be
            in ATOM format)
          schema:
            type: string
            format: string
        - $ref: '#/components/parameters/eesClientTransactionTime'
        - name: 'orderBy[]'
          in: query
          required: false
          description: >-
            [Optional] Query string for controlling Paginated Results Sorting Order. Please
            note this query string needs to be constructed from field name +
            comma sign and sorting order (ASC/DESC). Currently AIR supports
            sorting by keys: `pointsRewardBankWalletLinkId`, `walletId`,`validFrom`, `validTo`, `dateCreated`,`lastUpdated`,`pointsRewardBankId`, `pointsRewardBankRewardId`,`status`,`state`
          schema:
            type: string
            format: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    required:
                      - offset
                      - limit
                      - orderBy
                      - total
                      - results
                    properties:
                      offset:
                        type: integer
                        format: int32
                        description: Pagination Offset
                        default: 0
                      limit:
                        type: integer
                        format: int32
                        description: Pagination Limit
                        default: 100
                      orderBy:
                        type: array
                        items:
                          type: object
                          required:
                            - name
                            - order
                          properties:
                            name:
                              type: string
                              format: string
                              description: Sort by column
                            order:
                              type: string
                              description: Sorting order
                              enum:
                                - ASC
                                - DESC
                      total:
                        type: integer
                        format: int32
                        description: Result set count
                      results:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/pointsrewardBankWalletLinkEntity
                example:
                  offset: 0
                  limit: 100
                  orderBy:
                    - name: pointsRewardBankWalletLinkId
                      order: ASC
                  total: 6
                  results:
                    - pointsRewardBankWalletLinkId: '116'
                      walletId: '155345'
                      pointsRewardBankId: '6855'
                      pointsRewardBankRewardId: '5077'
                      status: ACTIVE
                      state: BASIC
                      type: DEFAULT_LINK_TYPE
                      validFrom: '2020-03-19T00:00:00+00:00'
                      validTo: '2020-04-19T00:00:00+01:00'
                      dateCreated: '2020-03-30T14:23:25+01:00'
                      lastUpdated: '2020-03-30T14:23:25+01:00'
                    - pointsRewardBankWalletLinkId: '117'
                      walletId: '155345'
                      pointsRewardBankId: '6855'
                      pointsRewardBankRewardId: '5077'
                      status: ACTIVE
                      state: BASIC
                      type: DEFAULT_LINK_TYPE
                      validFrom: '2020-03-19T00:00:00+00:00'
                      validTo: '2020-04-19T00:00:00+01:00'
                      dateCreated: '2020-03-30T14:29:26+01:00'
                      lastUpdated: '2020-03-30T14:29:26+01:00'
                    - pointsRewardBankWalletLinkId: '118'
                      walletId: '155345'
                      pointsRewardBankId: '6855'
                      pointsRewardBankRewardId: '5077'
                      status: ACTIVE
                      state: BASIC
                      type: DEFAULT_LINK_TYPE
                      validFrom: '2020-03-19T00:00:00+00:00'
                      validTo: '2020-04-19T00:00:00+01:00'
                      dateCreated: '2020-03-30T14:31:26+01:00'
                      lastUpdated: '2020-03-30T14:31:26+01:00'
                    - pointsRewardBankWalletLinkId: '758'
                      walletId: '155345'
                      pointsRewardBankId: '6855'
                      pointsRewardBankRewardId: '5077'
                      status: ACTIVE
                      state: BASIC
                      type: DEFAULT_LINK_TYPE
                      validFrom: '2020-03-19T00:00:00+00:00'
                      validTo: '2020-04-19T00:00:00+01:00'
                      dateCreated: '2020-04-08T10:56:40+01:00'
                      lastUpdated: '2020-04-08T10:56:40+01:00'
                    - pointsRewardBankWalletLinkId: '759'
                      walletId: '155345'
                      pointsRewardBankId: '6855'
                      pointsRewardBankRewardId: '5077'
                      status: ACTIVE
                      state: BASIC
                      type: DEFAULT_LINK_TYPE
                      validFrom: '2020-03-19T00:00:00+00:00'
                      validTo: '2020-04-19T00:00:00+01:00'
                      dateCreated: '2020-04-08T10:58:06+01:00'
                      lastUpdated: '2020-04-08T10:58:06+01:00'
                    - pointsRewardBankWalletLinkId: '760'
                      walletId: '155345'
                      pointsRewardBankId: '6855'
                      pointsRewardBankRewardId: '5077'
                      status: ACTIVE
                      state: BASIC
                      type: DEFAULT_LINK_TYPE
                      validFrom: '2020-03-19T00:00:00+00:00'
                      validTo: '2020-04-19T00:00:00+01:00'
                      dateCreated: '2020-04-08T11:23:31+01:00'
                      lastUpdated: '2020-04-08T11:23:31+01:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/bank/pointsreward/links/available:
    get:
      summary: Get
      operationId: getWalletBankRewardLinksAvailable
      description: >-
        This API method allows the calling application to retrieve a list of
        links between a requested Wallet, identified by a Wallet ID, and a
        `PRIVATE` Reward Bank (of type Points Reward). The links returned will
        be filtered with a `status` of either `ACTIVE` or `EXPIRED`
      tags:
        - Links
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - name: state
          in: query
          required: false
          description: '[Optional] Filter by Link STATE'
          schema:
            type: string
            format: string
        - $ref: '#/components/parameters/eesClientTransactionTime'
        - name: 'orderBy[]'
          in: query
          required: false
          description: >-
            [Optional] Query string for controlling Paginated Results Sorting Order. Please
            note this query string needs to be constructed from field name +
            comma sign and sorting order (ASC/DESC). Currently AIR supports
            sorting by keys: `walletId`,`pointsRewardBankId`, `pointsRewardBankRewardId`,`state`
          schema:
            type: string
            format: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    required:
                      - offset
                      - limit
                      - orderBy
                      - total
                      - results
                    properties:
                      offset:
                        type: integer
                        format: int32
                        description: Pagination Offset
                        default: 0
                      limit:
                        type: integer
                        format: int32
                        description: Pagination Limit
                        default: 100
                      orderBy:
                        type: array
                        items:
                          type: object
                          required:
                            - name
                            - order
                          properties:
                            name:
                              type: string
                              format: string
                              description: Sort by column
                            order:
                              type: string
                              description: Sorting order
                              enum:
                                - ASC
                                - DESC
                      total:
                        type: integer
                        format: int32
                        description: Result set count
                      results:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/pointsrewardBankWalletLinkEntity
                example:
                  offset: 0
                  limit: 100
                  orderBy:
                    - name: pointsRewardBankWalletLinkId
                      order: ASC
                  total: 2
                  results:
                    - pointsRewardBankWalletLinkId: '116'
                      walletId: '155345'
                      pointsRewardBankId: '6855'
                      pointsRewardBankRewardId: '5077'
                      status: ACTIVE
                      state: BASIC
                      type: DEFAULT_LINK_TYPE
                      validFrom: '2020-03-19T00:00:00+00:00'
                      validTo: '2020-04-19T00:00:00+01:00'
                      dateCreated: '2020-03-30T14:23:25+01:00'
                      lastUpdated: '2020-03-30T14:23:25+01:00'
                    - pointsRewardBankWalletLinkId: '117'
                      walletId: '155345'
                      pointsRewardBankId: '6855'
                      pointsRewardBankRewardId: '5077'
                      status: ACTIVE
                      state: BASIC
                      type: DEFAULT_LINK_TYPE
                      validFrom: '2020-03-19T00:00:00+00:00'
                      validTo: '2020-04-19T00:00:00+01:00'
                      dateCreated: '2020-03-30T14:29:26+01:00'
                      lastUpdated: '2020-03-30T14:29:26+01:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/link/bank/pointsreward/{pointsRewardBankId}:
    post:
      summary: Create
      operationId: createWalletBankRewardLink
      description: >-
        This API method allows the calling application to create a link between
        a requested Wallet, identified by a Wallet ID, and a requested `PRIVATE`
        Reward Bank (of type Points Reward).
      tags:
        - Links
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - name: pointsRewardBankId
          in: path
          required: true
          description: EES AIR Bank Reward ID
          schema:
            type: string
            format: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createRewardBankWalletLinkPayload'
        description: JSON Payload
        required: true
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: POINTSREWARD.BANK.WALLET.LINK.CREATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/pointsrewardBankWalletLinkEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pointsrewardBankWalletLinkEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    delete:
      summary: Delete
      operationId: deleteWalletBankRewardLink
      description: >-
        This API method allows the calling application to remove a link between
        a requested Wallet, identified by a Wallet ID, and a requested `PRIVATE`
        Reward Bank (of type Points Reward).
      tags:
        - Links
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - name: pointsRewardBankId
          in: path
          required: true
          description: EES AIR Bank Reward ID
          schema:
            type: string
            format: string
      responses:
        '204':
          description: No Content
          x-eventNotifications:
            events:
              - eventName: POINTSREWARD.BANK.WALLET.LINK.DELETE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/pointsrewardBankWalletLinkEntity'
                    operationType: DELETE
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/link/bank/pointsreward/link/{pointsRewardBankWalletLinkId}:
    patch:
      summary: Update
      operationId: amendWalletBankRewardLink
      description: >-
        This API method allows the calling application to amend a link between a
        requested Wallet, identified by a Wallet ID, and a `PRIVATE` Reward Bank
        (of type Points Reward).
      tags:
        - Links
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - name: pointsRewardBankWalletLinkId
          in: path
          required: true
          description: EES AIR Bank Reward Link ID
          schema:
            type: string
            format: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/amendRewardBankWalletLinkPayload'
        description: JSON Payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: POINTSREWARD.BANK.WALLET.LINK.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/pointsrewardBankWalletLinkEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pointsrewardBankWalletLinkEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    delete:
      summary: Delete by Linked Wallet Id
      operationId: deleteWalletBankRewardLink2
      description: >-
        This API method allows the calling application to remove a link between
        a requested Wallet, identified by a Wallet ID, and a `PRIVATE` Reward
        Bank (of type Points Reward).
      tags:
        - Links
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - name: pointsRewardBankWalletLinkId
          in: path
          required: true
          description: EES AIR Bank Reward Link ID
          schema:
            type: string
            format: string
      responses:
        '204':
          description: No Content
          x-eventNotifications:
            events:
              - eventName: POINTSREWARD.BANK.WALLET.LINK.DELETE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/pointsrewardBankWalletLinkEntity'
                    operationType: DELETE
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/invite:
    get:
      summary: Get
      operationId: getWalletInvite
      description: >-
        This API method allows the calling application to retrieve the Wallet
        Invite details by the Wallet Invitation GUID.
      tags:
        - Invites
      parameters:
        - $ref: '#/components/parameters/eesAirWalletInvitationGuidRequired'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInviteEntity'
            request:
              examples:
                response:
                  value:
                    guid: ZER2FTTMr8Gp4yx1J6xJrUnqK9yOQSxd
            response:
              examples:
                response:
                  value:
                    payload:
                      walletInviteId: '1439'
                      walletId: '75782'
                      type: INVITE
                      guid: ZER2FTTMr8Gp4yx1J6xJrUnqK9yOQSxd
                      description: Invitation Description
                      meta:
                        key1: meta key1
                        key2: meta key2
                      status: ACTIVE
                      validFrom: '2017-01-17T13:18:40+00:00'
                      validTo: '2018-11-17T00:00:00+00:00'
                      dateCreated: '2017-01-17T13:18:40+00:00'
                      lastUpdated: '2017-01-17T13:18:40+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/invites:
    get:
      summary: Get by Wallet Id
      operationId: getWalletInvitesByWalletId
      description: >-
        This API method allows the calling application to retrieve the list of
        Invites for a specific wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletInvitationGuid'
        - $ref: '#/components/parameters/eesAirWalletInvitationReference'
        - name: 'state[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Invite State(s). For single
            filtering value square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'status[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Invite Status(es). For single
            filtering value square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'type[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Invite Type(s). For single
            filtering value square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'unitId[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by supplied Unit.
          schema:
            type: string
            format: string
        - name: dateCreated
          in: query
          description: Query string for Result filtering by date created
          required: false
          schema:
            type: string
        - name: lastUpdated
          in: query
          description: Query string for Result filtering by date last updated
          required: false
          schema:
            type: string
        - name: validFrom
          in: query
          description: Query string for Result filtering by valid from date
          required: false
          schema:
            type: string
        - name: validTo
          in: query
          description: Query string for Result filtering by valid to date
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Query string Pagination Limit
          schema:
            type: integer
            format: int32
            maximum: 100
            default: 20
        - name: offset
          in: query
          required: false
          description: Query string Pagination Offset
          schema:
            type: integer
            format: int32
            default: 0
      tags:
        - Invites
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInvitesEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75782
                    status: ACTIVE
                    type: INVITE
                    limit: 10
                    offset: 20
                    orderBy: 'lastUpdated,ASC'
            response:
              examples:
                response:
                  value:
                    payload:
                      limit: 10
                      total: 21
                      offset: 20
                      orderBy:
                        - name: lastUpdated
                          order: ASC
                      results:
                        - walletInviteId: '1439'
                          walletId: '75782'
                          type: INVITE
                          guid: ZER2FTTMr8Gp4yx1J6xJrUnqK9yOQSxd
                          description: Invitation Description
                          meta:
                            key1: meta key1
                            key2: meta key2
                          status: ACTIVE
                          validFrom: '2017-01-17T13:18:40+00:00'
                          validTo: '2018-11-17T00:00:00+00:00'
                          dateCreated: '2017-01-17T13:18:40+00:00'
                          lastUpdated: '2017-01-17T13:18:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/invites:
    get:
      summary: List
      operationId: getWalletInvites
      description: >-
        This API method allows the calling application to retrieve all invites
        using either the GUID or reference (or both).
      parameters:
        - $ref: '#/components/parameters/eesAirWalletInvitationGuid'
        - $ref: '#/components/parameters/eesAirWalletInvitationReference'
        - name: walletId
          in: query
          required: false
          description: >-
            Query string for Result filtering by Wallet Id
          schema:
            type: string
            format: string
        - name: 'state[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Invite State(s). For single
            filtering value square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'status[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Invite Status(es). For single
            filtering value square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'type[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Invite Type(s). For single
            filtering value square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'unitId[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by supplied Unit.
          schema:
            type: string
            format: string
        - name: dateCreated
          in: query
          description: Query string for Result filtering by date created
          required: false
          schema:
            type: string
        - name: lastUpdated
          in: query
          description: Query string for Result filtering by date last updated
          required: false
          schema:
            type: string
        - name: validFrom
          in: query
          description: Query string for Result filtering by valid from date
          required: false
          schema:
            type: string
        - name: validTo
          in: query
          description: Query string for Result filtering by valid to date
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Query string Pagination Limit
          schema:
            type: integer
            format: int32
            maximum: 100
            default: 20
        - name: offset
          in: query
          required: false
          description: Query string Pagination Offset
          schema:
            type: integer
            format: int32
            default: 0
      tags:
        - Invites
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInvitesEntity'
            request:
              examples:
                response:
                  value:
                    status: ACTIVE
                    limit: 1
                    offset: 207
                    orderBy: 'dateCreated,ASC'
            response:
              examples:
                response:
                  value:
                    payload:
                      limit: 1
                      total: 2111
                      offset: 207
                      orderBy:
                        - name: lastUpdated
                          order: ASC
                      filter:
                        status: ACTIVE
                      results:
                        - walletInviteId: '1439'
                          walletId: '75782'
                          type: INVITE
                          guid: ZER2FTTMr8Gp4yx1J6xJrUnqK9yOQSxd
                          description: Invitation Description
                          meta:
                            key1: meta key1
                            key2: meta key2
                          status: ACTIVE
                          validFrom: '2017-01-17T13:18:40+00:00'
                          validTo: '2018-11-17T00:00:00+00:00'
                          dateCreated: '2017-01-17T13:18:40+00:00'
                          lastUpdated: '2017-01-17T13:18:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/invite:
    post:
      summary: Create
      operationId: createWalletInvite
      description: >-
        This API method allows the calling application to create new Wallet
        Invite for a specific wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletInviteCreatePayload'
        description: JSON Payload
        required: true
      tags:
        - Invites
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.INVITE.CREATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletInviteEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInviteEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75782
                    body:
                      description: Invite for Sue
                      type: INVITE
                      validTo: '2018-11-17T00:00:00+00:00'
                      meta:
                        someKey: someValue
            response:
              examples:
                response:
                  value:
                    payload:
                      walletInviteId: '15300'
                      walletId: '75782'
                      type: INVITE
                      guid: ZER2FTTMr8Gp4yx1J6xJrUnqKeeff66g
                      description: Invite for Sue
                      meta:
                        someKey: someValue
                      status: ACTIVE
                      validFrom: '2017-01-18T13:18:40+00:00'
                      validTo: '2018-11-17T00:00:00+00:00'
                      dateCreated: '2017-01-18T13:18:40+00:00'
                      lastUpdated: '2017-01-18T13:18:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/invite/{walletInviteId}:
    get:
      summary: Get by Invite
      operationId: getWalletIdByInviteId
      description: >-
        This API method allows the calling application to retrieve specific
        Wallet Invite for a specific Wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletInvitationId'
      tags:
        - Invites
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInviteEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75782
                    walletInviteId: 15300
            response:
              examples:
                response:
                  value:
                    payload:
                      walletInviteId: '15300'
                      walletId: '75782'
                      type: INVITE
                      guid: ZER2FTTMr8Gp4yx1J6xJrUnqKeeff66g
                      description: Invite for Sue
                      meta:
                        someKey: someValue
                      status: ACTIVE
                      validFrom: '2017-01-18T13:18:40+00:00'
                      validTo: '2018-11-17T00:00:00+00:00'
                      dateCreated: '2017-01-18T13:18:40+00:00'
                      lastUpdated: '2017-01-18T13:18:40+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    patch:
      summary: Update
      operationId: updateWalletInvite
      description: >-
        This API method allows the calling application to update a Wallet Invite
        for a specific Wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletInvitationId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletInvitePatchPayload'
        description: JSON payload
        required: true
      tags:
        - Invites
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.INVITE.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletInviteEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInviteEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75782
                    walletInviteId: 15300
                    body:
                      description: Updated Invitation for Sue
                      reference: 'January 2017 Campaign #7'
                      validTo: '2017-02-19T00:00:00+00:00'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletInviteId: '15300'
                      walletId: '75782'
                      type: INVITE
                      guid: ZER2FTTMr8Gp4yx1J6xJrUnqKeeff66g
                      description: Updated Invitation for Sue
                      reference: 'January 2017 Campaign #7'
                      meta:
                        someKey: someValue
                      status: ACTIVE
                      validFrom: '2017-01-18T13:18:40+00:00'
                      validTo: '2017-02-19T00:00:00+00:00'
                      dateCreated: '2017-01-18T13:18:40+00:00'
                      lastUpdated: '2017-02-19T00:00:00+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/invite/verify:
    get:
      summary: Verify
      operationId: verifyWalletInvite
      description: >-
        This API method allows the calling application to verify an existing
        Wallet Invite identified by the Wallet Invitation GUID.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletInvitationGuidRequired'
      tags:
        - Invites
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.INVITE.VERIFY
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletInviteEntity'
                    operationType: READ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInviteEntity'
            request:
              examples:
                response:
                  value:
                    guid: ZER2FTTMr8Gp4yx1J6xJrUnqKeeff66g
            response:
              examples:
                response:
                  value:
                    payload:
                      walletInviteId: '15300'
                      walletId: '75782'
                      type: INVITE
                      guid: ZER2FTTMr8Gp4yx1J6xJrUnqKeeff66g
                      description: Updated Invitation for Sue
                      reference: 'January 2017 Campaign #7'
                      meta:
                        someKey: someValue
                      status: ACTIVE
                      validFrom: '2017-01-18T13:18:40+00:00'
                      validTo: '2017-02-19T00:00:00+00:00'
                      dateCreated: '2017-01-18T13:18:40+00:00'
                      lastUpdated: '2017-02-19T00:00:00+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/invite/{walletInviteId}/accept:
    patch:
      summary: Accept
      operationId: acceptWalletInvite
      description: >-
        This API method allows the calling application to accept a Wallet
        Invite.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletInvitationId'
      tags:
        - Invites
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.INVITE.ACCEPT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletInviteEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInviteEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75782
                    walletInviteId: 15300
            response:
              examples:
                response:
                  value:
                    payload:
                      iviteId: '15300'
                      walletId: '75782'
                      type: INVITE
                      guid: ZER2FTTMr8Gp4yx1J6xJrUnqKeeff66g
                      description: Updated Invitation for Sue
                      reference: 'January 2017 Campaign #7'
                      meta:
                        someKey: someValue
                      status: ACCEPTED
                      validFrom: '2017-01-18T13:18:40+00:00'
                      validTo: '2017-02-19T00:00:00+00:00'
                      dateCreated: '2017-01-18T13:18:40+00:00'
                      lastUpdated: '2017-01-23T17:16:15+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/invite/{walletInviteId}/cancel:
    patch:
      summary: Cancel
      operationId: cancelWalletInvite
      description: >-
        This API method allows the calling application to cancel a wallet
        invite.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletInvitationId'
      tags:
        - Invites
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.INVITE.CANCEL
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletInviteEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInviteEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75782
                    walletInviteId: 15302
            response:
              examples:
                response:
                  value:
                    payload:
                      walletInviteId: '15302'
                      walletId: '75782'
                      type: INVITE
                      guid: ZER2FTTMr8Gp4yx1J63333ddd333
                      description: Invitation for Samantha
                      reference: 'January 2017 Campaign #7'
                      meta:
                        someKey: someValue
                      status: CANCELLED
                      validFrom: '2017-01-18T13:18:40+00:00'
                      validTo: '2017-02-19T00:00:00+00:00'
                      dateCreated: '2017-01-18T13:18:40+00:00'
                      lastUpdated: '2017-01-20T08:14:24+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/invite/{walletInviteId}/reject:
    patch:
      summary: Reject
      operationId: rejectWalletInvite
      description: >-
        This API method allows the calling application to reject a Wallet
        Invite.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletInvitationId'
      tags:
        - Invites
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.INVITE.REJECT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletInviteEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInviteEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75782
                    walletInviteId: 15303
            response:
              examples:
                response:
                  value:
                    payload:
                      walletInviteId: '15303'
                      walletId: '75782'
                      type: INVITE
                      guid: ZER2FTTMr8Gp4yx1J63333ddd4444
                      description: Invitation for Jodie
                      reference: 'January 2017 Campaign #7'
                      meta:
                        someKey: someValue
                      status: REJECTED
                      validFrom: '2017-01-18T13:18:40+00:00'
                      validTo: '2017-02-19T00:00:00+00:00'
                      dateCreated: '2017-01-18T13:18:40+00:00'
                      lastUpdated: '2017-01-21T11:33:53+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/invite/{walletInviteId}/state:
    patch:
      summary: Change State
      operationId: updateWalletInviteState
      description: >-
        This API method allows the calling application to change the state of a
        Wallet Invite.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletInvitationId'
      requestBody:
        $ref: '#/components/requestBodies/statePatchPayload'
      tags:
        - Invites
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.INVITE.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletInviteEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletInviteEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75782
                    walletInviteId: 15304
                    body:
                      state: NEW_STATE
            response:
              examples:
                response:
                  value:
                    payload:
                      walletInviteId: '15304'
                      walletId: '75782'
                      type: INVITE
                      guid: ZER2FTTMr8Gp4yx1J63333ddd5555
                      description: Invitation for Jack
                      reference: 'January 2017 Campaign #7'
                      meta:
                        someKey: someValue
                      state: NEW_STATE
                      status: ACTIVE
                      validFrom: '2017-01-18T13:22:40+00:00'
                      validTo: '2017-02-19T00:00:00+00:00'
                      dateCreated: '2017-01-18T13:22:40+00:00'
                      lastUpdated: '2017-01-21T17:53:53+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/identity:
    get:
      summary: Get by Identity
      operationId: getWalletIdentityByIdentityValue
      description: >-
        This API method allows the calling application to retrieve Wallet
        Identity details by Identity Value
      tags:
        - Identities
      parameters:
        - name: name
          in: query
          required: false
          description: Wallet Identity Name
          schema:
            type: string
            format: string
        - name: safeValue
          in: query
          required: false
          description: Wallet Identity Safe Value
          schema:
            type: string
            format: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    name: John's Identity Name
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '75859'
                      type: EMAIL
                      friendlyName: John's Identity Name
                      value: john.doe@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNBURN
                      status: ACTIVE
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-17T13:20:48+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/identities:
    get:
      summary: Collection Of Identities
      operationId: getWalletIdentitiesByWalletId
      description: >-
        This API method allows the calling application to retrieve
        Identities for a specific wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - name: 'state[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Identity State(s). For single
            value filtering square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'status[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Identity Status(es). For single
            value filtering square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'type[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Identity Type(s). For single
            value filtering square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: safeValue
          in: query
          required: false
          description: Wallet Identity Safe Value
          schema:
            type: string
            format: string
        - name: limit
          in: query
          required: false
          description: Query string Pagination Limit
          schema:
            type: integer
            format: int32
            default: 100
        - name: offset
          in: query
          required: false
          description: Query string Pagination Offset
          schema:
            type: integer
            format: int32
            default: 0
      tags:
        - Identities
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentitiesEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    type: EMAIL
                    status: ACTIVE
                    state: EARNBURN
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/identity:
    post:
      summary: Create
      operationId: createWalletIdentity
      description: >-
        This API method allows the calling application to create new Wallet
        Identity for a specific wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletIdentityCreatePayload'
        description: JSON Payload
        required: true
      tags:
        - Identities
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.IDENTITY.CREATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    body:
                      type: EMAIL
                      friendlyName: John's Identity Name
                      value: john.doe@domain.info
                      meta:
                        key1: value1
                      state: EARNBURN
                      status: ACTIVE
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '75859'
                      type: EMAIL
                      friendlyName: John's Identity Name
                      value: john.doe@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNBURN
                      status: ACTIVE
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-17T13:20:48+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/identity/{identityId}:
    get:
      summary: Get by Wallet Id
      operationId: getWalletIdentityByIdentityId
      description: >-
        This API method allows the calling application to retrieve Wallet
        Identity details for a specific wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletIdentityId'
      tags:
        - Identities
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    identityId: 51621
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '75859'
                      type: EMAIL
                      friendlyName: John's Identity Name
                      value: john.doe@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNBURN
                      status: ACTIVE
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-17T13:20:48+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    patch:
      summary: Update
      operationId: updateWalletIdentity
      description: >-
        This API method allows the calling application to update Wallet Identity
        properties for a specific wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletIdentityId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletIdentityPatchPayload'
        description: JSON payload
        required: true
      tags:
        - Identities
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.IDENTITY.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    identityId: 51621
                    body:
                      friendlyName: John's Identity New Name
                      value: john.doe.new.address@domain.info
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '75859'
                      type: EMAIL
                      friendlyName: John's Identity New Name
                      value: john.doe.new.address@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNBURN
                      status: ACTIVE
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-19T10:11:12+00:00'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorMessage: 'Empty Payload Not Valid.'
                  errorCode: IR
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    delete:
      summary: Delete
      operationId: deleteWalletIdentity
      description: >-
        This API method allows the calling application to delete a Wallet
        Identity for a specific wallet. Please note: this operation can't be
        undone.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletIdentityId'
      tags:
        - Identities
      responses:
        '204':
          description: No Content
          x-eventNotifications:
            events:
              - eventName: WALLET.IDENTITY.DELETE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: DELETE
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/identity/{identityId}/suspend:
    patch:
      summary: Suspend
      operationId: updateWalletIdentityStatusSuspended
      description: >-
        This API method allows the calling application to mark a Wallet Identity
        as SUSPENDED (by setting Wallet Identity status equal to SUSPENDED).
        That change would block this Wallet Identity from being used so it can't
        be used to access a Wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletIdentityId'
      tags:
        - Identities
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.IDENTITY.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    identityId: 51621
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '75859'
                      type: EMAIL
                      friendlyName: John's Identity New Name
                      value: john.doe.new.address@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNBURN
                      status: SUSPENDED
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-19T12:13:14+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/identity/{identityId}/activate:
    patch:
      summary: Activate
      operationId: updateWalletIdentityStatusActive
      description: >-
        This API method allows the calling application to mark a Wallet Identity
        as ACTIVE (by setting Wallet Identity status equal to ACTIVE). That
        change would allow this Wallet Identity to be used to access a Wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletIdentityId'
      tags:
        - Identities
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.IDENTITY.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    identityId: 51621
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '75859'
                      type: EMAIL
                      friendlyName: John's Identity New Name
                      value: john.doe.new.address@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNBURN
                      status: ACTIVE
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-19T12:13:14+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/identity/{identityId}/lost:
    patch:
      summary: Lost
      operationId: updateWalletIdentityStatusLost
      description: >-
        This API method allows the calling application to mark a Wallet Identity
        as LOST (by setting Wallet Identity status equal to LOST). That change
        would block this Wallet Identity from being used so it can't be used to
        access a Wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletIdentityId'
      tags:
        - Identities
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.IDENTITY.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    identityId: 51621
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '75859'
                      type: EMAIL
                      friendlyName: John's Identity New Name
                      value: john.doe.new.address@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNBURN
                      status: LOST
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-19T22:07:01+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/identity/{identityId}/stolen:
    patch:
      summary: Stolen
      operationId: updateWalletIdentityStatusStolen
      description: >-
        This API method allows the calling application to mark a Wallet Identity
        as STOLEN (by setting Wallet Identity status equal to STOLEN) This would
        block this Wallet Identity from being used so it can't be used to access
        a Wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletIdentityId'
      tags:
        - Identities
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.IDENTITY.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    identityId: 51621
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '75859'
                      type: EMAIL
                      friendlyName: John's Identity New Name
                      value: john.doe.new.address@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNBURN
                      status: STOLEN
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-19T22:07:01+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/identity/{identityId}/state:
    patch:
      summary: Change State
      operationId: updateWalletIdentityState
      description: >-
        This API method allows the calling application to change a `state` of a
        Wallet Identity.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletIdentityId'
      requestBody:
        $ref: '#/components/requestBodies/statePatchPayload'
      tags:
        - Identities
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.IDENTITY.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    identityId: 51621
                    body:
                      state: EARNONLY
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '75859'
                      type: EMAIL
                      friendlyName: John's Identity New Name
                      value: john.doe.new.address@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNONLY
                      status: ACTIVE
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-19T22:07:01+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/identity/{identityId}/terminate:
    patch:
      summary: Terminate
      operationId: updateWalletIdentityStateTerminate
      description: >-
        This API method allows the calling application to Terminate a Wallet Identity.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletIdentityId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
      tags:
        - Identities
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.IDENTITY.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    identityId: 51621
                    body:
                      state: EARNONLY
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '75859'
                      type: EMAIL
                      friendlyName: John's Identity New Name
                      value: john.doe.new.address@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNONLY
                      status: TERMINATED
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-19T22:07:01+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{sourceWalletId}/identity/{identityId}/move:
    patch:
      summary: Move
      operationId: moveWalletIdentity
      description: >-
        This API method allows the calling application to move a Wallet Identity
        from the Source Wallet Id to the Destination Wallet Id in the payload.
      parameters:
        - $ref: '#/components/parameters/eesAirSourceWalletId'
        - $ref: '#/components/parameters/eesAirWalletIdentityId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletIdentityMovePatchPayload'
        description: JSON payload
        required: true
      tags:
        - Identities
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.IDENTITY.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletIdentityEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    identityId: 51621
                    body:
                      walletId: '77778'
            response:
              examples:
                response:
                  value:
                    payload:
                      identityId: '51621'
                      walletId: '77778'
                      type: EMAIL
                      friendlyName: John's Identity New Name
                      value: john.doe.new.address@domain.info
                      dates:
                        start: '2017-01-17T13:20:48+00:00'
                      meta:
                        key1: value1
                      state: EARNBURN
                      status: ACTIVE
                      dateCreated: '2017-01-17T13:20:48+00:00'
                      lastUpdated: '2017-01-19T22:07:01+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/consumer:
    post:
      summary: Create
      operationId: createWalletConsumer
      description: >-
        This API method allows the calling application to create a new Wallet
        Consumer for a Wallet, identified by a Wallet ID. Please note there
        could be only one ACTIVE Wallet Consumer per Wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletConsumerCreatePayload'
        description: JSON Payload
        required: true
      tags:
        - Consumers
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.CONSUMER.CREATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletConsumerEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletConsumerEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    body:
                      friendlyName: John's Consumer
                      type: DEFAULT
                      status: ACTIVE
                      state: ACTIVE
                      data:
                        tcVersionNumber: '1.1'
                      meta:
                        someKey: someValue
            response:
              examples:
                response:
                  value:
                    payload:
                      consumerId: '42484'
                      walletId: '75859'
                      friendlyName: John's Consumer
                      type: DEFAULT
                      status: ACTIVE
                      state: ACTIVE
                      data:
                        tcVersionNumber: '1.1'
                      meta:
                        someKey: someValue
                      dateCreated: '2017-01-17T13:21:04+00:00'
                      lastUpdated: '2017-01-17T13:21:04+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    get:
      summary: Get by Wallet Id
      operationId: getWalletConsumer
      description: >-
        This API method allows the calling application to retrieve Wallet
        Consumer details for a specific Wallet
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      tags:
        - Consumers
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletConsumerEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
            response:
              examples:
                response:
                  value:
                    payload:
                      consumerId: '42484'
                      walletId: '75859'
                      friendlyName: John's Consumer
                      type: DEFAULT
                      status: ACTIVE
                      state: ACTIVE
                      data:
                        tcVersionNumber: '1.1'
                      meta:
                        someKey: someValue
                      dateCreated: '2017-01-17T13:21:04+00:00'
                      lastUpdated: '2017-01-17T13:21:04+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/consumer/{consumerId}:
    get:
      summary: Get by Consumer Id
      operationId: getWalletConsumerByConsumerId
      description: >-
        This API method allows the calling application to get the Wallet
        Consumer details for a Wallet. 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.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletConsumerId'
      tags:
        - Consumers
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletConsumerEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    consumerId: 42484
            response:
              examples:
                response:
                  value:
                    payload:
                      consumerId: '42484'
                      walletId: '75859'
                      friendlyName: John's Consumer
                      type: DEFAULT
                      status: ACTIVE
                      state: ACTIVE
                      data:
                        tcVersionNumber: '1.1'
                      meta:
                        someKey: someValue
                      dateCreated: '2017-01-17T13:21:04+00:00'
                      lastUpdated: '2017-01-17T13:21:04+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    patch:
      summary: Update
      operationId: updateWalletConsumer
      description: >-
        This API method allows the calling application to update the Wallet
        Consumer details for a Wallet. 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.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletConsumerId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletConsumerPatchPayload'
        description: JSON payload
        required: true
      tags:
        - Consumers
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.CONSUMER.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletConsumerEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletConsumerEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    consumerId: 42484
                    body:
                      friendlyName: John's New Consumer
            response:
              examples:
                response:
                  value:
                    payload:
                      consumerId: '42484'
                      walletId: '75859'
                      friendlyName: John's New Consumer
                      type: DEFAULT
                      status: ACTIVE
                      state: ACTIVE
                      data:
                        tcVersionNumber: '1.1'
                      meta:
                        someKey: someValue
                      dateCreated: '2017-01-17T13:21:04+00:00'
                      lastUpdated: '2017-01-17T13:21:04+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    delete:
      summary: Delete
      operationId: deleteWalletConsumer
      description: >-
        This API method allows the calling application to delete a Wallet
        Consumer
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletConsumerId'
      tags:
        - Consumers
      responses:
        '204':
          description: No Content
          x-eventNotifications:
            events:
              - eventName: WALLET.CONSUMER.DELETE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletConsumerEntity'
                    operationType: DELETE
          content:
            request:
              examples:
                response:
                  value:
                    walletId: 75851
                    consumerId: 144151
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/consumer/{consumerId}/data:
    patch:
      summary: Update Data
      operationId: updateWalletConsumerDataOperation
      description: >-
        This API method allows the calling application to update the Wallet
        Consumer Data details for a Wallet using approach described in RFC 6902.
        Please note: #1 only consumer data sub-structure could be modified using
        that endpoint. #2 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. Only replace operation is supported.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletConsumerId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletConsumerOperationPatchPayload'
        description: JSON payload
        required: true
      tags:
        - Consumers
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.CONSUMER.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletConsumerEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletConsumerEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    consumerId: 42484
                    body:
                      op: replace
                      path: communicationProfile/emailAddress
                      value: john.doe-new-emailaddress@domain.info
            response:
              examples:
                response:
                  value:
                    payload:
                      consumerId: '42484'
                      walletId: '75859'
                      friendlyName: John's New Consumer
                      type: DEFAULT
                      status: ACTIVE
                      state: ACTIVE
                      data:
                        tcVersionNumber: '1.1'
                        communicationProfile:
                          emailAddress: john.doe-new-emailaddress@domain.info
                      meta:
                        someKey: someValue
                      dateCreated: '2017-01-17T13:21:04+00:00'
                      lastUpdated: '2017-01-17T13:21:04+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/consumer/{consumerId}/state:
    patch:
      summary: Update State
      operationId: updateWalletConsumerState
      description: >-
        This API method allows the calling application to change the State of a
        Wallet Consumer
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletConsumerId'
      requestBody:
        $ref: '#/components/requestBodies/statePatchPayload'
      tags:
        - Consumers
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.CONSUMER.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletConsumerEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletConsumerEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    consumerId: 42484
                    body:
                      state: A_STATE
            response:
              examples:
                response:
                  value:
                    payload:
                      consumerId: '42484'
                      walletId: '75859'
                      friendlyName: John's New Consumer
                      type: DEFAULT
                      status: ACTIVE
                      state: A_STATE
                      data:
                        tcVersionNumber: '1.1'
                      meta:
                        someKey: someValue
                      dateCreated: '2017-01-17T13:21:04+00:00'
                      lastUpdated: '2017-01-17T13:21:04+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/transactions:
    get:
      summary: Get
      operationId: getWalletTransactions
      description: >-
        This API method allows the calling application to retrieve a paginated
        list of Transactions for a specific wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - name: 'walletTransactionId[]'
          in: query
          required: false
          description: >-
            Optional Query parameter for result filtering by Wallet Transaction
            ID(s)
          schema:
            type: string
            format: string
        - name: 'parentWalletTransactionId[]'
          in: query
          required: false
          description: >-
            Optional Query parameter for result filtering by Wallet Parent Transaction
            ID(s)
          schema:
            type: string
            format: string
        - name: 'type[]'
          in: query
          required: false
          description: >-
            Optional Query parameter for result filtering by Wallet Transaction
            Type(s)
          schema:
            type: string
            format: string
        - name: 'status[]'
          in: query
          required: false
          description: >-
            Optional Query parameter for result filtering by Wallet Transaction
            Status(es)
          schema:
            type: string
            format: string
        - name: 'state[]'
          in: query
          required: false
          description: >-
            Optional Query parameter for result filtering by Wallet Transaction
            State(s)
          schema:
            type: string
            format: string
        - name: 'reference[]'
          in: query
          required: false
          description: >-
            Optional Query parameter for result filtering by Wallet Transaction
            Reference(s)
          schema:
            type: string
            format: string
        - name: transactionDateTime
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Wallet Transaction
            transactionDateTime explicit date-time value in ATOM format or
            date-time range, for range named key attributes needs to be provided
            (transactionDateTime[to]=... and/or transactionDateTime[from]=...).
            Please note&#58; the `+` sign, indicating a positive time zone
            offset, should be url-encoded (replaced with `%2B`)
          schema:
            type: string
            format: ees-date-time
        - name: dateCreated
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Wallet Transaction Created
            explicit date-time value or date-time range, for range named key
            attributes needs to be provided (dateCreated[to]=... and/or
            dateCreated[from]=...)
          schema:
            type: string
            format: date-time
        - name: lastUpdated
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Wallet Transaction Last Updated
            explicit date-time value or date-time range, for range named key
            attributes needs to be provided (lastUpdated[to]=... and/or
            lastUpdated[from]=...)
          schema:
            type: string
            format: date-time
        - name: storeId
          in: query
          required: false
          description: >-
            Query string for Result Filtering by a single store ID (outlet incoming
            identifier). This can be provided by itself or with storeParentId. This 
            cannot be used in combination with any other query parameters except
            for status.
          schema:
            type: string
            format: string
        - name: storeParentId
          in: query
          required: false
          description: >-
            Query string for Result Filtering by a single parent store ID (parent 
            outlet incoming identifier). This can be provided by itself or with 
            storeId. This cannot be used in combination with any other query
            parameters except for status.
          schema:
            type: string
            format: string
        - name: includeChildren
          in: query
          required: false
          description: >-
            Include Wallet Transaction(s) for the children Wallet(s) into
            returned result set where the value is equal to the depth
          schema:
            type: integer
            default: 1
        - name: orderBy
          in: query
          required: false
          description: Query string Order By
          schema:
            type: string
            enum:
              - 'walletTransactionId,ASC'
              - 'walletTransactionId,DESC'
              - 'transactionDateTime,ASC'
              - 'transactionDateTime,DESC'
        - name: limit
          in: query
          required: false
          description: Query string Pagination Limit
          schema:
            type: integer
            maximum: 100
            default: 20
        - name: offset
          in: query
          required: false
          description: Query string Pagination Offset
          schema:
            type: integer
            default: 0
      tags:
        - Transactions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  limit:
                    type: integer
                    description: Results per page
                  total:
                    type: integer
                    description: Total Results
                  offset:
                    type: integer
                    description: Offset
                  orderBy:
                    type: array
                    description: Order by criteria.
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: The sorting key
                        order:
                          type: string
                          description: The sorting direction.
                  results:
                    type: array
                    description: Array of walletTransactionEntities
                    items:
                      $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                requestUsingWalletIdOnly:
                  value:
                    walletId: 75859
                    limit: 100
                requestUsingParentWalletTransactionId:
                  value:
                    walletId: 75859
                    parentWalletTransactionId[]: 82165
                    limit: 100
            response:
              examples:
                responseUsingWalletIdOnly:
                  value:
                    payload:
                      total: 1
                      offset: 0
                      orderBy: []
                      limit: 100
                      results:
                        - walletTransactionId: '24932'
                          parentWalletTransactionId: '0'
                          walletId: '75859'
                          reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                          identityId: '51632'
                          type: SETTLE
                          status: ACTIVE
                          meta:
                            key1: Value1
                          state: ACTIVE
                          accounts:
                            - accountId: '61584'
                              accountTransactionId: '129106'
                          basket:
                            contents:
                              - UPC: SKU1744
                                calculatedPrice: 700
                                qualifyingPrice: 700
                                quantity: 1
                                sale: true
                            summary:
                              itemCount: 1
                              totalCalculatedPrice: 700
                              totalQualifyingPrice: 700
                              totalTaxAmount: 0
                              pointsCredited: 200
                              pointsRedeemed: 0
                              pointsRefunded: 0
                              basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                            payment:
                              - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                                PCFTender: false
                                type: DEBITCARD
                                amount: 700
                          channel: pos2
                          location:
                            storeId: '0576'
                            storeParentId: '300'
                          dateCreated: '2017-01-17T13:21:40+00:00'
                          lastUpdated: '2017-01-17T13:21:40+00:00'
                responseUsingParentWalletTransactionId:
                  value:
                    payload:
                      total: 1
                      offset: 0
                      orderBy: [ ]
                      limit: 100
                      results:
                        - walletTransactionId: '24810'
                          parentWalletTransactionId: '8230'
                          walletId: '75859'
                          reference: 6D2AD47D271F1C41A9D6183BE4E8AD94
                          identityId: '51628'
                          type: SETTLE
                          status: ACTIVE
                          meta:
                            key1: Value1
                          state: ACTIVE
                          accounts:
                            - accountId: '83749'
                              accountTransactionId: '129348'
                          basket:
                            contents:
                              - UPC: SKU1782
                                calculatedPrice: 200
                                qualifyingPrice: 200
                                quantity: 1
                                sale: true
                            summary:
                              itemCount: 1
                              totalCalculatedPrice: 200
                              totalQualifyingPrice: 200
                              totalTaxAmount: 0
                              pointsCredited: 50
                              pointsRedeemed: 0
                              pointsRefunded: 0
                              basketTransactionId: 46D2AD47D271F1C41A9D6183BE4E8AD9
                            payment:
                              - cardNumberHash: 11948C38F237FD6886F833D53C0D3AF9
                                PCFTender: false
                                type: DEBITCARD
                                amount: 700
                          channel: pos2
                          location:
                            storeId: '0123'
                            storeParentId: '123'
                          dateCreated: '2024-01-17T13:21:40+00:00'
                          lastUpdated: '2024-01-17T13:21:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/transaction:
    post:
      summary: Create
      description: >-
        This API method allows the calling application to create a transaction
        against a specific wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletTransactionCreationPayload'
        description: JSON payload
        required: true
      tags:
        - Transactions
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.TRANSACTION.CREATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    body:
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: ACTIVE
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      location:
                        storeId: '0576'
                        storeParentId: '300'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: ACTIVE
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/transaction:
    get:
      summary: Get By Reference
      operationId: getWalletTransactionByReference
      description: >-
        This API endpoint allows the calling application to retrieve Wallet
        Transaction details by unique Reference (provided during Wallet
        Transaction creation).
      parameters:
        - name: reference
          description: The unique Wallet Transaction reference.
          in: query
          required: true
          schema:
            type: string
      tags:
        - Transactions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    reference: 9D6183BE4E8AD946D2AD47D271F1C41A
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: ACTIVE
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/transaction/{transactionId}:
    get:
      summary: Get by Id
      operationId: getWalletTransactionById
      description: >-
        This API method allows the calling application to get a Wallet
        Transaction details by a Wallet Transaction Id
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      tags:
        - Transactions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    transactionId: 24932
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: ACTIVE
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    patch:
      summary: Update
      operationId: updateWalletTransaction
      description: >-
        This API method allows the calling application to update existing Wallet
        Transaction details, identified by a Wallet Transaction Id and Wallet
        Id.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletTransactionPatchPayload'
        description: JSON payload
        required: true
      tags:
        - Transactions
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.TRANSACTION.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    transactionId: 24932
                    body:
                      location:
                        storeId: '0577'
                        storeParentId: '300'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: ACTIVE
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0577'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-19T08:05:33+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    delete:
      summary: Delete
      operationId: deleteWalletTransaction
      description: >-
        This API method allows the calling application to delete a Wallet
        Transaction
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      tags:
        - Transactions
      responses:
        '204':
          description: No Content
          x-eventNotifications:
            events:
              - eventName: WALLET.TRANSACTION.DELETE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: DELETE
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/transaction/{transactionId}/history:
    get:
      summary: Get wallet transaction history
      operationId: getWalletTransactionHistory
      description: >-
        This API method allows the calling application to get the history of a Wallet
        Transaction.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
        - name: limit
          in: query
          required: false
          description: Query string Pagination Limit
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 20
            default: 20
        - name: offset
          in: query
          required: false
          description: Query string Pagination Offset
          schema:
            type: integer
            format: int32
            default: 0
            minimum: 0
        - name: 'orderBy'
          in: query
          required: false
          description: >-
            Query string for controlling Paginated Results Sorting Order. Please
            note this query string needs to be constructed from field name +
            comma sign and sorting order (ASC/DESC). Currently AIR supports
            sorting by only one key: `walletTransactionHistoryId`
          schema:
            type: string
            format: string
            enum:
              - walletTransactionHistoryId,ASC
              - walletTransactionHistoryId,DESC
            default: walletTransactionHistoryId,ASC
      tags:
        - Transactions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  limit:
                    type: integer
                    format: int32
                    description: Results per page
                  hasMoreResults:
                    type: boolean
                    format: string
                    description: If true then there is a further page of results available
                  offset:
                    type: integer
                    format: int32
                    description: Pagination offset
                  orderBy:
                    type: array
                    description: Order by criteria.
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Field name being used for sorting can only be walletTransactionHistoryId
                          enum:
                            - walletTransactionHistoryId
                        order:
                          type: string
                          description: Sorting direction.
                          enum:
                            - ASC
                            - DESC
                  results:
                    type: array
                    description: Array of walletTransactionHistoryEntities
                    items:
                      allOf:
                        - $ref: '#/components/schemas/walletTransactionHistoryEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/transaction/{transactionId}/state:
    patch:
      summary: Update State
      operationId: updateWalletTransactionState
      description: >-
        This API method allows the calling application to update existing Wallet
        Transaction state.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      requestBody:
        $ref: '#/components/requestBodies/statePatchPayload'
      tags:
        - Transactions
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.TRANSACTION.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    transactionId: 24932
                    body:
                      state: A_STATE
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: ACTIVE
                      meta:
                        key1: Value1
                      state: A_STATE
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0577'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-19T08:05:33+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/transaction/{transactionId}/settle:
    patch:
      summary: Settle
      operationId: updateWalletTransactionSettle
      description: >-
        This API method allows the calling application to settle a Wallet
        Transaction, identified by a Wallet Transaction Id and Wallet Id.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      tags:
        - Transactions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.TRANSACTION.SETTLE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    transactionId: 24932
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: SETTLED
                      meta:
                        key1: Value1
                      state: SETTLED
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0577'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-19T08:05:33+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/transaction/{transactionId}/cancel:
    patch:
      summary: Cancel
      operationId: cancelWalletTransaction
      description: >-
        This API method allows the calling application to cancel a Wallet
        Transaction, identified by a Transaction Id and Wallet Id.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      tags:
        - Transactions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.TRANSACTION.CANCEL
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: DELETE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    transactionId: 24932
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: CANCELLED
                      meta:
                        key1: Value1
                      state: CANCELLED
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0577'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-19T08:05:33+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/transaction/{transactionId}/expire:
    patch:
      summary: Expire
      operationId: updateWalletTransactionExpire
      description: >-
        This API method allows the calling application to expire a Wallet
        Transaction, identified by a Transaction Id and Wallet Id.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      tags:
        - Transactions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.TRANSACTION.EXPIRE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    transactionId: 24932
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: EXPIRED
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0577'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-19T08:05:33+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/transaction/{transactionId}/pendingPointsRelease:
    patch:
      summary: Pending Points Release
      operationId: pendingPointsRelease
      description: >-
        This API method allows the calling application to release all 
        pending points credited against a Wallet Transaction, identified
        by a Wallet Transaction Id and Wallet Id.
        
        Any non-pending point account transactions are ignored, unless there
        are no pending points at all in the wallet transaction which will return a 404.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      tags:
        - Transactions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: Pending Points have been released and new Wallet Transaction created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.PENDINGPOINTS.RELEASE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: One item for each credit Account Transaction containing pending points
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Wallet Transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    transactionId: 24932
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24933'
                      parentWalletTransactionId: '24932'
                      walletId: '75859'
                      reference: 'PENDINGPOINTSRELEASE65ddc274c1b358.45965819'
                      identityId: '51632'
                      type: PENDING_POINTS_RELEASE
                      status: SETTLED
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                        - accountId: '61584'
                          accountTransactionId: '129107'
                      basket:
                        contents: null
                        summary: null
                        payment: null
                      channel: api
                      location:
                        storeId: null
                        storeParentId: null
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-19T08:05:33+00:00'
        '207':
          description: Multi-Status
          x-description: >-
            Only some of the pending points were released and a Wallet Transaction created
            containing the successful Wallet Account Transactions. The failures are listed separately
            in the response.
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.PENDINGPOINTS.RELEASE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: One item for each credit Wallet Account Transaction containing pending points
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Wallet Transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  '200':
                    allOf:
                      - $ref: '#/components/schemas/walletTransactionEntity'
                    description: Wallet Transaction for the successfully released pending points
                  '400':
                    allOf:
                      - $ref: '#/components/schemas/walletTransactionAccountsEntity'
                    description: Wallet Account Transactions for pending points that failed to be released
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/transaction/{transactionId}/pendingPointsReject:
    patch:
      summary: Pending Points Reject
      operationId: pendingPointsReject
      description: >-
        This API method allows the calling application to reject all 
        pending points credited against a Wallet Transaction, identified
        by a Wallet Transaction Id and Wallet Id.
        
        Any non-pending point account transactions are ignored, unless there
        are no pending points at all in the wallet transaction which will return a 404.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      tags:
        - Transactions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/reasonCodePayload'
        description: JSON payload
        required: false
      responses:
        '200':
          description: Pending Points have been rejected and new Wallet Transaction created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.PENDINGPOINTS.REJECT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: One item for each credit Wallet Account Transaction containing pending points
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Wallet Transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    transactionId: 24932
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24933'
                      parentWalletTransactionId: '24932'
                      walletId: '75859'
                      reference: 'PENDINGPOINTSREJECT65ddc274c1b358.45965819'
                      identityId: '51632'
                      type: PENDING_POINTS_REJECT
                      status: SETTLED
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '61584'
                          accountTransactionId: '129106'
                        - accountId: '61584'
                          accountTransactionId: '129107'
                      basket:
                        contents: null
                        summary: null
                        payment: null
                      channel: api
                      location:
                        storeId: null
                        storeParentId: null
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-19T08:05:33+00:00'
        '207':
          description: Multi-Status
          x-description: >-
            Only some of the pending points were rejected and a Wallet Transaction created
            containing the successful Wallet Account Transactions. The failures are listed separately
            in the response.
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.PENDINGPOINTS.REJECT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: One item for each credit Wallet Account Transaction containing pending points
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Wallet Transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  '200':
                    allOf:
                      - $ref: '#/components/schemas/walletTransactionEntity'
                    description: Wallet Transaction for the successfully rejected pending points
                  '400':
                    allOf:
                      - $ref: '#/components/schemas/walletTransactionAccountsEntity'
                    description: Wallet Account Transactions for pending points that failed to be rejected
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/trigger:
    post:
      summary: Social Behavioral Action Campaign
      operationId: socialBehavioralActionCampaign
      description: >-
        This API method allows the calling application to trigger the creation, 
        redemption and issuing of a reward for a Behavioural Action Campaign based on an 
        Action Reference.  For e.g. Submit a customer review and the consumer receives 100 points.
      requestBody:
        description: Request body containing the required parameters.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                identityValue:
                  type: string
                  description: The customer wallet identity.
                walletTransaction:
                  type: object
                  properties:
                    reference:
                      type: string
                      description: Calling party's reference to this transaction.
                triggers:
                  type: array
                  items:
                    type: object
                    properties:
                      reference:
                        type: string
                        description: A reference for the Behavioral Action to be executed.
                  description: An array of Action objects representing triggers to be performed.
      tags:
        - Services
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: SERVICE.TRIGGER
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: New wallet transaction entity has been created.
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                    description: Wallet Transaction Accounts is being updated.
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                    operationSubType: SETSTATUS,
                    Description: Settled operation status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountEntity'
            request:
              examples:
                response:
                  value:
                    body:
                      identityValue: 'customer@email.com'
                      walletId: 75859
                      triggers:
                        - reference: 'PRODUCT_XXXX_FB_REVIEW'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: CANCELLED
                      meta:
                        key1: Value1
                      state: CANCELLED
                      accounts:
                        - accountId: '16287857'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/{transactionId}:
    put:
      summary: Update Wallet Transaction
      operationId: updateWalletTransactionServiceById
      description: >-
        This API method allows the calling application to update a transaction
        against a specific wallet if it has already been released, and at the
        same time will lock the specified accounts in preparation for the given
        account transactions.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      requestBody:
        $ref: '#/components/requestBodies/walletTransactionServicesUpdatePayload'
      tags:
        - Services
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    transactionId: 24932
                    body:
                      parentWalletTransactionId: '0'
                      identityId: '51632'
                      meta:
                        key1: Value1
                      accountTransactions:
                        - accountId: '16287857'
                          transaction: redeem
                          payload: {}
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                    response:
                      Content-Type: application/json;charset=utf-8
                      payload:
                        walletTransactionId: '24932'
                        parentWalletTransactionId: '0'
                        walletId: '75859'
                        reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                        identityId: '51632'
                        type: SETTLE
                        status: ACTIVE
                        meta:
                          key1: Value1
                        state: ACTIVE
                        accounts:
                          - accountId: '16287857'
                            accountTransactionId: '129106'
                        basket:
                          contents:
                            - UPC: SKU1744
                              calculatedPrice: 700
                              qualifyingPrice: 700
                              quantity: 1
                              sale: true
                          summary:
                            itemCount: 1
                            totalCalculatedPrice: 700
                            totalQualifyingPrice: 700
                            totalTaxAmount: 0
                            pointsCredited: 200
                            pointsRedeemed: 0
                            pointsRefunded: 0
                            basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                          payment:
                            - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                              PCFTender: false
                              type: DEBITCARD
                              amount: 700
                        channel: pos2
                        location:
                          storeId: '0576'
                          storeParentId: '300'
                        dateCreated: '2017-01-17T13:21:4000:00'
                        lastUpdated: '2017-01-17T13:21:4000:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet:
    post:
      summary: Create Wallets and Identities
      operationId: createWalletAndWalletIdentities
      description: >-
        This API method allows the calling application to create a Wallet with
        one or more Identities within single API call.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletServicesCreatePayload'
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.CREATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: CREATE
                    description: >-
                      One for the main wallet created and one for each
                      relationship wallet created
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: a pair for each relationship wallet created and linked
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: Create
                    description: one item for one created Wallet Identity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletServicesEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}:
    delete:
      summary: Delete Wallet
      operationId: deleteServicesWallet
      description: >-
        This API method allows the calling application to delete a Wallet and
        its contents. Wallet Consumer and Identities are deleted and Wallet
        accounts are cancelled.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      tags:
        - Services
      responses:
        '204':
          description: No Content
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.DELETE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: DELETE
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: DELETE
                    description: one item for one deleted Wallet Identity
                  - schema:
                      $ref: '#/components/schemas/walletConsumerEntity'
                    operationType: DELETE
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
          content:
            request:
              examples:
                response:
                  value:
                    walletId: 75859
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/accounts:
    post:
      summary: Create a Wallet, along with it’s identities and coupon/scheme accounts and a consumer object
      operationId: createWalletAccountService
      description: >-
        We have the ability in AIR to create a wallet, one or more identities,
        one or more coupon accounts, one or more scheme accounts and a consumer object
        in a single API call. If the first identity provided already exists, subsequent actions will be
        completed against the existing wallet and no further identities or wallets will be created.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/servicesWalletAccountsPayload'
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletAccountServicesEntity'
              examples:
                '201 - Basic Example':
                  value:
                    walletId: '123'
                    friendlyName: Alice Wallet
                    status: ACTIVE
                    type: BASIC_PARENT
                    state: BASIC
                    meta: [ ]
                    dateCreated: '2023-04-28T08:20:11+00:00'
                    lastUpdated: '2023-04-28T08:20:11+00:00'
                    relationships:
                      parent: [ ]
                      child: [ ]
                      associate: [ ]
                      donor: [ ]
                    identities:
                      -
                        identityId: '1'
                        walletId: '123'
                        type: BASIC_CARD
                        friendlyName: Alice Identity
                        value: identityValue_858219249
                        safeValue:
                        secret:
                        dates:
                          start: '2023-04-28T08:20:11+00:00'
                          end:
                        meta: [ ]
                        state: BASIC
                        status: ACTIVE
                        dateCreated: '2023-04-28T08:20:11+00:00'
                        lastUpdated: '2023-04-28T08:20:11+00:00'
                        mobileWallet: 'https://mobile.wallet.com/passbook/identity/125/33439/6622/8c71ac88ba9d5e71c4d'
                      -
                        identityId: '2'
                        walletId: '123'
                        type: BASIC_CARD
                        friendlyName: Bob Identity
                        value: identityValue_1165812777
                        safeValue:
                        secret:
                        dates:
                          start: '2023-04-28T08:20:11+00:00'
                          end:
                        meta: [ ]
                        state: BASIC
                        status: ACTIVE
                        dateCreated: '2023-04-28T08:20:11+00:00'
                        lastUpdated: '2023-04-28T08:20:11+00:00'
                        mobileWallet: 'https://mobile.wallet.com/passbook/identity/125/33439/6623/a8ce06c5acf0706fc8'
                    accounts:
                      campaign:
                        total: 2
                        results:
                          -
                            accountId: '234'
                            walletId: '123'
                            campaignId: '777'
                            type: ECOUPON
                            clientType:
                            status: ACTIVE
                            state: BASIC
                            dates:
                              start: '2023-04-28T08:20:12+00:00'
                              end: '2038-01-19T03:14:07+00:00'
                            meta: [ ]
                            dateCreated: '2023-04-28T08:20:12+00:00'
                            lastUpdated: '2023-04-28T08:20:12+00:00'
                            overrides: [ ]
                            balances:
                              available: 0
                              refundable: 0
                            relationships: [ ]
                            mobileWallet: 'https://mobile.wallet.com/passbook/account/41833/0c83522dc294aa960b14858c'
                          -
                            accountId: '200'
                            walletId: '123'
                            campaignId: '455'
                            type: ECOUPON
                            clientType:
                            status: ACTIVE
                            state: BASIC
                            dates:
                              start: '2023-04-28T08:20:12+00:00'
                              end: '2038-01-19T03:14:07+00:00'
                            meta: [ ]
                            dateCreated: '2023-04-28T08:20:12+00:00'
                            lastUpdated: '2023-04-28T08:20:12+00:00'
                            overrides: [ ]
                            balances:
                              available: 0
                              refundable: 0
                            relationships: [ ]
                            mobileWallet: 'https://mobile.wallet.com/passbook/account/41834/87b69039c29f587641b14932'
                        successful:
                          total: 2
                          results:
                            -
                              accountId: '234'
                              walletId: '123'
                              campaignId: '777'
                              type: ECOUPON
                              clientType:
                              status: ACTIVE
                              state: BASIC
                              dates:
                                start: '2023-04-28T08:20:12+00:00'
                                end: '2038-01-19T03:14:07+00:00'
                              meta: [ ]
                              dateCreated: '2023-04-28T08:20:12+00:00'
                              lastUpdated: '2023-04-28T08:20:12+00:00'
                              overrides: [ ]
                              balances:
                                available: 0
                                refundable: 0
                              relationships: [ ]
                              mobileWallet: 'https://mobile.wallet.com/passbook/account/41833/0c83522dc294aa960b1485'
                            -
                              accountId: '200'
                              walletId: '123'
                              campaignId: '455'
                              type: ECOUPON
                              clientType:
                              status: ACTIVE
                              state: BASIC
                              dates:
                                start: '2023-04-28T08:20:12+00:00'
                                end: '2038-01-19T03:14:07+00:00'
                              meta: [ ]
                              dateCreated: '2023-04-28T08:20:12+00:00'
                              lastUpdated: '2023-04-28T08:20:12+00:00'
                              overrides: [ ]
                              balances:
                                available: 0
                                refundable: 0
                              relationships: [ ]
                              mobileWallet: 'https://mobile.wallet.com/passbook/account/41834/87b69039c29f587641b149'
                        failed:
                          total: 0
                          results: [ ]
                '201 - Example With Tokens':
                  value:
                    walletId: '418'
                    friendlyName: Gemma Wallet
                    status: ACTIVE
                    type: BASIC_PARENT
                    state: BASIC
                    meta: [ ]
                    dateCreated: '2023-04-28T08:20:12+00:00'
                    lastUpdated: '2023-04-28T08:20:12+00:00'
                    relationships:
                      parent: [ ]
                      child: [ ]
                      associate: [ ]
                      donor: [ ]
                    identities:
                      -
                        identityId: '3'
                        walletId: '418'
                        type: BASIC_CARD
                        friendlyName: Gemma Identity
                        value: identityValue_2028299736
                        safeValue:
                        secret:
                        dates:
                          start: '2023-04-28T08:20:12+00:00'
                          end:
                        meta: [ ]
                        state: BASIC
                        status: ACTIVE
                        dateCreated: '2023-04-28T08:20:12+00:00'
                        lastUpdated: '2023-04-28T08:20:12+00:00'
                        mobileWallet: 'https://mobile.wallet.com/passbook/identity/125/33440/6624/bb9bb3d3d88855676a'
                      -
                        identityId: '4'
                        walletId: '418'
                        type: BASIC_CARD
                        friendlyName: Debra Identity
                        value: identityValue_640537280
                        safeValue:
                        secret:
                        dates:
                          start: '2023-04-28T08:20:12+00:00'
                          end:
                        meta: [ ]
                        state: BASIC
                        status: ACTIVE
                        dateCreated: '2023-04-28T08:20:12+00:00'
                        lastUpdated: '2023-04-28T08:20:12+00:00'
                        mobileWallet: 'https://mobile.wallet.com/passbook/identity/125/33440/6625/85fa3a5bcf907c014c'
                    accounts:
                      campaign:
                        total: 2
                        results:
                          -
                            accountId: '380'
                            walletId: '418'
                            campaignId: '777'
                            type: ECOUPON
                            clientType:
                            status: ACTIVE
                            state: BASIC
                            dates:
                              start: '2023-04-28T08:20:12+00:00'
                              end: '2038-01-19T03:14:07+00:00'
                            meta: [ ]
                            dateCreated: '2023-04-28T08:20:12+00:00'
                            lastUpdated: '2023-04-28T08:20:12+00:00'
                            overrides: [ ]
                            balances:
                              available: 0
                              refundable: 0
                            relationships: [ ]
                            mobileWallet: 'https://mobile.wallet.com/passbook/account/41835/cefee66706c2364451bc9099'
                            tokens:
                              -
                                tokenId: '1'
                                accountId: ''
                                token: LPZ635SCJ
                                validFrom: '2023-04-28T08:20:12+00:00'
                                validTo: '2038-01-19T03:14:07+00:00'
                                dateCreated: '2023-04-28T08:20:12+00:00'
                                lastUpdated: '2023-04-28T08:20:12+00:00'
                                status: ACTIVE
                                tokenLock:
                                  validFrom:
                                  validTo:
                            stats: null
                            limits: null
                            relatedAccounts: null
                            createTransaction: null
                          -
                            accountId: '525'
                            walletId: '418'
                            campaignId: '455'
                            type: ECOUPON
                            clientType:
                            status: ACTIVE
                            state: BASIC
                            dates:
                              start: '2023-04-28T08:20:12+00:00'
                              end: '2038-01-19T03:14:07+00:00'
                            meta: [ ]
                            dateCreated: '2023-04-28T08:20:12+00:00'
                            lastUpdated: '2023-04-28T08:20:12+00:00'
                            overrides: [ ]
                            balances:
                              available: 0
                              refundable: 0
                            relationships: [ ]
                            mobileWallet: 'https://mobile.wallet.com/passbook/account/41836/48cd3a6fab85bc86a79a5a08'
                            tokens:
                              -
                                tokenId: '2'
                                accountId: ''
                                token: DNG390DMC
                                validFrom: '2023-04-28T08:20:12+00:00'
                                validTo: '2038-01-19T03:14:07+00:00'
                                dateCreated: '2023-04-28T08:20:12+00:00'
                                lastUpdated: '2023-04-28T08:20:12+00:00'
                                status: ACTIVE
                                tokenLock:
                                  validFrom:
                                  validTo:
                            stats: null
                            limits: null
                            relatedAccounts: null
                            createTransaction: null
                        successful:
                          total: 2
                          results:
                            -
                              accountId: '380'
                              walletId: '418'
                              campaignId: '777'
                              type: ECOUPON
                              clientType:
                              status: ACTIVE
                              state: BASIC
                              dates:
                                start: '2023-04-28T08:20:12+00:00'
                                end: '2038-01-19T03:14:07+00:00'
                              meta: [ ]
                              dateCreated: '2023-04-28T08:20:12+00:00'
                              lastUpdated: '2023-04-28T08:20:12+00:00'
                              overrides: [ ]
                              balances:
                                available: 0
                                refundable: 0
                              relationships: [ ]
                              mobileWallet: 'https://mobile.wallet.com/passbook/account/41835/cefee66706c2364451bc90'
                              tokens:
                                -
                                  tokenId: '1'
                                  accountId: ''
                                  token: LPZ635SCJ
                                  validFrom: '2023-04-28T08:20:12+00:00'
                                  validTo: '2038-01-19T03:14:07+00:00'
                                  dateCreated: '2023-04-28T08:20:12+00:00'
                                  lastUpdated: '2023-04-28T08:20:12+00:00'
                                  status: ACTIVE
                                  tokenLock:
                                    validFrom:
                                    validTo:
                              stats: null
                              limits: null
                              relatedAccounts: null
                              createTransaction: null
                            -
                              accountId: '525'
                              walletId: '418'
                              campaignId: '455'
                              type: ECOUPON
                              clientType:
                              status: ACTIVE
                              state: BASIC
                              dates:
                                start: '2023-04-28T08:20:12+00:00'
                                end: '2038-01-19T03:14:07+00:00'
                              meta: [ ]
                              dateCreated: '2023-04-28T08:20:12+00:00'
                              lastUpdated: '2023-04-28T08:20:12+00:00'
                              overrides: [ ]
                              balances:
                                available: 0
                                refundable: 0
                              relationships: [ ]
                              mobileWallet: 'https://mobile.wallet.com/passbook/account/41836/48cd3a6fab85bc86a79a5a'
                              tokens:
                                -
                                  tokenId: '2'
                                  accountId: ''
                                  token: DNG390DMC
                                  validFrom: '2023-04-28T08:20:12+00:00'
                                  validTo: '2038-01-19T03:14:07+00:00'
                                  dateCreated: '2023-04-28T08:20:12+00:00'
                                  lastUpdated: '2023-04-28T08:20:12+00:00'
                                  status: ACTIVE
                                  tokenLock:
                                    validFrom:
                                    validTo:
                              stats: null
                              limits: null
                              relatedAccounts: null
                              createTransaction: null
                        failed:
                          total: 0
                          results: [ ]
        '207':
          description: Multi-Status
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletAccountServicesEntity'
                example:
                  walletId: '189066'
                  friendlyName: Flinn Wallet
                  status: ACTIVE
                  type: BASIC_PARENT
                  state: BASIC
                  meta: [ ]
                  dateCreated: '2021-10-22T11:23:35+00:00'
                  lastUpdated: '2021-10-22T11:23:35+00:01'
                  relationships:
                    parent: [ ]
                    child: [ ]
                    associate: [ ]
                    donor: [ ]
                  identities:
                    - identityId: '85300'
                      walletId: '189066'
                      type: BASIC_CARD
                      friendlyName:
                      value: identityValue_1526762061
                      safeValue:
                      secret:
                      dates:
                        start: '2021-10-22T11:23:36+00:00'
                        end:
                      meta: [ ]
                      state: BASIC
                      status: ACTIVE
                      dateCreated: '2021-10-22T11:23:36+00:00'
                      lastUpdated: '2021-10-22T11:23:36+00:00'
                      mobileWallet: null
                    - identityId: '85301'
                      walletId: '189066'
                      type: BASIC_CARD
                      friendlyName:
                      value: identityValue_1978067984
                      safeValue:
                      secret:
                      dates:
                        start: '2021-10-22T11:23:36+00:00'
                        end:
                      meta: [ ]
                      state: BASIC
                      status: ACTIVE
                      dateCreated: '2021-10-22T11:23:36+00:00'
                      lastUpdated: '2021-10-22T11:23:36+00:00'
                      mobileWallet: null
                  accounts:
                    campaign:
                      total: 2
                      results:
                        - accountId: '162020'
                          walletId: '189066'
                          campaignId: '12619'
                          type: ECOUPON
                          clientType:
                          status: ACTIVE
                          state: BASIC
                          dates:
                            start: '2021-10-23T00:00:00+00:00'
                            end: '2021-11-22T00:00:00+00:00'
                          meta: [ ]
                          dateCreated: '2021-10-22T11:23:36+00:00'
                          lastUpdated: '2021-10-22T11:23:36+00:00'
                          overrides: [ ]
                          balances:
                            available: 0
                            refundable: 0
                          relationships: [ ]
                          mobileWallet: null
                        - errorCode: NF
                          errorMessage: >-
                            Campaign not found
                      successful:
                        total: 1
                        results:
                          - accountId: '162020'
                            walletId: '189066'
                            campaignId: '12619'
                            type: ECOUPON
                            clientType:
                            status: ACTIVE
                            state: BASIC
                            dates:
                              start: '2021-10-23T00:00:00+00:00'
                              end: '2021-11-22T00:00:00+00:00'
                            meta: [ ]
                            dateCreated: '2021-10-22T11:23:36+00:00'
                            lastUpdated: '2021-10-22T11:23:36+00:00'
                            overrides: [ ]
                            balances:
                              available: 0
                              refundable: 0
                            relationships: [ ]
                            mobileWallet: null
                      failed:
                        total: 1
                        results:
                          - errorCode: NF
                            errorMessage: >-
                              Campaign not found
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/childAndParentAccounts:
    get:
      summary: Get Active Child and Parent Wallet Accounts by a Child Identity Value
      operationId: getChildAndParentAccountsWalletAccountsByChildIdentityValue
      description: >-
        This API method allows the calling application to retrieve up to 100 active wallet accounts by wallet
        identity Value. If that wallet has a parent (household) then up to 100 active parent wallet accounts
        will also be retrieved, merged into ascending accountId order with the child accounts.
      parameters:
        - name: identityValue
          in: query
          required: true
          description: Child Wallet Identity value
          schema:
            type: string
            format: string
      tags:
        - Services
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  total:
                    type: integer
                    format: int32
                    description: Total Results
                  results:
                    type: array
                    description: Array of walletAccountEntities
                    items:
                      allOf:
                        - $ref: '#/components/schemas/walletAccountEntity'
                        - $ref: '#/components/schemas/include'
            request:
              examples:
                response:
                  value:
                    identityValue: john.doe@domain.org
            response:
              examples:
                response:
                  value:
                    payload:
                      total: 2
                      results:
                        - accountId: '61583'
                          relationships: {}
                          walletId: '75875'
                          campaignId: '165'
                          type: POINTS
                          clientType: RETAIL
                          status: ACTIVE
                          state: AWAITING_LOAD
                          dates:
                            start: '2017-01-17T13:21:35+00:00'
                            end: '2038-01-19T03:14:07+00:00'
                          meta:
                            someKey: someValue
                          dateCreated: '2017-01-19T13:21:35+00:00'
                          lastUpdated: '2017-01-19T13:21:35+00:00'
                          balances:
                            current: 0
                            usable: 0
                            locked: 0
                            lifetime: 0
                        - accountId: '61581'
                          relationships: {}
                          walletId: '75875'
                          campaignId: '756'
                          type: PLASTIC
                          status: ACTIVE
                          state: AVAILABLE
                          dates:
                            start: '2017-01-17T13:21:24+00:00'
                            end: '2018-01-17T13:21:30+00:00'
                          meta:
                            key1: key1
                            key2: key1
                          dateCreated: '2017-01-18T13:21:30+00:00'
                          lastUpdated: '2017-01-18T13:21:30+00:00'
                          balances:
                            available: 100
                            refundable: 100
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/transaction:
    put:
      summary: Update a Wallet Transaction by Transaction Reference
      deprecated: true
      operationId: updateWalletTransactionServiceByReference
      description: >-
        This API method allows the calling application to update a transaction
        using the transaction reference if it has already been released, and at
        the same time will lock the specified accounts in preparation for the
        given account transactions.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletTransactionReference'
      requestBody:
        $ref: '#/components/requestBodies/walletTransactionServicesUpdatePayload'
      tags:
        - Services
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                    body:
                      parentWalletTransactionId: '0'
                      identityId: '51632'
                      meta:
                        key1: Value1
                      accountTransactions:
                        - accountId: '16287857'
                          transaction: redeem
                          payload: {}
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      location:
                        storeId: '0576'
                        storeParentId: '300'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: ACTIVE
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '16287857'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:4000:00'
                      lastUpdated: '2017-01-17T13:21:4000:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction:
    post:
      summary: Create a Wallet Transaction
      deprecated: true
      operationId: createWalletTransactionService
      description: >-
        This API method allows the calling application to create a transaction
        against a specific wallet, and at the same time will lock the specified
        accounts in preparation for the given account transactions.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletTransactionServicesCreationPayload'
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.CREATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75859
                    body:
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accountTransactions:
                        - accountId: '16287857'
                          transaction: redeem
                          payload: {}
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      location:
                        storeId: '0576'
                        storeParentId: '300'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: ACTIVE
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '16287857'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/{transactionId}/settle:
    patch:
      summary: Settle a Wallet Transaction using a WalletId and a TransactionId
      deprecated: true
      operationId: settleWalletTransactionServiceByTransactionId
      description: >-
        This API method allows the calling application to settle a wallet
        transaction using a specific walletId and transactionId, processing the
        accounts attached to the transaction and performing the necessary
        actions to settle the wallet transaction.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      requestBody:
        $ref: '#/components/requestBodies/walletTransactionServicesSettlePayload'
      tags:
        - Services
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.SETTLE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountEntity
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountTransactionEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    body:
                      location:
                        storeId: '0576'
                        storeParentId: '300'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: SETTLED
                      meta:
                        key1: Value1
                      state: SETTLED
                      accounts:
                        - accountId: '16287857'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/transaction/settle:
    patch:
      summary: Settle a Wallet Transaction using a Transaction Reference
      deprecated: true
      operationId: settleWalletTransactionServiceByTransactionReference
      description: >-
        This API method allows the calling application to settle a transaction
        using a transaction reference, processing the accounts attached to the
        transaction and performing the necessary actions to complete the wallet
        transaction.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletTransactionReference'
      requestBody:
        $ref: '#/components/requestBodies/walletTransactionServicesSettlePayload'
      tags:
        - Services
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.SETTLE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountEntity
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountTransactionEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                    body:
                      location:
                        storeId: '0576'
                        storeParentId: '300'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: SETTLED
                      meta:
                        key1: Value1
                      state: SETTLED
                      accounts:
                        - accountId: '16287857'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/{transactionId}/release:
    patch:
      summary: Release a Wallet Transaction using a WalletId and a TransactionId
      deprecated: true
      operationId: releaseWalletTransactionServiceByTransactionId
      description: >-
        This API method allows the calling application to release a wallet
        transaction using a specific walletId and transactionId, processing the
        accounts attached to the transaction and removing them from the
        transaction so they can be used elsewhere, while also leaving the wallet
        transaction active to be reused.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletTransactionServicesReleasePayload'
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.RELEASE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountEntity
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountTransactionEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    body:
                      location:
                        storeId: '0576'
                        storeParentId: '300'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: ACTIVE
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '16287857'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/transaction/release:
    patch:
      summary: Release a Wallet Transaction using a Transaction Reference
      deprecated: true
      operationId: releaseWalletTransactionServiceByTransactionReference
      description: >-
        This API method allows the calling application to release a transaction
        using a transaction reference, processing the accounts attached to the
        transaction and removing them from the transaction so they can be used
        elsewhere, while also leaving the wallet transaction active to be
        reused.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletTransactionReference'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletTransactionServicesReleasePayload'
        description: JSON payload
      tags:
        - Services
      responses:
        '200':
          description: Released
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.RELEASE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountEntity
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountTransactionEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                    body:
                      location:
                        storeId: '0576'
                        storeParentId: '300'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: ACTIVE
                      meta:
                        key1: Value1
                      state: ACTIVE
                      accounts:
                        - accountId: '16287857'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/{transactionId}/cancel:
    patch:
      summary: Cancel a Wallet Transaction using a WalletId and a TransactionId
      deprecated: true
      operationId: cancelWalletTransactionServiceByTransactionId
      description: >-
        This API method allows the calling application to cancel a wallet
        transaction using a specific walletId and transactionId, processing the
        accounts attached to the transaction and removing them from the
        transaction so they can be used elsewhere, then finally cancelling the
        wallet transaction so that it cannot be reused.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletTransactionId'
      requestBody:
        $ref: '#/components/requestBodies/walletTransactionServicesCancelPayload'
      tags:
        - Services
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.CANCEL
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountEntity
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountTransactionEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    body:
                      location:
                        storeId: '0576'
                        storeParentId: '300'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: CANCELLED
                      meta:
                        key1: Value1
                      state: CANCELLED
                      accounts:
                        - accountId: '16287857'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/transaction/cancel:
    patch:
      summary: Cancel a Wallet Transaction using a Transaction Reference
      deprecated: true
      operationId: cancelWalletTransactionServiceByTransactionReference
      description: >-
        This API method allows the calling application to cancel a transaction
        using a transaction reference, processing the accounts attached to the
        transaction and removing them from the transaction so they can be used
        elsewhere, then finally cancelling the wallet transaction so that it
        cannot be reused.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletTransactionReference'
      requestBody:
        $ref: '#/components/requestBodies/walletTransactionServicesCancelPayload'
      tags:
        - Services
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.CANCEL
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountEntity
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
                    description: one item for each updated walletAccountTransactionEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletTransactionEntity'
            request:
              examples:
                response:
                  value:
                    reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                    body:
                      location:
                        storeId: '0576'
                        storeParentId: '300'
            response:
              examples:
                response:
                  value:
                    payload:
                      walletTransactionId: '24932'
                      parentWalletTransactionId: '0'
                      walletId: '75859'
                      reference: 9D6183BE4E8AD946D2AD47D271F1C41A
                      identityId: '51632'
                      type: SETTLE
                      status: CANCELLED
                      meta:
                        key1: Value1
                      state: CANCELLED
                      accounts:
                        - accountId: '16287857'
                          accountTransactionId: '129106'
                      basket:
                        contents:
                          - UPC: SKU1744
                            calculatedPrice: 700
                            qualifyingPrice: 700
                            quantity: 1
                            sale: true
                        summary:
                          itemCount: 1
                          totalCalculatedPrice: 700
                          totalQualifyingPrice: 700
                          totalTaxAmount: 0
                          pointsCredited: 200
                          pointsRedeemed: 0
                          pointsRefunded: 0
                          basketTransactionId: 9D6183BE4E8AD946D2AD47D271F1C41A
                        payment:
                          - cardNumberHash: 833D53C0D3AF911948C38F237FD6886F
                            PCFTender: false
                            type: DEBITCARD
                            amount: 700
                      channel: pos2
                      location:
                        storeId: '0576'
                        storeParentId: '300'
                      dateCreated: '2017-01-17T13:21:40+00:00'
                      lastUpdated: '2017-01-17T13:21:40+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/campaign/{campaignId}/account:
    post:
      summary: Create Coupon
      operationId: createWalletCampaignAccount
      description: >-
        This API method allows the calling application to create a coupon
        account and place into the corresponding wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirCampaignId'
        - name: relatedAccounts
          in: query
          required: false
          description: Show all related accounts created with that account
          schema:
            type: boolean
            format: string
            default: false
        - $ref: '#/components/parameters/eesTokens'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletAccountBaseCreationPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.CREATE.CAMPAIGN
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountEntity'
              examples:
                '201 - Basic Example':
                  value:
                    accountId: '234'
                    walletId: '123'
                    campaignId: '777'
                    type: ECOUPON
                    clientType:
                    status: ACTIVE
                    state: BASIC
                    dates:
                      start: '2023-04-28T08:20:10+00:00'
                      end: '2038-01-19T03:14:07+00:00'
                    meta: [ ]
                    dateCreated: '2023-04-28T08:20:10+00:00'
                    lastUpdated: '2023-04-28T08:20:10+00:00'
                    overrides: [ ]
                    balances:
                      available: 0
                      refundable: 0
                    relationships: [ ]
                    mobileWallet: 'https://mobile.wallet.com/passbook/account/41827/125c62a502755b96bbd4497e39e6249c71'
                '201 - Example With Tokens':
                  value:
                    accountId: '200'
                    walletId: '123'
                    campaignId: '777'
                    type: ECOUPON
                    clientType:
                    status: ACTIVE
                    state: BASIC
                    dates:
                      start: '2023-04-28T08:20:10+00:00'
                      end: '2038-01-19T03:14:07+00:00'
                    meta: [ ]
                    dateCreated: '2023-04-28T08:20:10+00:00'
                    lastUpdated: '2023-04-28T08:20:10+00:00'
                    overrides: [ ]
                    balances:
                      available: 0
                      refundable: 0
                    relationships: [ ]
                    mobileWallet: 'https://mobile.wallet.com/passbook/account/41828/3e573a80f9d48b9019da7ee42d93303396'
                    tokens:
                      -
                        tokenId: '1'
                        accountId: '200'
                        token: KDF960XNF
                        validFrom: '2023-04-28T08:20:10+00:00'
                        validTo: '2038-01-19T03:14:07+00:00'
                        dateCreated: '2023-04-28T08:20:10+00:00'
                        lastUpdated: '2023-04-28T08:20:10+00:00'
                        status: ACTIVE
                        tokenLock:
                          validFrom:
                          validTo:
                    stats: null
                    limits: null
                    relatedAccounts: null
                    createTransaction: null
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/campaigns/accounts:
    post:
      summary: Create Multiple
      operationId: createWalletCampaignsAccounts
      description: >-
        This API method allows the calling application to create one or many
        coupon accounts and place into the corresponding wallet. This API is
        considered a bulk action API so the user should consider performance
        implications of calling this API.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesTokens'
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: >-
                  #/components/schemas/walletCouponAccountCreationPayloadOptionalCampaignTag
              example:
                - status: ACTIVE
                  campaignTag: TEST
                - status: ACTIVE
                  campaignId: "1"
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '201':
          description: The request was successful and a number of accounts created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/multiStatus207AccountEntity'
              examples:
                '201 - Basic Example':
                  value:
                    total: 2
                    results:
                      -
                        accountId: '234'
                        walletId: '123'
                        campaignId: '777'
                        type: ECOUPON
                        clientType:
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2023-04-28T08:20:11+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: [ ]
                        dateCreated: '2023-04-28T08:20:11+00:00'
                        lastUpdated: '2023-04-28T08:20:11+00:00'
                        overrides: [ ]
                        balances:
                          available: 0
                          refundable: 0
                        relationships: [ ]
                        mobileWallet: 'https://mobile.wallet.com/passbook/account/41829/3def5b96514c113a70c592cd4b0ba0'
                      -
                        accountId: '200'
                        walletId: '123'
                        campaignId: '455'
                        type: ECOUPON
                        clientType:
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2023-04-28T08:20:11+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: [ ]
                        dateCreated: '2023-04-28T08:20:11+00:00'
                        lastUpdated: '2023-04-28T08:20:11+00:00'
                        overrides: [ ]
                        balances:
                          available: 0
                          refundable: 0
                        relationships: [ ]
                        mobileWallet: 'https://mobile.wallet.com/passbook/account/41830/78d8f1495e1fb3ee4f90dd976b993'
                    successful:
                      total: 2
                      results:
                        -
                          accountId: '234'
                          walletId: '123'
                          campaignId: '777'
                          type: ECOUPON
                          clientType:
                          status: ACTIVE
                          state: BASIC
                          dates:
                            start: '2023-04-28T08:20:11+00:00'
                            end: '2038-01-19T03:14:07+00:00'
                          meta: [ ]
                          dateCreated: '2023-04-28T08:20:11+00:00'
                          lastUpdated: '2023-04-28T08:20:11+00:00'
                          overrides: [ ]
                          balances:
                            available: 0
                            refundable: 0
                          relationships: [ ]
                          mobileWallet: 'https://mobile.wallet.com/passbook/account/41829/3def5b96514c113a70c592cd4b0'
                        -
                          accountId: '200'
                          walletId: '123'
                          campaignId: '455'
                          type: ECOUPON
                          clientType:
                          status: ACTIVE
                          state: BASIC
                          dates:
                            start: '2023-04-28T08:20:11+00:00'
                            end: '2038-01-19T03:14:07+00:00'
                          meta: [ ]
                          dateCreated: '2023-04-28T08:20:11+00:00'
                          lastUpdated: '2023-04-28T08:20:11+00:00'
                          overrides: [ ]
                          balances:
                            available: 0
                            refundable: 0
                          relationships: [ ]
                          mobileWallet: 'https://mobile.wallet.com/passbook/account/41830/78d8f1495e1fb3ee4f90dd976b9'
                    failed:
                      total: 0
                      results: [ ]
                '201 - Example With Tokens':
                  value:
                    total: 2
                    results:
                      -
                        accountId: '380'
                        walletId: '123'
                        campaignId: '777'
                        type: ECOUPON
                        clientType:
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2023-04-28T08:20:11+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: [ ]
                        dateCreated: '2023-04-28T08:20:11+00:00'
                        lastUpdated: '2023-04-28T08:20:11+00:00'
                        overrides: [ ]
                        balances:
                          available: 0
                          refundable: 0
                        relationships: [ ]
                        mobileWallet: 'https://mobile.wallet.com/passbook/account/41831/dedb1ecb8817d06b162f1f95f931e'
                        tokens:
                          -
                            tokenId: '1'
                            accountId: ''
                            token: QSQ039JFT
                            validFrom: '2023-04-28T08:20:11+00:00'
                            validTo: '2038-01-19T03:14:07+00:00'
                            dateCreated: '2023-04-28T08:20:11+00:00'
                            lastUpdated: '2023-04-28T08:20:11+00:00'
                            status: ACTIVE
                            tokenLock:
                              validFrom:
                              validTo:
                        stats: null
                        limits: null
                        relatedAccounts: null
                        createTransaction: null
                      -
                        accountId: '525'
                        walletId: '123'
                        campaignId: '455'
                        type: ECOUPON
                        clientType:
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2023-04-28T08:20:11+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: [ ]
                        dateCreated: '2023-04-28T08:20:11+00:00'
                        lastUpdated: '2023-04-28T08:20:11+00:00'
                        overrides: [ ]
                        balances:
                          available: 0
                          refundable: 0
                        relationships: [ ]
                        mobileWallet: 'https://mobile.wallet.com/passbook/account/41832/4b0e7da119aea0353c4d3a933f048'
                        tokens:
                          -
                            tokenId: '2'
                            accountId: ''
                            token: ZLQ938VKL
                            validFrom: '2023-04-28T08:20:11+00:00'
                            validTo: '2038-01-19T03:14:07+00:00'
                            dateCreated: '2023-04-28T08:20:11+00:00'
                            lastUpdated: '2023-04-28T08:20:11+00:00'
                            status: ACTIVE
                            tokenLock:
                              validFrom:
                              validTo:
                        stats: null
                        limits: null
                        relatedAccounts: null
                        createTransaction: null
                    successful:
                      total: 2
                      results:
                        -
                          accountId: '380'
                          walletId: '123'
                          campaignId: '777'
                          type: ECOUPON
                          clientType:
                          status: ACTIVE
                          state: BASIC
                          dates:
                            start: '2023-04-28T08:20:11+00:00'
                            end: '2038-01-19T03:14:07+00:00'
                          meta: [ ]
                          dateCreated: '2023-04-28T08:20:11+00:00'
                          lastUpdated: '2023-04-28T08:20:11+00:00'
                          overrides: [ ]
                          balances:
                            available: 0
                            refundable: 0
                          relationships: [ ]
                          mobileWallet: 'https://mobile.wallet.com/passbook/account/41831/dedb1ecb8817d06b162f1f95f93'
                          tokens:
                            -
                              tokenId: '1'
                              accountId: ''
                              token: QSQ039JFT
                              validFrom: '2023-04-28T08:20:11+00:00'
                              validTo: '2038-01-19T03:14:07+00:00'
                              dateCreated: '2023-04-28T08:20:11+00:00'
                              lastUpdated: '2023-04-28T08:20:11+00:00'
                              status: ACTIVE
                              tokenLock:
                                validFrom:
                                validTo:
                          stats: null
                          limits: null
                          relatedAccounts: null
                          createTransaction: null
                        -
                          accountId: '525'
                          walletId: '123'
                          campaignId: '455'
                          type: ECOUPON
                          clientType:
                          status: ACTIVE
                          state: BASIC
                          dates:
                            start: '2023-04-28T08:20:11+00:00'
                            end: '2038-01-19T03:14:07+00:00'
                          meta: [ ]
                          dateCreated: '2023-04-28T08:20:11+00:00'
                          lastUpdated: '2023-04-28T08:20:11+00:00'
                          overrides: [ ]
                          balances:
                            available: 0
                            refundable: 0
                          relationships: [ ]
                          mobileWallet: 'https://mobile.wallet.com/passbook/account/41832/4b0e7da119aea0353c4d3a933f0'
                          tokens:
                            -
                              tokenId: '2'
                              accountId: ''
                              token: ZLQ938VKL
                              validFrom: '2023-04-28T08:20:11+00:00'
                              validTo: '2038-01-19T03:14:07+00:00'
                              dateCreated: '2023-04-28T08:20:11+00:00'
                              lastUpdated: '2023-04-28T08:20:11+00:00'
                              status: ACTIVE
                              tokenLock:
                                validFrom:
                                validTo:
                          stats: null
                          limits: null
                          relatedAccounts: null
                          createTransaction: null
                    failed:
                      total: 0
                      results: [ ]
        '207':
          description: Multi-Status meaning not all the accounts could be created, there will be elements in the "failed" part of the response object
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/multiStatus207AccountEntity'
                example:
                  successful:
                    total: 1
                    results:
                      - accountId: '3334'
                        walletId: '1178'
                        campaignId: '334'
                        type: POINTS
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                  failed:
                    total: 1
                    results:
                      - errorCode: Error Code
                        errorMessage: Error Message
                  results:
                    total: 2
                    results:
                      - accountId: '3334'
                        relationships: []
                        walletId: '1178'
                        campaignId: '334'
                        type: POINTS
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                      - errorCode: Error Code
                        errorMessage: Error Message
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/programme/{programmeId}/account:
    post:
      summary: Create Programme
      operationId: createWalletProgrameAccount
      description: >-
        This API method allows the calling application to create a programme
        stored value account and place into the corresponding wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirProgrammeId'
      requestBody:
        $ref: '#/components/requestBodies/walletAccountBaseCreationPayload'
      tags:
        - Accounts
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.CREATE.PROGRAMME
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75875
                    programmeId: 756
                    body:
                      meta:
                        key1: key1
                        key2: key1
                      details:
                        name: account
                      state: AVAILABLE
                      status: ACTIVE
                      dates:
                        start: '2017-01-17T14:21:24+01:00'
                        end: '2018-01-17T14:21:24+01:00'
                      balances:
                        available: 100
            response:
              examples:
                response:
                  value:
                    payload:
                      accountId: '61581'
                      relationships: {}
                      walletId: '75875'
                      campaignId: '756'
                      type: PLASTIC
                      status: ACTIVE
                      state: AVAILABLE
                      dates:
                        start: '2017-01-17T13:21:24+00:00'
                        end: '2018-01-17T13:21:30+00:00'
                      meta:
                        key1: key1
                        key2: key1
                      overrides: []
                      clientType: 'clientType'
                      dateCreated: '2017-01-18T13:21:30+00:00'
                      lastUpdated: '2017-01-18T13:21:30+00:00'
                      balances:
                        available: 100
                        refundable: 100
                      mobileWallet: null
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/scheme/{schemeId}/account:
    post:
      summary: Create Loyalty
      operationId: createWalletSchemeAccount
      description: >-
        This API method allows the calling application to create
        a loyalty scheme points account and place into the corresponding wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirSchemeId'
      requestBody:
        $ref: '#/components/requestBodies/walletAccountBaseCreationPayload'
      tags:
        - Accounts
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.CREATE.SCHEME
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                  - schema:
                      $ref: '#/components/schemas/tierMembershipEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75875
                    schemeId: 165
                    body:
                      state: AWAITING_LOAD
                      meta:
                        someKey: someValue
            response:
              examples:
                response:
                  value:
                    payload:
                      accountId: '61583'
                      relationships: {}
                      walletId: '75875'
                      campaignId: '165'
                      type: POINTS
                      clientType: RETAIL
                      status: ACTIVE
                      state: AWAITING_LOAD
                      dates:
                        start: '2017-01-17T13:21:35+00:00'
                        end: '2038-01-19T03:14:07+00:00'
                      meta:
                        someKey: someValue
                      dateCreated: '2017-01-19T13:21:35+00:00'
                      lastUpdated: '2017-01-19T13:21:35+00:00'
                      balances:
                        current: 0
                        usable: 0
                        locked: 0
                        lifetime: 0
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/plan/{planId}/account:
    post:
      summary: Create Subscription
      operationId: createWalletPlanAccount
      description: >-
        This API method allows the calling application to create a Subscription
        Account with Entitlement Accounts (arisen from supplied Plan definition)
        and place them into the corresponding Wallet.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirPlanId'
      requestBody:
        $ref: '#/components/requestBodies/walletAccountBaseCreationPayload'
      tags:
        - Accounts
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.CREATE.PLAN
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: CREATE
                    description: >-
                      one item for each successfully created walletAccountEntity
                      (Plan and Entitlement)
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: >-
                      one item for each successfully created
                      walletAccountTransactionEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 3004001
                    planId: 7778
                    body:
                      meta:
                        key: value
                      status: ACTIVE
                      state: AVAILABLE
            response:
              examples:
                response:
                  value:
                    payload:
                      accountId: '300400501'
                      relationships:
                        ENTITLEMENT:
                          ECOUPON:
                            - accountId: '300400502'
                              dateCreated: '2018-06-01T08:00:03+00:00'
                            - accountId: '300400503'
                              dateCreated: '2018-06-01T08:00:03+00:00'
                        OBJECTIVE:
                          CONTINUITY:
                            - accountId: '94'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                          ECOUPON:
                            - accountId: '95'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                            - accountId: '97'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                          STAMP_CARD:
                            - accountId: '93'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                          QUEST:
                            - accountId: '92'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                        OBJECTIVE_OF:
                          QUEST:
                            - accountId: '300400501'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        PROMOTION:
                          ECOUPON:
                            - accountId: '95'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        PROMOTION_OF:
                          MULTI_PROMOTION_COUPON:
                            - accountId: '300400501'
                              dateCreated: '2022-10-20T14:28:28+00:00'
                        BOUNCE_BACK_REWARD:
                          ECOUPON:
                            - accountId: '104'
                              dateCreated: '2022-11-01 16:29:33'
                            - accountId: '97'
                              dateCreated: '2022-11-01 16:29:33'
                          CONTINUITY:
                            - accountId: '94'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                          STAMP_CARD:
                            - accountId: '93'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                          MULTI_PROMOTION_COUPON:
                            - accountId: '160'
                              dateCreated: '2022-10-20T14:28:28+00:00'
                          QUEST:
                            - accountId: '173'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        BOUNCE_BACK_REWARD_OF:
                          ECOUPON:
                            - accountId: '300400501'
                              dateCreated: '2022-11-01 16:31:53'
                          CONTINUITY:
                            - accountId: '122'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                        COUPON_STAMP_REWARD:
                          ECOUPON:
                            - accountId: '108'
                              dateCreated: '2022-11-02 11:18:32'
                            - accountId: '109'
                              dateCreated: '2022-11-02 11:18:33'
                        COUPON_STAMP_REWARD_OF:
                          STAMP_CARD:
                            - accountId: '300400501'
                              dateCreated: '2022-11-02 12:35:22'
                        LOYALTY_POINTS_REWARD_OF:
                          POINTS:
                            - accountId: '300400501'
                              dateCreated: '2022-11-02 14:38:23'
                      walletId: '3004001'
                      campaignId: '7778'
                      type: STANDARD_SUBSCRIPTION
                      status: ACTIVE
                      state: AVAILABLE
                      dates:
                        start: '2018-06-01T08:00:00:00+00:00'
                        end: '2019-05-31T23:59:59+00:00'
                      meta:
                        key: value
                      dateCreated: '2018-06-01T08:00:03+00:00'
                      lastUpdated: '2018-06-01T08:00:03+00:00'
                      balances:
                        available: 0
                        refundable: 0
        '207':
          description: Multi-Status
          x-description: >-
            In case AIR wouldn't be able to successfully perform all requested
            composite operations (i.e. due to optional Entitlement Campaign
            Issuance Window Restriction) than Multi-Status response would be
            returned, informing the calling application what was successfully
            created or updated and what failed.
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.CREATE.PLAN
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: CREATE
                    description: >-
                      one item for each successfully created walletAccountEntity
                      (Plan and Entitlement)
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: >-
                      one item for each successfully created
                      walletAccountTransactionEntity
          content:
            application/json:
              schema:
                type: object
                properties:
                  successful:
                    type: object
                    description: Successfully processed AIR Entities details
                    properties:
                      total:
                        type: integer
                        format: int32
                        description: Successfully processed Entities count
                      results:
                        type: array
                        items:
                          type: object
                  failed:
                    type: object
                    description: Failed operations details
                    properties:
                      total:
                        type: integer
                        format: int32
                        description: Failures item count
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/defaultErrorEntity'
                  results:
                    type: object
                    properties:
                      total:
                        type: integer
                        format: int32
                        description: >-
                          Combined `successful` and `failed` arrays with
                          operation order preserved
                      results:
                        type: array
                        items:
                          type: object
            request:
              examples:
                response:
                  value:
                    walletId: 100200
                    planId: 9922
                    body:
                      meta:
                        key: value
                      status: ACTIVE
                      state: AVAILABLE
            response:
              examples:
                response:
                  value:
                    payload:
                      successful:
                        total: 2
                        results:
                          - accountId: '445566'
                            relationships:
                              ENTITLEMENT:
                                ECOUPON:
                                  - accountId: '300400603'
                                    dateCreated: '2018-06-01T08:00:00+00:00'
                              OBJECTIVE:
                                CONTINUITY:
                                  - accountId: '94'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                ECOUPON:
                                  - accountId: '95'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                  - accountId: '97'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                STAMP_CARD:
                                  - accountId: '93'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                QUEST:
                                  - accountId: '92'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                              PROMOTION:
                                ECOUPON:
                                  - accountId: '95'
                                    dateCreated: '2022-11-01T14:53:07+00:00'
                              BOUNCE_BACK_REWARD:
                                ECOUPON:
                                  - accountId: '104'
                                    dateCreated: '2022-11-01 16:29:33'
                                  - accountId: '97'
                                    dateCreated: '2022-11-01 16:29:33'
                                CONTINUITY:
                                  - accountId: '94'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                STAMP_CARD:
                                  - accountId: '93'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                MULTI_PROMOTION_COUPON:
                                  - accountId: '160'
                                    dateCreated: '2022-10-20T14:28:28+00:00'
                                QUEST:
                                  - accountId: '173'
                                    dateCreated: '2022-11-01T14:53:07+00:00'
                              COUPON_STAMP_REWARD:
                                ECOUPON:
                                  - accountId: '108'
                                    dateCreated: '2022-11-02 11:18:32'
                                  - accountId: '109'
                                    dateCreated: '2022-11-02 11:18:33'
                            walletId: '100200'
                            campaignId: '9922'
                            type: STANDARD_SUBSCRIPTION
                            status: ACTIVE
                            state: AVAILABLE
                            dates:
                              start: '2018-06-08T08:00:00:+00:00'
                              end: '2019-06-07T23:59:59+00:00'
                            meta:
                              key: value
                            dateCreated: '2018-06-08T10:03:03+00:00'
                            lastUpdated: '2018-06-08T10:03:03+00:00'
                            balances:
                              available: 0
                              refundable: 0
                          - accountId: '300400603'
                            relationships:
                              ENTITLEMENT_OF:
                                STANDARD_SUBSCRIPTION:
                                  - accountId: '445566'
                                    dateCreated: '2018-06-01T08:00:03+00:00'
                              OBJECTIVE_OF:
                                QUEST:
                                  - accountId: '445566'
                                    dateCreated: '2022-11-01T14:53:07+00:00'
                              PROMOTION_OF:
                                MULTI_PROMOTION_COUPON:
                                  - accountId: '445566'
                                    dateCreated: '2022-10-20T14:28:28+00:00'
                              BOUNCE_BACK_REWARD_OF:
                                ECOUPON:
                                  - accountId: '445566'
                                    dateCreated: '2022-11-01 16:31:53'
                                CONTINUITY:
                                  - accountId: '122'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                              COUPON_STAMP_REWARD_OF:
                                STAMP_CARD:
                                  - accountId: '445566'
                                    dateCreated: '2022-11-02 12:35:22'
                              LOYALTY_POINTS_REWARD_OF:
                                POINTS:
                                  - accountId: '445566'
                                    dateCreated: '2022-11-02 14:38:23'
                            walletId: '3004002'
                            campaignId: '888884'
                            type: ECOUPON
                            status: ACTIVE
                            state: AVAILABLE
                            dates:
                              start: '2018-06-01T08:00:00:00+00:00'
                              end: '2019-05-31T23:59:59+00:00'
                            meta:
                              key: value
                            dateCreated: '2018-06-06T08:00:03+00:00'
                            lastUpdated: '2018-06-06T08:00:03+00:00'
                            balances:
                              available: 0
                              refundable: 0
                      failed:
                        total: 1
                        results:
                          - errorCode: VUA
                            errorMessage: >-
                              Unable to create new coupon for Campaign 1178
                              (Campaign Issuance Limit reached)
                      results:
                        total: 3
                        results:
                          - accountId: '445566'
                            relationships:
                              ENTITLEMENT:
                                ECOUPON:
                                  - accountId: '300400603'
                                    dateCreated: '2018-06-01T08:00:00+00:00'
                              OBJECTIVE:
                                CONTINUITY:
                                  - accountId: '94'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                ECOUPON:
                                  - accountId: '95'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                  - accountId: '97'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                STAMP_CARD:
                                  - accountId: '93'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                QUEST:
                                  - accountId: '92'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                              PROMOTION:
                                ECOUPON:
                                  - accountId: '95'
                                    dateCreated: '2022-11-01T14:53:07+00:00'
                              BOUNCE_BACK_REWARD:
                                ECOUPON:
                                  - accountId: '104'
                                    dateCreated: '2022-11-01 16:29:33'
                                  - accountId: '97'
                                    dateCreated: '2022-11-01 16:29:33'
                                CONTINUITY:
                                  - accountId: '94'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                STAMP_CARD:
                                  - accountId: '93'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                MULTI_PROMOTION_COUPON:
                                  - accountId: '160'
                                    dateCreated: '2022-10-20T14:28:28+00:00'
                                QUEST:
                                  - accountId: '173'
                                    dateCreated: '2022-11-01T14:53:07+00:00'
                              COUPON_STAMP_REWARD:
                                ECOUPON:
                                  - accountId: '108'
                                    dateCreated: '2022-11-02 11:18:32'
                                  - accountId: '109'
                                    dateCreated: '2022-11-02 11:18:33'
                            walletId: '100200'
                            campaignId: '9922'
                            type: STANDARD_SUBSCRIPTION
                            status: ACTIVE
                            state: AVAILABLE
                            dates:
                              start: '2018-06-08T08:00:00:00+00:00'
                              end: '2019-06-07T23:59:59+00:00'
                            meta:
                              key: value
                            dateCreated: '2018-06-08T10:03:03+00:00'
                            lastUpdated: '2018-06-08T10:03:03+00:00'
                            balances:
                              available: 0
                              refundable: 0
                          - errorCode: VUA
                            errorMessage: >-
                              Unable to create new coupon for Campaign 1178
                              (Campaign Issuance Limit reached)
                          - accountId: '300400603'
                            relationships:
                              ENTITLEMENT_OF:
                                STANDARD_SUBSCRIPTION:
                                  - accountId: '445566'
                                    dateCreated: '2018-06-01T08:00:03+00:00'
                              OBJECTIVE_OF:
                                QUEST:
                                  - accountId: '445566'
                                    dateCreated: '2022-11-01T14:53:07+00:00'
                              PROMOTION_OF:
                                MULTI_PROMOTION_COUPON:
                                  - accountId: '445566'
                                    dateCreated: '2022-10-20T14:28:28+00:00'
                              BOUNCE_BACK_REWARD_OF:
                                ECOUPON:
                                  - accountId: '445566'
                                    dateCreated: '2022-11-01 16:31:53'
                                CONTINUITY:
                                  - accountId: '122'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                              COUPON_STAMP_REWARD_OF:
                                STAMP_CARD:
                                  - accountId: '445566'
                                    dateCreated: '2022-11-02 12:35:22'
                              LOYALTY_POINTS_REWARD_OF:
                                POINTS:
                                  - accountId: '445566'
                                    dateCreated: '2022-11-02 14:38:23'
                            walletId: '3004002'
                            campaignId: '888884'
                            type: ECOUPON
                            status: ACTIVE
                            state: AVAILABLE
                            dates:
                              start: '2018-06-01T08:00:00:00+00:00'
                              end: '2019-05-31T23:59:59+00:00'
                            meta:
                              key: value
                            dateCreated: '2018-06-06T08:00:03+00:00'
                            lastUpdated: '2018-06-06T08:00:03+00:00'
                            balances:
                              available: 0
                              refundable: 0
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{parentAccountId}/campaign/{campaignId}/account:
    post:
      summary: Create Entitlement Coupon
      operationId: createWalletEntitlementCouponAccount
      description: >-
        This API method allows the calling application to create a new
        Entitlement Account (of type COUPON) and link it to existing
        Subscription Account, identified by `parentAccountId`
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirCampaignId'
        - name: parentAccountId
          in: path
          required: true
          description: >-
            Subscription Account ID into which newly created Entitlement Account
            will be linked to
          schema:
            type: string
            format: string
      requestBody:
        $ref: '#/components/requestBodies/walletAccountCreateRelatedPayload'
      tags:
        - Accounts
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.CREATE.CAMPAIGN.PLAN
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 3004001
                    parentAccountId: 300400501
                    campaignId: 77774
                    body:
                      meta:
                        key2: value2
                      status: ACTIVE
                      state: AVAILABLE
            response:
              examples:
                response:
                  value:
                    payload:
                      accountId: '300400677'
                      relationships:
                        ENTITLEMENT_OF:
                          STANDARD_SUBSCRIPTION:
                            - accountId: '300400501'
                              dateCreated: '2018-09-23T16:15:23+00:00'
                        OBJECTIVE_OF:
                          QUEST:
                            - accountId: '300400501'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        PROMOTION_OF:
                          MULTI_PROMOTION_COUPON:
                            - accountId: '300400501'
                              dateCreated: '2022-10-20T14:28:28+00:00'
                        BOUNCE_BACK_REWARD_OF:
                          ECOUPON:
                            - accountId: '300400501'
                              dateCreated: '2022-11-01 16:31:53'
                          CONTINUITY:
                            - accountId: '122'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                        COUPON_STAMP_REWARD_OF:
                          STAMP_CARD:
                            - accountId: '300400501'
                              dateCreated: '2022-11-02 12:35:22'
                        LOYALTY_POINTS_REWARD_OF:
                          POINTS:
                            - accountId: '300400501'
                              dateCreated: '2022-11-02 14:38:23'
                      walletId: '3004001'
                      campaignId: '77774'
                      type: ECOUPON
                      status: ACTIVE
                      state: AVAILABLE
                      dates:
                        start: '2018-06-01T08:00:00:00+00:00'
                        end: '2019-05-31T23:59:59+00:00'
                      meta:
                        key2: value2
                      dateCreated: '2018-09-23T16:15:23+00:00'
                      lastUpdated: '2018-09-23T16:15:23+00:00'
                      balances:
                        available: 0
                        refundable: 0
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/accounts:
    get:
      summary: Get by Wallet Id
      operationId: getWalletAccountsByWalletId
      description: >-
        This API method allows the calling application to retrieve a list of
        Wallet Accounts for a Wallet, identified by Wallet Id.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAccountInclude'
        - name: 'state[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Account State(s). For single
            value square brackets could be omitted.
          schema:
            type: array
            items:
              type: string
        - name: 'status[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Account Status(es). For single
            value square brackets could be omitted.
          schema:
            type: string
            enum:
              - ACTIVE
              - BLOCKED
              - CANCELLED
              - EXPIRED
              - INACTIVE
              - INVALIDATED
              - LOCKED
              - STOLEN
              - USED
        - name: 'type[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Account Type(s). For single
            value square brackets could be omitted.
          schema:
            type: string
            enum:
              - ECOUPON
              - VOUCHER
              - STAMP_CARD
              - PAPER
              - DEBIT
              - PLASTIC
              - POINTS
              - STANDARD_SUBSCRIPTION
              - CONTINUITY
        - name: 'clientType[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Account clientType(s). For
            single value square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'accountId[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Wallet Account Id(s). For
            single value square square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'unitId[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by returning only child Accounts of supplied Unit.
          schema:
            type: string
            format: string
        - name: 'issuerId[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by returning only child Accounts of supplied Issuer.
          schema:
            type: string
            format: string
        - name: 'campaignId[]'
          in: query
          required: false
          description: >-
            Query string allowing to filter out returned results by Campaign Id.
          schema:
            type: array
            items:
              type: string
        - name: validTo
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Account Valid To explicit
            date-time value or date-time range, for range named key attributes
            needs to be provided (validTo[to]=... and/or validTo[from]=...)
          schema:
            type: string
            format: date-time
        - name: validFrom
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Account Valid From explicit
            date-time value or date-time range, for range named key attributes
            needs to be provided (validFrom[to]=... and/or validFrom[from]=...)
          schema:
            type: string
            format: date-time
        - name: dateCreated
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Account Created explicit
            date-time value or date-time range, for range named key attributes
            needs to be provided (dateCreated[to]=... and/or
            dateCreated[from]=...)
          schema:
            type: string
            format: date-time
        - name: lastUpdated
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Account Last Updated explicit
            date-time value or date-time range, for range named key attributes
            needs to be provided (lastUpdated[to]=... and/or
            lastUpdated[from]=...)
          schema:
            type: string
            format: date-time
        - name: campaigns-status
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Campaign Status. Please note
            enum below contains all possible Campaign statuses
          schema:
            type: string
            enum:
              - ACTIVE
              - INACTIVE
              - PENDING
              - EXPIRED
              - DELETED
              - DRAFT
              - REJECTED
              - READY
        - name: tokens
          in: query
          required: false
          description: Show up to 100 active Tokens associated with each account.
          schema:
            type: string
            enum:
              - true
              - false
        - name: passphrase
          in: query
          required: false
          description: Shows passphrase for any tokens returned. n.b this requires tokens to be true.
          schema:
            type: string
            format: boolean
            enum:
              - True
              - False
        - name: limit
          in: query
          required: false
          description: Query string Pagination Limit
          schema:
            type: integer
            format: int32
            maximum: 100
            default: 20
        - name: offset
          in: query
          required: false
          description: Query string Pagination Offset
          schema:
            type: integer
            format: int32
            default: 0
        - name: 'orderBy[]'
          in: query
          required: false
          description: >-
            Query string for controlling Paginated Results Sorting Order. Please
            note this query string needs to be constructed from field name +
            comma sign and sorting order (ASC/DESC). Currently AIR supports
            sorting by keys: `accountId`, `validFrom`, `validTo`, `dateCreated`,
            `lastUpdated`
          schema:
            type: string
            format: string
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  limit:
                    type: integer
                    format: int32
                    description: Results per page
                  total:
                    type: integer
                    format: int32
                    description: Total Results
                  offset:
                    type: integer
                    format: int32
                    description: Pagination Offset
                  orderBy:
                    type: array
                    description: Order by criteria.
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Field name used as a sorting key
                        order:
                          type: string
                          description: Sorting direction.
                          enum:
                            - ASC
                            - DESC
                  results:
                    type: array
                    description: Array of walletAccountEntities
                    items:
                      allOf:
                        - $ref: '#/components/schemas/walletAccountEntity'
                        - $ref: '#/components/schemas/include'
            request:
              examples:
                response:
                  value:
                    walletId: 75875
                    status: ACTIVE
                    limit: 2
                    orderBy:
                      - 'dateCreated,DESC'
            response:
              examples:
                response:
                  value:
                    payload:
                      limit: 2
                      total: 3
                      offset: 0
                      filter:
                        status: ACTIVE
                      orderBy:
                        - name: dateCreated
                          order: DESC
                      results:
                        - accountId: '61583'
                          relationships: {}
                          walletId: '75875'
                          campaignId: '165'
                          type: POINTS
                          clientType: RETAIL
                          status: ACTIVE
                          state: AWAITING_LOAD
                          dates:
                            start: '2017-01-17T13:21:35+00:00'
                            end: '2038-01-19T03:14:07+00:00'
                          meta:
                            someKey: someValue
                          dateCreated: '2017-01-19T13:21:35+00:00'
                          lastUpdated: '2017-01-19T13:21:35+00:00'
                          balances:
                            current: 0
                            usable: 0
                            locked: 0
                            lifetime: 0
                        - accountId: '61581'
                          relationships: {}
                          walletId: '75875'
                          campaignId: '756'
                          type: PLASTIC
                          status: ACTIVE
                          state: AVAILABLE
                          dates:
                            start: '2017-01-17T13:21:24+00:00'
                            end: '2018-01-17T13:21:30+00:00'
                          meta:
                            key1: key1
                            key2: key1
                          dateCreated: '2017-01-18T13:21:30+00:00'
                          lastUpdated: '2017-01-18T13:21:30+00:00'
                          balances:
                            available: 100
                            refundable: 100
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/accounts:
    get:
      summary: Get by Wallet Identity Value
      operationId: getWalletAccountsByIdentityValue
      description: >-
        This API method allows the calling application to retrieve a list of
        Wallet Accounts, for a Wallet identified by Wallet Identity Value.
      parameters:
        - $ref: '#/components/parameters/eesAccountInclude'
        - name: identity-value
          in: query
          required: true
          description: Wallet Identity value
          schema:
            type: string
            format: string
        - name: 'state[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Account State(s). For single
            value square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'status[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Account Status(es). For single
            value square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'type[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Account Type(s). For single
            value square brackets could be omitted.
          schema:
            type: string
            enum:
              - ECOUPON
              - VOUCHER
              - STAMP_CARD
              - PAPER
              - DEBIT
              - PLASTIC
              - POINTS
              - STANDARD_SUBSCRIPTION
              - CONTINUITY
        - name: 'clientType[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Account clientType(s). For
            single value square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'accountId[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by Wallet Account Id(s). For
            single value square square brackets could be omitted.
          schema:
            type: string
            format: string
        - name: 'unitId[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by returning only child Accounts of supplied Unit.
          schema:
            type: string
            format: string
        - name: 'issuerId[]'
          in: query
          required: false
          description: >-
            Query string for Result filtering by returning only child Accounts of supplied Issuer.
          schema:
            type: string
            format: string
        - name: campaignId
          in: query
          required: false
          description: >-
            Query string allowing to filter out returned results by Campaign Id.
          schema:
            type: string
            format: string
        - name: validTo
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Account Valid To explicit
            date-time value or date-time range, for range named key attributes
            needs to be provided (validTo[to]=... and/or validTo[from]=...)
          schema:
            type: string
            format: date-time
        - name: validFrom
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Account Valid From explicit
            date-time value or date-time range, for range named key attributes
            needs to be provided (validFrom[to]=... and/or validFrom[from]=...)
          schema:
            type: string
            format: date-time
        - name: dateCreated
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Account Created explicit
            date-time value or date-time range, for range named key attributes
            needs to be provided (dateCreated[to]=... and/or
            dateCreated[from]=...)
          schema:
            type: string
            format: date-time
        - name: lastUpdated
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Account Last Updated explicit
            date-time value or date-time range, for range named key attributes
            needs to be provided (lastUpdated[to]=... and/or
            lastUpdated[from]=...)
          schema:
            type: string
            format: date-time
        - name: campaign-status
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Campaign Status. Please note
            enum below contains all possible Campaign statuses
          schema:
            type: string
            enum:
              - ACTIVE
              - INACTIVE
              - PENDING
              - EXPIRED
              - DELETED
              - DRAFT
              - REJECTED
              - READY
        - name: tokens
          in: query
          required: false
          description: Show up to 100 active Tokens associated with each account.
          schema:
            type: string
            format: boolean
            enum:
              - 'true'
        - name: limit
          in: query
          required: false
          description: Query string Pagination Limit
          schema:
            type: integer
            format: int32
            maximum: 100
            default: 20
        - name: offset
          in: query
          required: false
          description: Query string Pagination Offset
          schema:
            type: integer
            format: int32
            default: 0
        - name: 'orderBy[]'
          in: query
          required: false
          description: >-
            Query string for controlling Paginated Results Sorting Order. Please
            note this query string needs to be constructed from field name +
            comma sign and sorting order (ASC/DESC). Currently AIR supports
            sorting by keys: `accountId`, `validFrom`, `validTo`, `dateCreated`,
            `lastUpdated`
          schema:
            type: string
            format: string
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  limit:
                    type: integer
                    format: int32
                    description: Results per page
                  total:
                    type: integer
                    format: int32
                    description: Total Results
                  offset:
                    type: integer
                    format: int32
                    description: Pagination Offset
                  filter:
                    type: object
                    description: Filtering Criteria.
                    properties:
                      state:
                        type: string
                      status:
                        type: string
                  orderBy:
                    type: array
                    description: Order by criteria.
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: The sorting key
                        order:
                          type: string
                          description: The sorting direction.
                  results:
                    type: array
                    description: Array of walletAccountEntities
                    items:
                      allOf:
                        - $ref: '#/components/schemas/walletAccountEntity'
                        - $ref: '#/components/schemas/include'
            request:
              examples:
                response:
                  value:
                    identity-value: john.doe@domain.org
                    'status[]': ACTIVE
                    limit: 2
                    'orderBy[]': 'dateCreated,DESC'
            response:
              examples:
                response:
                  value:
                    payload:
                      limit: 2
                      total: 3
                      offset: 0
                      filter:
                        status: ACTIVE
                      orderBy:
                        - name: dateCreated
                          order: DESC
                      results:
                        - accountId: '61583'
                          relationships: {}
                          walletId: '75875'
                          campaignId: '165'
                          type: POINTS
                          clientType: RETAIL
                          status: ACTIVE
                          state: AWAITING_LOAD
                          dates:
                            start: '2017-01-17T13:21:35+00:00'
                            end: '2038-01-19T03:14:07+00:00'
                          meta:
                            someKey: someValue
                          dateCreated: '2017-01-19T13:21:35+00:00'
                          lastUpdated: '2017-01-19T13:21:35+00:00'
                          balances:
                            current: 0
                            usable: 0
                            locked: 0
                            lifetime: 0
                        - accountId: '61581'
                          relationships: {}
                          walletId: '75875'
                          campaignId: '756'
                          type: PLASTIC
                          status: ACTIVE
                          state: AVAILABLE
                          dates:
                            start: '2017-01-17T13:21:24+00:00'
                            end: '2018-01-17T13:21:30+00:00'
                          meta:
                            key1: key1
                            key2: key1
                          dateCreated: '2017-01-18T13:21:30+00:00'
                          lastUpdated: '2017-01-18T13:21:30+00:00'
                          balances:
                            available: 100
                            refundable: 100
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}:
    get:
      summary: Get
      operationId: getWalletAccount
      description: >-
        This API method allows the calling application to retrieve details for a
        Wallet Account.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
        - $ref: '#/components/parameters/eesAccountInclude'
        - $ref: '#/components/parameters/eesTokens'
        - name: limits
          in: query
          required: false
          description: Shows information on the limitations on using the account, this data varies per account type. For example, if it's a coupon account you'll see maxRedemptionsRemaining and perPeriodRedemptionsRemaining.
          schema:
            type: boolean
            format: string
            default: false
        - name: passphrase
          in: query
          required: false
          description: If passed then any tokens returned will have their passphrase included. This should be used with caution as the passphrase is designed to be secret (like a PIN number).
          schema:
            type: boolean
            format: string
            default: false
        - name: relatedAccounts
          in: query
          required: false
          description: >-
            This determines if related accounts are returned in the response.
            A collection of related wallet accounts, categorised by objects such as ECOUPON and CONTINUITY.
            It may also include relationships to other accounts, such as QUEST objects, and is used for multiple accounts.
          schema:
            type: boolean
            format: string
            default: false
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletAccountEntityWithRelatedAccounts'
                  - $ref: '#/components/schemas/include'
            request:
              examples:
                response:
                  value:
                    walletId: 75875
                    accountId: 61581
            response:
              examples:
                response:
                  value:
                    payload:
                      accountId: '61581'
                      relationships: {}
                      walletId: '75875'
                      campaignId: '756'
                      type: PLASTIC
                      status: ACTIVE
                      state: AVAILABLE
                      dates:
                        start: '2017-01-17T13:21:24+00:00'
                        end: '2018-01-17T13:21:30+00:00'
                      meta:
                        key1: key1
                        key2: key1
                      dateCreated: '2017-01-18T13:21:30+00:00'
                      lastUpdated: '2017-01-18T13:21:30+00:00'
                      balances:
                        available: 100
                        refundable: 100
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
    patch:
      summary: Update
      operationId: updateWalletAccount
      description: >-
        This API method allows the calling application to modify a Wallet
        Account.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletAccountPatchPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
                    description: >-
                      one item in atomicOperation array for each modified
                      account within AIR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/credit:
    patch:
      summary: Credit
      operationId: creditWalletAccount
      description: >-
        This API method allows the calling application to credit a Wallet
        Account. Currently available for POINTS and CONTINUITY accounts, along
        with all Stored Value accounts.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountCreditTransactionPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.CREDIT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75888
                    accountId: 61574
                    body:
                      balances:
                        current: 1000
            response:
              examples:
                response:
                  value:
                    payload:
                      accountTransactionId: '129090'
                      parentAccountTransactionId: ''
                      accountId: '61574'
                      event: CREDIT
                      value: 1000
                      source: 1
                      balancesBefore:
                        current: 100
                        lifetime: 0
                      balancesAfter:
                        current: 1100
                        lifetime: 1000
                      transactionDetails: []
                      properties: []
                      dateCreated: '2017-01-17T13:21:21+00:00'
                      lastUpdated: '2017-01-17T13:21:21+00:00'
                      account:
                        accountId: '61574'
                        relationships: {}
                        walletId: '75888'
                        campaignId: '165'
                        type: POINTS
                        clientType: RETAIL
                        status: ACTIVE
                        state: LOADED
                        dates:
                          start: '2017-01-17T13:21:21+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2017-01-17T13:21:21+00:00'
                        lastUpdated: '2017-01-17T13:21:21+00:00'
                        balances:
                          current: 1100
                          usable: 1000
                          locked: 0
                          lifetime: 1000
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/earn:
    patch:
      summary: Earn
      operationId: earnPoints
      description: >-
        This API method allows the calling application to credit Points into
        Wallet Account and create a Wallet Account Transaction (with
        `event=EARN`) within EES AIR. Currently available for POINTS accounts
        only. Please note this endpoint accepts one of two mutually exclusive
        Request Payload structures&#x3a; one with explicit balance structure
        (the calling application need to provides explicit balance names and
        amounts), second one for instructing AIR to credit Points for an Account
        with the amounts calculated by EES AIR (referenced Point Schema Earn
        definitions(s) would be the base for this calculation)
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountEarnTransactionPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.EARN
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request (points calculated by the calling application):
              examples:
                response:
                  value:
                    walletId: 75888
                    accountId: 61574
                    body:
                      balances:
                        current: 1000
            response (points calculated by the calling application):
              examples:
                response:
                  value:
                    payload:
                      accountTransactionId: '129090'
                      parentAccountTransactionId: ''
                      accountId: '61574'
                      event: EARN
                      value: 1000
                      source: 1
                      balancesBefore:
                        current: 100
                        lifetime: 0
                      balancesAfter:
                        current: 1100
                        lifetime: 1000
                      transactionDetails: []
                      properties: []
                      dateCreated: '2017-01-17T13:21:21+00:00'
                      lastUpdated: '2017-01-17T13:21:21+00:00'
                      account:
                        accountId: '61574'
                        relationships: {}
                        walletId: '75888'
                        campaignId: '165'
                        type: POINTS
                        clientType: RETAIL
                        status: ACTIVE
                        state: LOADED
                        dates:
                          start: '2017-01-17T13:21:21+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2017-01-17T13:21:21+00:00'
                        lastUpdated: '2017-01-17T13:21:21+00:00'
                        balances:
                          current: 1100
                          usable: 1000
                          locked: 0
                          lifetime: 1000
            request (points calculated by AIR):
              examples:
                response:
                  value:
                    walletId: 75888
                    accountId: 61574
                    body:
                      totalTransactionValue: 1000
                      rateName: someRateName
                      location:
                        storeId: incomingIdentifier
                        storeParentId: parentIncomingIdentifier
            response (points calculated by AIR):
              examples:
                response:
                  value:
                    accountTransactionId: '220851'
                    parentAccountTransactionId: ''
                    accountId: '61574'
                    account:
                      accountId: '61574'
                      walletId: '75888'
                      campaignId: '2761'
                      type: POINTS
                      status: ACTIVE
                      state: BASIC
                      dates:
                        start: '2019-01-09T15:39:45+00:00'
                        end: '2038-01-19T03:14:07+00:00'
                      meta: []
                      dateCreated: '2019-01-09T15:39:45+00:00'
                      lastUpdated: '2019-01-14T14:20:50+00:00'
                      overrides: []
                      balances:
                        current: 30
                        usable: 30
                        locked: 0
                        lifetime: 30
                        lifetimeSpend: 0
                        lifetimeSpendValue: 0
                      relationships: []
                    event: EARN
                    value: 10
                    source: 1
                    balancesBefore:
                      current: 20
                      lifetime: 20
                    balancesAfter:
                      current: 30
                      lifetime: 30
                    transactionDetails:
                      totalTransactionValue: 1000
                      rateName: someRateName
                      merchant_store_id: incomingIdentifier
                      merchant_parent_store_id: parentIncomingIdentifier
                    properties: []
                    dateCreated: '2019-01-14T14:21:18+00:00'
                    lastUpdated: '2019-01-14T14:21:18+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/debit:
    patch:
      summary: Debit
      operationId: debitWalletAccount
      description: >-
        This API method allows the calling application to debit a Wallet Account
        and create appropriate Account Transaction. Currently available for
        POINTS and CONTINUITY accounts, along with all Stored Value accounts.
        Please note&#58; by default for Loyalty Points Accounts, EES AIR allows
        debits of an amount larger than the account's available balance, which
        would result in a negative balance. This could be mitigated by EES
        Scheme settings&#58;
         * Disable 'allow negative balance'
         * Enable 'AUTOTOPUP' - EES AIR will detect these negative balances and instantly correct them by bringing a balance to zero (and creating a corresponding Account Transaction of type `AUTOTOPUP`).
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
        - name: include
          in: query
          description: >-
            Request optional and additional entities, currently supported&#58;
            Child Account Transactions
          required: false
          schema:
            type: string
            enum:
              - childAccountTransactions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountDebitTransactionPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.DEBIT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: >-
                      One item per each created Account Transaction (please note
                      this would cover negative balance AUTOTOPUP if applicable)
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletAccountTransactionEntity'
                  - type: object
                    properties:
                      included:
                        type: object
                        description: >-
                          This optional Response attribute will be present in a
                          response if the following request parameter
                          `?include=childAccountTransactions` was present in a
                          request and negative balance correction has happened
                        properties:
                          type:
                            type: string
                            description: Include type
                            enum:
                              - childAccountTransaction
                          id:
                            type: string
                            format: string
                            description: EES Account Transaction ID
                          attributes:
                            $ref: >-
                              #/components/schemas/walletAccountTransactionEntity
            request:
              examples:
                response:
                  value:
                    walletId: 75889
                    accountId: 61575
                    body:
                      balances:
                        current: 10
            response:
              examples:
                response:
                  value:
                    payload:
                      accountTransactionId: '129092'
                      parentAccountTransactionId: ''
                      accountId: '61575'
                      event: CREDIT
                      value: 725
                      source: 1
                      balancesBefore:
                        current: 735
                        lifetime: 120
                      balancesAfter:
                        current: 725
                        lifetime: 120
                      transactionDetails: []
                      properties: []
                      dateCreated: '2017-01-17T13:21:21+00:00'
                      lastUpdated: '2017-01-17T13:21:21+00:00'
                      account:
                        accountId: '61575'
                        relationships: {}
                        walletId: '75889'
                        campaignId: '165'
                        type: POINTS
                        clientType: RETAIL
                        status: ACTIVE
                        state: AVAILABLE
                        dates:
                          start: '2017-01-17T13:21:21+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2017-01-17T13:21:21+00:00'
                        lastUpdated: '2017-01-17T13:21:21+00:00'
                        balances:
                          current: 725
                          usable: -10
                          locked: 0
                          lifetime: 120
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/load:
    patch:
      summary: Load
      operationId: loadWalletAccount
      description: >-
        This API method allows the calling application to load a Wallet Account.
        Currently available for Stored Value account types. If the account is
        INACTIVE, the load will activate it by default.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountLoadTransactionPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.LOAD
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75888
                    accountId: 61574
                    body:
                      balances:
                        available: 1000
                      autoActivateOnLoad: true
            response:
              examples:
                response:
                  value:
                    payload:
                      accountTransactionId: '129090'
                      parentAccountTransactionId: ''
                      accountId: '61574'
                      event: LOAD
                      value: 1000
                      source: 1
                      balancesBefore:
                        available: 1000
                        refundable: 1000
                      balancesAfter:
                        current: 1100
                        lifetime: 1000
                      transactionDetails: []
                      properties: []
                      dateCreated: '2017-01-17T13:21:21+00:00'
                      lastUpdated: '2017-01-17T13:21:21+00:00'
                      account:
                        accountId: '61574'
                        relationships: {}
                        walletId: '75888'
                        campaignId: '165'
                        type: PLASTIC
                        clientType: RETAIL
                        status: ACTIVE
                        state: AVAILABLE
                        dates:
                          start: '2017-01-17T13:21:21+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2017-01-17T13:21:21+00:00'
                        lastUpdated: '2017-01-17T13:21:21+00:00'
                        balances:
                          available: '1000'
                          refundable: '1000'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/redeem:
    patch:
      summary: Redeem
      operationId: redeemWalletAccount
      description: >-
        This API method allows the calling application to redeem a Coupon using
        a Wallet Account. Currently available for ECOUPON and CONTINUITY
        accounts.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
        - in: query
          name: rewardAccounts
          schema:
            type: string
            default: 'false'
            enum:
              - 'true'
              - 'false'
          description: 'This will determine if reward account transactions or accounts are returned in the response. This is only applicable on redeeming QUEST Objectives, CONTINUITY, and STAMP_CARD accounts.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountRedeemTransactionPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.REDEEM
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/topup:
    patch:
      summary: Top-up
      description: >-
        This API method allows the calling application to top-up a Stored Value
        Wallet Account. A request to top-up an INACTIVE account will fail. A
        request to top-up with a value of zero will be accepted. The value will
        be compared with programme rules.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountBalancesTransactionPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.TOPUP
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75888
                    accountId: 61574
                    body:
                      balances:
                        available: 1000
                      details:
                        merchantId: 9999
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/unredeem:
    patch:
      summary: Unredeem
      description: >-
        This API method allows the calling application to unredeem a Wallet
        Account. Currently available for ECOUPON and CONTINUITY accounts.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountBalancesTransactionPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.UNREDEEM
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/refund:
    patch:
      summary: Refund
      description: >-
        This API method allows the calling application to refund a Wallet
        Account. Currently available for Stored Value.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        $ref: '#/components/requestBodies/accountBalancesTransactionPayload'
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.REFUND
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75888
                    accountId: 61574
                    body:
                      balances:
                        available: 1000
                      details:
                        merchantId: 9999
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/transaction/{accountTransactionId}/void:
    patch:
      summary: Void
      operationId: voidWalletAccountTransaction
      description: >-
        This API method allows the calling application to void the specified
        Wallet Account Transaction. Currently only applicable for CONTINUITY and
        POINTS accounts, along with all stored value accounts.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
        - name: accountTransactionId
          in: path
          required: true
          description: EES AIR Wallet Account Transaction ID
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountLocationDetailsPatchPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.VOID
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
        '207':
          description: Multi-Status
          x-description: >-
            In case AIR wouldn't be able to successfully perform all requested
            composite operations than Multi-Status response would be returned,
            informing the calling application what was successfully created or
            updated and what failed.
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.BLOCK
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: one item for each successfully updated walletAccountEntity
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: >-
                      one item for each successfully created
                      walletAccountTransactionEntity
          content:
            application/json:
              schema:
                type: object
                properties:
                  successful:
                    type: object
                    description: Successfully processed AIR Entities details
                    properties:
                      total:
                        type: integer
                        format: int32
                        description: Successfully processed Entities count
                      results:
                        type: array
                        items:
                          type: object
                  failed:
                    type: object
                    description: Failed operations details
                    properties:
                      total:
                        type: integer
                        format: int32
                        description: Failures item count
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/defaultErrorEntity'
                  results:
                    type: object
                    properties:
                      total:
                        type: integer
                        format: int32
                        description: >-
                          Combined `successfully` and `failed` arrays with
                          operation order preserved
                      results:
                        type: array
                        items:
                          type: object
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/inactivate:
    patch:
      summary: Inactivate
      operationId: inactivateWalletAccount
      description: >-
        This API method allows the calling application to inactivate the specified
        Wallet Account. Currently available for CONTINUITY accounts.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    X-EES-TRANSACTION-ID: external-system-unique-reference-345675
                    walletId: 1000427137
                    accountId: 506991
            response:
              examples:
                response:
                  value:
                    payload:
                      accountTransactionId: '847182'
                      parentAccountTransactionId: ''
                      accountId: '506991'
                      account:
                        accountId: '506991'
                        walletId: '1000427137'
                        campaignId: '100006705'
                        type: CONTINUITY
                        clientType: CONTINUITYOFFER
                        status: INACTIVE
                        state: UNLOADED
                        dates:
                          start: '2017-10-05T00:00:00+00:00'
                          end: '2017-10-12T23:59:00+00:00'
                        meta:
                          propensityscore: '0.142'
                          globalofferid: '1'
                          offerranking: '1'
                          campaignreferencenumber: '20170426'
                          sourcetargetingsystem: MANUAL
                          overrideminimumspend: '0'
                          overridereward: '2000'
                        dateCreated: '2017-10-06T19:48:19+00:00'
                        lastUpdated: '2017-10-12T05:14:44+00:00'
                        balances:
                          totalSpend: 0
                          transactionCount: 0
                      event: INACTIVATE
                      value: 0
                      source: 1
                      balancesBefore:
                        transactionCount: 0
                        totalSpend: 0
                      balancesAfter:
                        transactionCount: 0
                        totalSpend: 0
                      transactionDetails: []
                      properties: []
                      dateCreated: '2017-10-12T05:14:44+00:00'
                      lastUpdated: '2017-10-12T05:14:44+00:00'
                      mobileWallet: null
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/activate:
    patch:
      summary: Activate
      operationId: activateWalletAccount
      description: >-
        This API method allows the calling application to activate a specified
        Wallet Account. Currently available for COUPON, CONTINUITY, POINTS and
        STANDARD_SUBSCRIPTION accounts. Please note this operation would also
        activate all children Accounts (if applicable) and create one or more
        Wallet Account Transactions.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.ACTIVATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: one item for each created walletAccountTransaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/cancel:
    patch:
      summary: Cancel
      operationId: cancelWalletAccount
      description: >-
        This API method allows the calling application to cancel a specified
        account. Currently available for ECOUPON, CONTINUITY and
        STANDARD_SUBSCRIPTION. Please note a) this operation will cancel
        requested Wallet Account (with their Children Accounts if applicable)
        and create one or more Wallet Account Transactions. b) This operation
        can not be undone.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.CANCEL
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: >-
                      one item in atomicOperations array for each created
                      walletAccountTransaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    X-EES-TRANSACTION-ID: external-system-unique-reference-1aa
                    X-CUSTOM-SUBSYSTEM-ID: CRM
                    walletId: 115771275
                    accountId: 95883
            response:
              examples:
                response:
                  value:
                    payload:
                      accountTransactionId: '141107787'
                      parentAccountTransactionId: ''
                      accountId: '115771275'
                      account:
                        accountId: '115771275'
                        relationships: {}
                        walletId: '95883'
                        campaignId: '111107'
                        type: ECOUPON
                        status: CANCELLED
                        dates:
                          start: '2017-10-03T18:06:00+01:00'
                          end: '2017-10-31T18:06:59+00:00'
                        meta: []
                        dateCreated: '2017-10-11T09:40:16+01:00'
                        lastUpdated: '2017-10-11T14:49:28+01:00'
                        balances:
                          available: 0
                          refundable: 0
                      event: CANCEL
                      value: 0
                      source: 1
                      balancesBefore:
                        available: 0
                        refundable: 0
                      balancesAfter:
                        available: 0
                        refundable: 0
                      transactionDetails: []
                      properties: []
                      dateCreated: '2017-10-11T14:49:28+01:00'
                      lastUpdated: '2017-10-11T14:49:28+01:00'
                      mobileWallet: null
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/transactions:
    get:
      summary: Get Account Transactions
      operationId: getWalletAccountTransactions
      description: >-
        This API method allows the calling application to retrieve a paginated
        list of Wallet Account Transactions for a specific Wallet Account.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
        - $ref: '#/components/parameters/eesAccountTransactionInclude'
        - name: event
          in: query
          required: false
          description: >-
            Optional Query parameter for result filtering by Transaction Event
            (Operation)
          schema:
            type: string
            enum:
              - ACTIVATE
              - AUTOTOPUP
              - BALANCE
              - BLOCK
              - CANCEL
              - CLEARBALANCE
              - CREATE
              - CREDIT
              - DEBIT
              - DONATE
              - DONATE_IN
              - EXPIRY
              - GIFT
              - GIFT_IN
              - GOODWILL
              - INACTIVATE
              - INVALIDATE
              - LOAD
              - PERISH
              - REACTIVATE
              - REDEEM
              - REFUND
              - REISSUE
              - RESEND
              - STAMP
              - STOLEN
              - TOPUP
              - TRANSFER
              - TRANSFER_IN
              - UNBLOCK
              - UNEXPIRE
              - UNLOCK
              - UNPERISH
              - UNREDEEM
              - UPDATE
              - UPDATE_PASSPHRASE
              - VERIFY
              - VOID
        - name: dateCreated
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Account Transaction Created
            explicit date-time value or date-time range, for range named key
            attributes needs to be provided (dateCreated[to]=... and/or
            dateCreated[from]=...)
          schema:
            type: string
            format: date-time
        - name: lastUpdated
          in: query
          required: false
          description: >-
            Query string for Result Filtering by Account Transaction Last
            Updated explicit date-time value or date-time range, for range named
            key attributes needs to be provided (lastUpdated[to]=... and/or
            lastUpdated[from]=...)
          schema:
            type: string
            format: date-time
        - name: parentAccountTransactionId
          in: query
          required: false
          description: >-
            Optional Query parameter for result filtering by Parent Account
            Transaction Id
          schema:
            type: string
            format: string
        - name: accountTransactionId
          in: query
          required: false
          description: >-
            Optional Query parameter for result filtering by Account Transaction
            Id
          schema:
            type: string
            format: string
        - name: source
          in: query
          required: false
          description: 'Optional Query parameter for result filtering by Transaction Source'
          schema:
            type: string
            format: string
        - name: orderBy
          in: query
          required: false
          description: 'Query string Order By, allowing to control Result set order.'
          schema:
            type: string
            enum:
              - 'accountTransactionId,ASC'
              - 'accountTransactionId,DESC'
              - 'dateCreated,ASC'
              - 'dateCreated,DESC'
        - name: limit
          in: query
          required: false
          description: Query string Pagination Limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: offset
          in: query
          required: false
          description: Query string Pagination Offset
          schema:
            type: integer
            default: 0
        - name: walletTransactions
          in: query
          required: false
          description: Include wallet transactions in result
          schema:
            type: boolean
            format: boolean
            enum:
              - true
              - false
            default: false
      tags:
        - Account Transactions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  limit:
                    type: integer
                    description: Results per page
                  total:
                    type: integer
                    description: Total Results
                  offset:
                    type: integer
                    description: Offset
                  orderBy:
                    type: array
                    description: Order by criteria.
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: The sorting key
                        order:
                          type: string
                          description: The sorting direction.
                  results:
                    type: array
                    description: Array of walletAccountTransactionEntities
                    items:
                      allOf:
                        - $ref: '#/components/schemas/walletAccountTransactionEntity'
                        - $ref: '#/components/schemas/accountTransactionInclude'
            request:
              examples:
                response:
                  value:
                    walletId: 20376460
                    accountId: 145315974
                    event:
                      - REDEEM
                      - UNREDEEM
                    orderBy:
                      - 'dateCreated,DESC'
                    limit: 30
            response:
              examples:
                response:
                  value:
                    payload:
                      total: 2
                      orderBy:
                        - name: dateCreated
                          order: DESC
                      limit: 30
                      offset: 0
                      results:
                        - accountTransactionId: '212217918'
                          parentAccountTransactionId: ''
                          accountId: '145315974'
                          account:
                            accountId: '145315974'
                            relationships: {}
                            walletId: '20376460'
                            campaignId: '111114'
                            type: ECOUPON
                            status: ACTIVE
                            dates:
                              start: '2018-03-30T00:00:00+01:00'
                              end: '2018-06-23T23:59:59+01:00'
                            meta: []
                            dateCreated: '2018-03-29T16:58:12+01:00'
                            lastUpdated: '2018-04-06T15:53:11+01:00'
                            balances:
                              available: 0
                              refundable: 0
                          event: UNREDEEM
                          value: 0
                          source: 1
                          balancesBefore:
                            available: 0
                            refundable: 0
                          balancesAfter:
                            available: 0
                            refundable: 0
                          transactionDetails:
                            operatorId: '1472'
                            reason: Apps testing
                          properties: []
                          dateCreated: '2018-04-06T15:53:11+01:00'
                          lastUpdated: '2018-04-06T15:53:11+01:00'
                        - accountTransactionId: '212200146'
                          parentAccountTransactionId: ''
                          accountId: '145315974'
                          account:
                            accountId: '145315974'
                            relationships: {}
                            walletId: '20376460'
                            campaignId: '111114'
                            type: ECOUPON
                            status: ACTIVE
                            dates:
                              start: '2018-03-30T00:00:00+01:00'
                              end: '2018-06-23T23:59:59+01:00'
                            meta: []
                            dateCreated: '2018-03-29T16:58:12+01:00'
                            lastUpdated: '2018-04-06T15:53:11+01:00'
                            balances:
                              available: 0
                              refundable: 0
                          event: REDEEM
                          value: 0
                          source: 1
                          balancesBefore:
                            available: 0
                            refundable: 0
                          balancesAfter:
                            available: 0
                            refundable: 0
                          transactionDetails: []
                          properties: []
                          dateCreated: '2018-04-04T16:34:35+01:00'
                          lastUpdated: '2018-04-04T16:34:35+01:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/transaction/{accountTransactionId}:
    get:
      summary: Get Account Transactions By Id
      operationId: getWalletAccountTransactionsById
      description: >-
        This API method allows the calling application to retrieve a specific Account Transaction for a Wallet Account.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
        - $ref: '#/components/parameters/eesAirAccountTransactionId'
      tags:
        - Account Transactions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 20376460
                    accountId: 145315974
                    accountTransactionId: 15484851
            response:
              examples:
                response:
                  value:
                    payload:
                      accountTransactionId: '212217918'
                      parentAccountTransactionId: ''
                      accountId: '145315974'
                      account:
                        accountId: '145315974'
                        relationships: {}
                        walletId: '20376460'
                        campaignId: '111114'
                        type: ECOUPON
                        status: ACTIVE
                        dates:
                          start: '2018-03-30T00:00:00+01:00'
                          end: '2018-06-23T23:59:59+01:00'
                        meta: []
                        dateCreated: '2018-03-29T16:58:12+01:00'
                        lastUpdated: '2018-04-06T15:53:11+01:00'
                        balances:
                          available: 0
                          refundable: 0
                      event: UNREDEEM
                      value: 0
                      source: 1
                      balancesBefore:
                        available: 0
                        refundable: 0
                      balancesAfter:
                        available: 0
                        refundable: 0
                      transactionDetails:
                        operatorId: '1472'
                        reason: Apps testing
                      properties: []
                      dateCreated: '2018-04-06T15:53:11+01:00'
                      lastUpdated: '2018-04-06T15:53:11+01:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/block:
    patch:
      summary: Block
      operationId: blockWalletAccount
      description: >-
        This API method allows the calling application to block a specified
        Wallet Account. Currently available for STANDARD_SUBSCRIPTION, ECOUPON,
        VOUCHER, DEBIT and PLASTIC accounts. Please note: a) this operation will
        also suspend Children Accounts of requested Wallet Account (if
        applicable) and create one or more Wallet Account Transactions. b) Only
        Account(s) with `status=ACTIVE` could be blocked
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountLocationDetailsPatchPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.BLOCK
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: >-
                      one item in atomicOperations array for each created
                      walletAccountTransaction
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: >-
                      one item in atomicOperations array for each updated
                      walletAccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    X-EES-TRANSACTION-ID: external-system-unique-reference-1aa
                    X-CUSTOM-SUBSYSTEM-ID: CRM
                    walletId: 115771275
                    accountId: 95883
            response:
              examples:
                response:
                  value:
                    payload:
                      accountTransactionId: '141107787'
                      parentAccountTransactionId: ''
                      accountId: '115771275'
                      account:
                        accountId: '115771275'
                        relationships: {}
                        walletId: '95883'
                        campaignId: '111107'
                        type: ECOUPON
                        status: BLOCKED
                        dates:
                          start: '2017-10-03T18:06:00+01:00'
                          end: '2017-10-31T18:06:59+00:00'
                        meta: []
                        dateCreated: '2017-10-11T09:40:16+01:00'
                        lastUpdated: '2017-10-11T14:49:28+01:00'
                        balances:
                          available: 0
                          refundable: 0
                      event: BLOCK
                      value: 0
                      source: 1
                      balancesBefore:
                        available: 0
                        refundable: 0
                      balancesAfter:
                        available: 0
                        refundable: 0
                      transactionDetails: []
                      properties: []
                      dateCreated: '2017-10-11T14:49:28+01:00'
                      lastUpdated: '2017-10-11T14:49:28+01:00'
                      mobileWallet: null
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/unblock:
    patch:
      summary: Unblock
      operationId: unblockWalletAccount
      description: >-
        This API method allows the calling application to unblock an Account.
        Currently available for STANDARD_SUBSCRIPTION, ECOUPON, VOUCHER, DEBIT
        and PLASTIC Accounts. Please note: a) this operation will also unblock
        Children Accounts of a requested Wallet Account (if applicable) and
        create one or more Wallet Account Transactions. b) Only Account(s) with
        `status=BLOCKED` could be unblocked.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountLocationDetailsPatchPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.UNBLOCK
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: >-
                      one item in atomicOperations array for each created
                      walletAccountTransaction
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: >-
                      one item in atomicOperations array for each updated
                      walletAccount
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    X-CUSTOM-SUBSYSTEM-ID: CRM
                    walletId: 95883
                    accountId: 115771275
            response:
              examples:
                response:
                  value:
                    payload:
                      accountTransactionId: '141107787'
                      parentAccountTransactionId: ''
                      accountId: '115771275'
                      account:
                        accountId: '115771275'
                        relationships: {}
                        walletId: '95883'
                        campaignId: '111107'
                        type: ECOUPON
                        status: ACTIVE
                        dates:
                          start: '2017-10-03T18:06:00+01:00'
                          end: '2017-10-31T18:06:59+00:00'
                        meta: []
                        dateCreated: '2017-10-11T09:40:16+01:00'
                        lastUpdated: '2017-10-11T14:49:28+01:00'
                        balances:
                          available: 0
                          refundable: 0
                      event: UNBLOCK
                      value: 0
                      source: 1
                      balancesBefore:
                        available: 0
                        refundable: 0
                      balancesAfter:
                        available: 0
                        refundable: 0
                      transactionDetails: []
                      properties: []
                      dateCreated: '2017-10-11T14:49:28+01:00'
                      lastUpdated: '2017-10-11T14:49:28+01:00'
                      mobileWallet: null
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/verify:
    post:
      summary: Verify
      description: >-
        This API method allows the calling application to verify a transaction
        against the specified Wallet Account.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountVerifyTransactionPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.VERIFY
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 75888
                    accountId: 61574
                    body:
                      balances:
                        available: 1000
                      details:
                        merchantId: 9999
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/spend:
    patch:
      summary: Spend
      description: >-
        This API method allows the calling application to spend accumulated
        points. Please note a) this endpoint could be used only for Point
        Accounts b) this endpoint also allows to adjust other than `current`
        balance (i.e. `lifetimeSpend` or `lifetimeSpendValue`)
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountSpendTransactionPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.SPEND
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 86553
                    accountId: 16428459
                    body:
                      balances:
                        current: 2
                        lifetimeSpend: 2
                        lifetimeSpendValue: 4
            response:
              examples:
                response:
                  value:
                    payload:
                      accountTransactionId: '1610018'
                      parentAccountTransactionId: ''
                      accountId: '16428459'
                      account:
                        accountId: '16428459'
                        walletId: '86553'
                        campaignId: '32901'
                        type: POINTS
                        status: ACTIVE
                        state: AVAILABLE
                        dates:
                          start: '2018-06-28T09:30:25+01:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2018-06-28T09:30:25+01:00'
                        lastUpdated: '2018-06-28T09:30:25+01:00'
                        balances:
                          current: 98
                          usable: 98
                          locked: 0
                          lifetimeSpend: 1023
                          lifetimeSpendValue: 443
                      event: SPEND
                      value: 2
                      source: 1
                      balancesBefore:
                        current: 100
                        usable: 100
                        lifetimeSpend: 1021
                        lifetimeSpendValue: 443
                      balancesAfter:
                        current: 98
                        usable: 98
                        lifetimeSpend: 1023
                        lifetimeSpendValue: 439
                      transactionDetails:
                        balances: >-
                          {"LIFETIME_SPEND":2,"LIFETIME_SPEND_VALUE":4,"CURRENT":2,"USABLE":2}
                      properties: []
                      dateCreated: '2018-06-28T09:33:05+01:00'
                      lastUpdated: '2018-06-28T09:33:05+01:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/state:
    patch:
      summary: Change State
      description: >-
        This API method allows the calling application to modify a Wallet
        Account state.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        $ref: '#/components/requestBodies/statePatchPayload'
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/accounts/state:
    patch:
      summary: Change State of Multiple Accounts
      description: >-
        This API method allows the calling application to modify the State
        of multiple Accounts in a Wallet
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        $ref: '#/components/requestBodies/multipleStatePatchPayload'
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.UPDATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    description: The total number of Wallet Accounts both successful and unsuccessful.
                  results:
                    type: array
                    description: An array of all of the Wallet Accounts both successful and unsuccessful.
                    items:
                      $ref: '#/components/schemas/walletAccountEntity'
                  successful:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: The total number of successfully updated Wallet Accounts.
                      results:
                        type: array
                        description: An array of the successfully updated Wallet Accounts.
                        items:
                          $ref: '#/components/schemas/walletAccountEntity'
                  failed:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: The total number of Wallet Accounts that failed to update.
                      results:
                        type: array
                        description: An array of the Wallet Accounts that failed to update.
                        items:
                          $ref: '#/components/schemas/walletAccountEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/stats:
    get:
      summary: Get Stats
      description: >-
        Get statistics for wallet account
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: key-value pairs
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        label:
                          type: string
                          example: totalRollingGiftReceived
                        value:
                          type: string
                          example: 100
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/goodwill:
    patch:
      summary: Credit Goodwill Points
      description: >-
        This API method allows the calling application to Credit a Goodwill
        Points to a points Wallet Account. Please note Goodwill rules has to be
        defined for a Scheme.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/goodwillPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.TRANSACTION.CREDIT.GOODWILL
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountTransactionEntity'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/points/available:
    get:
      summary: Retrieve Available Points
      operationId: walletAccountPointsAvailable
      description: >-
        This API method allows calling applications to retrieve detailed information about how a customers points will expire. This end point is only applicable to schemes where Points Expiry is enabled. The response is a date organised list for the dates on which the points expire, and the value of the points on that date.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
        - name: 'orderBy[]'
          in: query
          required: false
          description: >-
            Query string for controlling sort order. Please
            note this query string needs to be constructed from field name +
            comma sign and sorting order (ASC/DESC). Currently AIR supports
            sorting by keys: `validTo`
          schema:
            type: string
            format: string
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  limit:
                    type: integer
                    format: int32
                    description: The maximum number of transactions that were considered.
                  total:
                    type: integer
                    format: int32
                    description: Total number of results in this response.
                  totalRecords:
                    type: integer
                    format: int32
                    description: Total number of records used to calculate the results.
                  offset:
                    type: integer
                    format: int32
                    description: Pagination Offset
                  orderBy:
                    type: array
                    description: Order by criteria.
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Field name used as a sorting key
                        order:
                          type: string
                          description: Sorting direction.
                          enum:
                            - ASC
                            - DESC
                  results:
                    type: array
                    description: Array of accountPointsAvailableEntities
                    items:
                      allOf:
                        - $ref: '#/components/schemas/accountPointsAvailableEntity'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /scheme/{schemeId}/earn/calculate:
    get:
      summary: Calculate Points Earned
      operationId: calculatePointsToBeEarned
      description: >-
        This API method allows the calling application to request an amount of
        points calculation (how much points should be credited for that
        `potential transaction`). EES AIR will use Scheme Earn definitions, take
        into account what is the Total Transaction Value, where this transaction
        would happen (which Client Location) or which Rate should be used for
        that calculation and return proposed points amount.
      tags:
        - Accounts
      parameters:
        - $ref: '#/components/parameters/eesAirSchemeId'
        - name: totalTransactionValue
          in: query
          required: true
          description: >-
            The monetary value of the transaction to base the earn calculation
            on, denominated to the smallest currency unit
          schema:
            type: integer
            format: int64
        - name: 'location[storeId]'
          in: query
          required: false
          description: >-
            The incoming identifier of the store. If provided, it will be used
            by EES AIR to find a specific earn rate for a specific location. If
            not provided, the caller unit (arisen from used API key) will be
            used to find earn rate information. In both cases, we will also try
            and traverse the hierarchy to find a matching earn rate.
          schema:
            type: string
            format: string
        - name: 'location[storeParentId]'
          in: query
          required: false
          description: >-
            The incoming identifier of the parent store. If passed, it will be
            used by EES AIR to find a specific earn rate for a specific
            location. Please note this parameter would be ignored if no
            `location[storeId]` provided
          schema:
            type: string
            format: string
        - name: rateName
          in: query
          required: false
          description: >-
            If passed, it will instruct EES AIR to use the specific `override`
            rate (not a default one)
          schema:
            type: string
            format: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - totalTransactionValue
                  - rateName
                  - location
                  - balances
                properties:
                  totalTransactionValue:
                    type: integer
                    format: int64
                    description: The value of the transaction used for the calculation
                  rateName:
                    type: string
                    format: string
                    description: The name of the used rate definition
                  location:
                    $ref: '#/components/schemas/locationEntity'
                  balances:
                    type: object
                    required:
                      - current
                    properties:
                      current:
                        type: integer
                        format: int64
                        description: >-
                          Points amount suggested by EES AIR based on provided
                          values and existing Scheme Earn Rates definitions
            request:
              examples:
                response:
                  value:
                    totalTransactionValue: 13171
                    'location[storeId]': incomingIdentifier
                    'location[storeParentId]': parentIncomingIdentifier
                    rateName: someRateName
            response:
              examples:
                response:
                  value:
                    payload:
                      totalTransactionValue: 13171
                      rateName: someRateName
                      location:
                        storeId: incomingIdentifier
                        storeParentId: parentIncomingIdentifier
                      balances:
                        current: 15
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/account/{accountId}/refresh:
    patch:
      summary: Refresh
      operationId: refreshWalletAccount
      description: >-
        This API method allows the calling application to bring a Subscription
        Account Entitlement Accounts within a particular wallet up to date with
        current setup of plan and campaigns.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - $ref: '#/components/parameters/eesAirWalletAccountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletAccountRefreshPayload'
        description: JSON payload
        required: true
      tags:
        - Accounts
      responses:
        '200':
          description: Updated
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.REFRESH
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: >-
                      one item for each successfully updated walletAccountEntity
                      (Entitlement)
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
                    description: one item for each successfully updated walletAccountEntity
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: CREATE
                    description: >-
                      one item for each successfully created walletAccountEntity
                      (Entitlement)
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: one item for each successfully created walletAccountEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/walletAccountEntity'
            request:
              examples:
                response:
                  value:
                    walletId: 142183
                    accountId: 121619
                    body:
                      state: BASIC
                      status: ACTIVE
                      dates:
                        start: '2019-08-28 09:06:16'
                        expiry: '2023-01-18 03:14:07'
            response:
              examples:
                response:
                  value:
                    payload:
                      accountId: '121619'
                      walletId: '142183'
                      campaignId: '2337'
                      type: STANDARD_SUBSCRIPTION
                      status: ACTIVE
                      state: BASIC
                      dates:
                        start: '2019-08-27T09:06:16+01:00'
                        end: '2038-01-19T03:14:07+00:00'
                      meta: []
                      dateCreated: '2019-08-27T09:06:16+01:00'
                      lastUpdated: '2019-08-27T09:06:16+01:00'
                      overrides: []
                      balances: []
                      relationships:
                        ENTITLEMENT:
                          ECOUPON:
                            - accountId: '121620'
                              dateCreated: '2019-08-27T09:06:16+01:00'
                        OBJECTIVE:
                          CONTINUITY:
                            - accountId: '94'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                          ECOUPON:
                            - accountId: '95'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                            - accountId: '97'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                          STAMP_CARD:
                            - accountId: '93'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                          QUEST:
                            - accountId: '92'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                        PROMOTION:
                          ECOUPON:
                            - accountId: '95'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        BOUNCE_BACK_REWARD:
                          ECOUPON:
                            - accountId: '104'
                              dateCreated: '2022-11-01 16:29:33'
                            - accountId: '97'
                              dateCreated: '2022-11-01 16:29:33'
                          CONTINUITY:
                            - accountId: '94'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                          STAMP_CARD:
                            - accountId: '93'
                              dateCreated: '2022-10-19T14:49:50+00:00'
                          MULTI_PROMOTION_COUPON:
                            - accountId: '160'
                              dateCreated: '2022-10-20T14:28:28+00:00'
                          QUEST:
                            - accountId: '173'
                              dateCreated: '2022-11-01T14:53:07+00:00'
                        COUPON_STAMP_REWARD:
                          ECOUPON:
                            - accountId: '108'
                              dateCreated: '2022-11-02 11:18:32'
                            - accountId: '109'
                              dateCreated: '2022-11-02 11:18:33'
        '207':
          description: Multi-Status
          x-description: >-
            In case AIR wouldn't be able to successfully perform all requested
            composite operations (i.e. due to optional Entitlement Campaign
            Issuance Window Restriction) than Multi-Status response would be
            returned, informing the calling application what was successfully
            created or updated and what failed.
          x-eventNotifications:
            events:
              - eventName: WALLET.ACCOUNT.REFRESH
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: >-
                      one item for each successfully updated walletAccountEntity
                      (Entitlement)
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
                    description: one item for each successfully updated walletAccountEntity
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: CREATE
                    description: >-
                      one item for each successfully created walletAccountEntity
                      (Entitlement)
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: one item for each successfully created walletAccountEntity
          content:
            application/json:
              schema:
                type: object
                properties:
                  successful:
                    type: object
                    description: Successfully processed AIR Entities details
                    properties:
                      total:
                        type: integer
                        format: int32
                        description: Successfully processed Entities count
                      results:
                        type: array
                        items:
                          type: object
                  failed:
                    type: object
                    description: Failed operations details
                    properties:
                      total:
                        type: integer
                        format: int32
                        description: Failures item count
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/defaultErrorEntity'
                  results:
                    type: object
                    properties:
                      total:
                        type: integer
                        format: int32
                        description: >-
                          Combined `successful` and `failed` arrays with
                          operation order preserved
                      results:
                        type: array
                        items:
                          type: object
            request:
              examples:
                response:
                  value:
                    walletId: 142183
                    accountId: 121619
                    body:
                      state: BASIC
                      status: ACTIVE
                      dates:
                        start: '1998-08-28 09:06:16'
                        expiry: '2038-01-18 03:14:07'
            response:
              examples:
                response:
                  value:
                    payload:
                      total: 2
                      results:
                        - accountId: '121619'
                          walletId: '142183'
                          campaignId: '2337'
                          type: STANDARD_SUBSCRIPTION
                          status: ACTIVE
                          state: BASIC
                          dates:
                            start: '2019-08-27T09:06:16+01:00'
                            end: '2038-01-19T03:14:07+00:00'
                          meta: []
                          dateCreated: '2019-08-27T09:06:16+01:00'
                          lastUpdated: '2019-08-27T09:06:16+01:00'
                          overrides: []
                          balances: []
                          relationships:
                            ENTITLEMENT:
                              ECOUPON:
                                - accountId: '121620'
                                  dateCreated: '2019-08-27T09:06:16+01:00'
                            OBJECTIVE:
                              CONTINUITY:
                                - accountId: '94'
                                  dateCreated: '2022-10-19T14:49:50+00:00'
                              ECOUPON:
                                - accountId: '95'
                                  dateCreated: '2022-10-19T14:49:50+00:00'
                                - accountId: '97'
                                  dateCreated: '2022-10-19T14:49:50+00:00'
                              STAMP_CARD:
                                - accountId: '93'
                                  dateCreated: '2022-10-19T14:49:50+00:00'
                              QUEST:
                                - accountId: '92'
                                  dateCreated: '2022-10-19T14:49:50+00:00'
                            PROMOTION:
                              ECOUPON:
                                - accountId: '95'
                                  dateCreated: '2022-11-01T14:53:07+00:00'
                            BOUNCE_BACK_REWARD:
                              ECOUPON:
                                - accountId: '104'
                                  dateCreated: '2022-11-01 16:29:33'
                                - accountId: '97'
                                  dateCreated: '2022-11-01 16:29:33'
                              CONTINUITY:
                                - accountId: '94'
                                  dateCreated: '2022-10-19T14:49:50+00:00'
                              STAMP_CARD:
                                - accountId: '93'
                                  dateCreated: '2022-10-19T14:49:50+00:00'
                              MULTI_PROMOTION_COUPON:
                                - accountId: '160'
                                  dateCreated: '2022-10-20T14:28:28+00:00'
                              QUEST:
                                - accountId: '173'
                                  dateCreated: '2022-11-01T14:53:07+00:00'
                            COUPON_STAMP_REWARD:
                              ECOUPON:
                                - accountId: '108'
                                  dateCreated: '2022-11-02 11:18:32'
                                - accountId: '109'
                                  dateCreated: '2022-11-02 11:18:33'
                        - errorCode: ISD
                          errorMessage: >-
                            Start date provided by client is wrong: Start date
                            cannot be before campaign start date
                      successful:
                        total: 1
                        results:
                          - accountId: '121619'
                            walletId: '142183'
                            campaignId: '2337'
                            type: STANDARD_SUBSCRIPTION
                            status: ACTIVE
                            state: BASIC
                            dates:
                              start: '2019-08-27T09:06:16+01:00'
                              end: '2038-01-19T03:14:07+00:00'
                            meta: []
                            dateCreated: '2019-08-27T09:06:16+01:00'
                            lastUpdated: '2019-08-27T09:06:16+01:00'
                            overrides: []
                            balances: []
                            relationships:
                              ENTITLEMENT:
                                ECOUPON:
                                  - accountId: '121620'
                                    dateCreated: '2019-08-27T09:06:16+01:00'
                              OBJECTIVE:
                                CONTINUITY:
                                  - accountId: '94'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                ECOUPON:
                                  - accountId: '95'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                  - accountId: '97'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                STAMP_CARD:
                                  - accountId: '93'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                QUEST:
                                  - accountId: '92'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                              PROMOTION:
                                ECOUPON:
                                  - accountId: '95'
                                    dateCreated: '2022-11-01T14:53:07+00:00'
                              BOUNCE_BACK_REWARD:
                                ECOUPON:
                                  - accountId: '104'
                                    dateCreated: '2022-11-01 16:29:33'
                                  - accountId: '97'
                                    dateCreated: '2022-11-01 16:29:33'
                                CONTINUITY:
                                  - accountId: '94'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                STAMP_CARD:
                                  - accountId: '93'
                                    dateCreated: '2022-10-19T14:49:50+00:00'
                                MULTI_PROMOTION_COUPON:
                                  - accountId: '160'
                                    dateCreated: '2022-10-20T14:28:28+00:00'
                                QUEST:
                                  - accountId: '173'
                                    dateCreated: '2022-11-01T14:53:07+00:00'
                              COUPON_STAMP_REWARD:
                                ECOUPON:
                                  - accountId: '108'
                                    dateCreated: '2022-11-02 11:18:32'
                                  - accountId: '109'
                                    dateCreated: '2022-11-02 11:18:33'
                      failed:
                        total: 1
                        results:
                          - errorCode: ISD
                            errorMessage: >-
                              Start date provided by client is wrong: Start date
                              cannot be before campaign start date
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/exchange/pointsreward:
    post:
      summary: Exchange
      operationId: exchange
      description: >-
        This API method allows the calling application to perform a Reward Bank
        exchange. Exchange means a Consumer will receive a specific reward as
        per Rewards Bank definition. For example&#58; receive a two for one
        COUPON in exchange for 150 loyalty points (reward cost), after reaching
        or exceeding 170 points current balance (reward threshold)). If for any
        reasons this operation fails, EES AIR would perform a Rollback
        operation, so Consumer Account's will be restored to the state before
        this API call. Most typical causes why an exchange could fail could be
        linked to Reward's complex configuration (e.g. Campaign's Issuance
        limits or Issuance Windows)

        Returned error code and an error message would explain why this exchange
        call failed.


        Please note&#58;

        * by default for Loyalty Points Accounts, EES AIR allows exchanges of an
        amount larger than the account's available balance, which would result
        in a negative balance. This could be mitigated by EES Scheme
        settings&#58;
          * Disable 'allow negative balance'
          * Enable 'AUTOTOPUP' - EES AIR will detect these negative balances and instantly correct them by bringing a balance to zero (and creating a corresponding Account Transaction of type 'AUTOTOPUP').
        * ROLLBACK would leave traces in EES AIR in the form of VOIDED Wallet
        Transaction and VOIDED Wallet Account Transaction. If for any reasons
        Rollback mechanism fails, this endpoint would return the HTTP 207
        (Multi-Status) header with all details, allowing to rectify this
        situation.  If for any reasons Rollback mechanism fails, this endpoint
        would return the HTTP 207 (Multi-Status) header with all details,
        allowing to rectify this situation.


        If the Reward Bank has an Exchange Limit set against it then the number of exchanges will be checked. The
        call will fail with an `ELE Exchange Limit Exceeded` error if the limit has been reached.
          * For `PUBLIC` Reward Banks the number of exchanges is counted against the calling `walletId`.
          * For `PRIVATE` Reward Banks the number of exchanges is counted against an active Wallet Link for the Reward Bank.


        If multiple active Wallet Links exist between the same Personal Reward Bank and Wallet and are both valid for the same
        Reward then each link can be used up to the Exchange Limit before being marked as `USED`. EES AIR automatically selects
        the link expiring the soonest first, then the link most specific to the Reward being exchanged.
      tags:
        - Services
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/exchangePayload'
        description: JSON payload
        required: true
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICES.WALLET.TRANSACTION.EXCHANGE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: >-
                      Exchange Wallet Account Transaction (e.g. to deduct 170
                      points from loyalty points balance)
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: Reward Account Creation (Wallet Account Transaction)
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '337563'
                  walletId: '1178'
                  reference: An exchange Wallet Transaction reference
                  transactionDateTime: '2019-08-06T12:09:51+00:00'
                  type: EXCHANGE
                  status: SETTLED
                  meta:
                    key: Value
                  state: A_STATE
                  expiryDate: '2019-08-06T12:09:51+00:00'
                  accounts:
                    - accountTransactionId: '3334444553'
                      accountId: '3334'
                      event: EXCHANGE
                      value: 150
                      source: '0'
                      transactionDetails:
                        key1: Key 1 Value
                      balancesBefore:
                        current: 190
                        lifetime: 2250
                      balancesAfter:
                        current: 40
                        lifetime: 2250
                      properties: []
                      dateCreated: '2019-09-16T11:53:08+01:00'
                      lastUpdated: '2019-09-16T11:53:08+01:00'
                      account:
                        accountId: '3334'
                        relationships: []
                        walletId: '1178'
                        campaignId: '334'
                        type: POINTS
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        meta:
                          key1: A Key 1 value
                          key2: A Key 2 value
                        balances:
                          current: 40
                          usable: 40
                          locked: 0
                          lifetime: 2250
                          lifetimeSpend: 2110
                          lifetimeSpendValue: 0
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                    - accountTransactionId: '3334444554'
                      accountId: '7777333'
                      parentAccountTransactionId: '3334444553'
                      event: CREATE
                      value: 0
                      source: '0'
                      transactionDetails:
                        foo: Bar
                      balancesBefore:
                        available: 0
                        refundable: 0
                      balancesAfter:
                        available: 0
                        refundable: 0
                      properties: []
                      dateCreated: '2019-09-16T11:53:08+01:00'
                      lastUpdated: '2019-09-16T11:53:08+01:00'
                      account:
                        accountId: '7777333'
                        relationships: []
                        walletId: '1178'
                        campaignId: '2383'
                        type: COUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        meta:
                          accountMeta1: foo-bar
                        balances:
                          available: 0
                          refundable: 0
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                  channel: A_CHANNEL
                  dateCreated: '2019-09-16T11:53:08+01:00'
                  lastUpdated: '2019-09-16T11:53:08+01:00'
        '207':
          description: Multi-Status
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/multiStatus207Entity'
                example:
                  successful:
                    total: 1
                    results:
                      - accountTransactionId: '3334444553'
                        accountId: '3334'
                        event: EXCHANGE
                        value: 150
                        source: '0'
                        transactionDetails:
                          key1: Key 1 Value
                        balancesBefore:
                          current: 190
                          lifetime: 2250
                        balancesAfter:
                          current: 40
                          lifetime: 2250
                        properties: []
                        dateCreated: '2019-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                        account:
                          accountId: '3334'
                          relationships: []
                          walletId: '1178'
                          campaignId: '334'
                          type: POINTS
                          clientType: A_CLIENT_ACCOUNT_TYPE
                          status: ACTIVE
                          state: A_CLIENT_ACCOUNT_STATE
                          dates:
                            start: '2018-09-16T11:53:08+01:00'
                            end: '2021-12-31T23:59:59+01:00'
                          meta:
                            key1: A Key 1 value
                            key2: A Key 2 value
                          balances:
                            current: 40
                            usable: 40
                            locked: 0
                            lifetime: 2250
                            lifetimeSpend: 2110
                            lifetimeSpendValue: 0
                          dateCreated: '2018-09-16T11:53:08+01:00'
                          lastUpdated: '2019-09-16T11:53:08+01:00'
                  failed:
                    total: 1
                    results:
                      - errorCode: VUA
                        errorMessage: >-
                          Unable to create new coupon for Campaign 1178
                          (Campaign Issuance Limit reached)
                  results:
                    total: 2
                    results:
                      - accountTransactionId: '3334444553'
                        accountId: '3334'
                        event: EXCHANGE
                        value: 150
                        source: '0'
                        transactionDetails:
                          key1: Key 1 Value
                        balancesBefore:
                          current: 190
                          lifetime: 2250
                        balancesAfter:
                          current: 40
                          lifetime: 2250
                        properties: []
                        dateCreated: '2019-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                        account:
                          accountId: '3334'
                          relationships: []
                          walletId: '1178'
                          campaignId: '334'
                          type: POINTS
                          clientType: A_CLIENT_ACCOUNT_TYPE
                          status: ACTIVE
                          state: A_CLIENT_ACCOUNT_STATE
                          dates:
                            start: '2018-09-16T11:53:08+01:00'
                            end: '2021-12-31T23:59:59+01:00'
                          meta:
                            key1: A Key 1 value
                            key2: A Key 2 value
                          balances:
                            current: 40
                            usable: 40
                            locked: 0
                            lifetime: 2250
                            lifetimeSpend: 2110
                            lifetimeSpendValue: 0
                          dateCreated: '2018-09-16T11:53:08+01:00'
                          lastUpdated: '2019-09-16T11:53:08+01:00'
                      - errorCode: VUA
                        errorMessage: >-
                          Unable to create new coupon for Campaign 1178
                          (Campaign Issuance Limit reached)
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/exchange/pointsreward/void:
    patch:
      summary: Void Exchange
      operationId: voidExchange
      description: >-
        This API method allows the calling application to Void a Reward Bank
        exchange transaction using the original Wallet Transaction Reference.
        This operation will reverse the original exchange transaction, crediting
        the points account with the original transaction amount and also cancelling
        the reward associated with the exchange. If there was an exchange limit set
        against the Reward Bank, or the Reward Bank Link, the usage will be decremented
        to allow a further exchange to be made.


        This operation will fail if the Reward associated with the original exchange
        has a status of `USED`. If the Reward has already been cancelled or is otherwise
        no longer valid to reinstate (e.g. `EXPIRED`), the Void Exchange operation will still
        occur and credit points and usage but the Reward will remain in its current state. Additionally
        if an exchange limit has been set against a personal Reward Bank with an expiry and
        the date has passed, the Void Exchange will still occur without reactivating the Reward Bank Link.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - reference
              properties:
                reference:
                  type: string
                  description: Wallet Transaction Reference of the original Exchange.
              example:
                reference: 'exchange222333444'
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.EXCHANGE.VOID
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: VOID
                    description: Void transaction against the points account
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREDIT
                    description: Credit transaction against the points account
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CANCEL
                    description: Cancellation of the account associated with the Reward
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '337563'
                  walletId: '1178'
                  reference: An exchange Wallet Transaction reference
                  transactionDateTime: '2019-08-06T12:09:51+00:00'
                  type: EXCHANGE
                  status: VOIDED
                  meta:
                    key: Value
                  state: A_STATE
                  expiryDate: null
                  accounts:
                    - accountTransactionId: '3334444555'
                      accountId: '3334'
                      parentAccountTransactionId: '3334444553'
                      event: VOID
                      value: 150
                      source: '0'
                      transactionDetails:
                        key1: Key 1 Value
                      balancesBefore:
                        current: 190
                        lifetime: 2250
                      balancesAfter:
                        current: 190
                        lifetime: 2250
                      properties: [ ]
                      dateCreated: '2019-09-16T11:53:08+01:00'
                      lastUpdated: '2019-09-16T11:53:08+01:00'
                      account:
                        accountId: '3334'
                        relationships: [ ]
                        walletId: '1178'
                        campaignId: '334'
                        type: POINTS
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        meta:
                          key1: A Key 1 value
                          key2: A Key 2 value
                        balances:
                          current: 40
                          usable: 40
                          locked: 0
                          lifetime: 2250
                          lifetimeSpend: 2110
                          lifetimeSpendValue: 0
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                    - accountTransactionId: '3334444556'
                      accountId: '3334'
                      parentAccountTransactionId: '3334444555'
                      event: CREDIT
                      value: 150
                      source: '0'
                      transactionDetails:
                        key1: Key 1 Value
                      balancesBefore:
                        current: 40
                        lifetime: 2250
                      balancesAfter:
                        current: 190
                        lifetime: 2250
                      properties: [ ]
                      dateCreated: '2019-09-16T11:53:08+01:00'
                      lastUpdated: '2019-09-16T11:53:08+01:00'
                      account:
                        accountId: '3334'
                        relationships: [ ]
                        walletId: '1178'
                        campaignId: '334'
                        type: POINTS
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        meta:
                          key1: A Key 1 value
                          key2: A Key 2 value
                        balances:
                          current: 190
                          usable: 190
                          locked: 0
                          lifetime: 2250
                          lifetimeSpend: 2110
                          lifetimeSpendValue: 0
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                    - accountTransactionId: '3334444557'
                      accountId: '7777333'
                      parentAccountTransactionId: '3334444555'
                      event: CANCEL
                      value: 0
                      source: '0'
                      transactionDetails:
                        foo: Bar
                      balancesBefore:
                        available: 0
                        refundable: 0
                      balancesAfter:
                        available: 0
                        refundable: 0
                      properties: [ ]
                      dateCreated: '2019-09-16T11:53:08+01:00'
                      lastUpdated: '2019-09-16T11:53:08+01:00'
                      account:
                        accountId: '7777333'
                        relationships: [ ]
                        walletId: '1178'
                        campaignId: '2383'
                        type: COUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: CANCELLED
                        state: BASIC
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        meta:
                          accountMeta1: foo-bar
                        balances:
                          available: 0
                          refundable: 0
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                  channel: A_CHANNEL
                  dateCreated: '2019-09-16T11:53:08+01:00'
                  lastUpdated: '2019-09-16T11:53:08+01:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/donate:
    post:
      summary: Donate
      operationId: donate
      description: >-
        This API method allows the calling application to perform a Donate
        operation. A Donation means a requested amount from an EES AIR Donor
        Account will be used to credit (transferred-in) into recipient's Account
        within EES AIR. If for any reasons this operation could not be
        completed, EES AIR will perform a Rollback operation. And if successful,
        everything would be restored to the state before this donation call.
        Returned error code and an error message would explain why this
        operation failed. Please note this would leave traces in EES AIR in the
        form of VOIDED Wallet Transaction and VOIDED Wallet Account Transaction.
        If for any reasons Rollback mechanism fails, this endpoint would return
        the HTTP 207 (Multi-Status) header with all details, allowing to rectify
        this situation.
      tags:
        - Services
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/donatePayload'
        description: JSON payload
        required: true
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.TRANSACTION.DONATE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Donor's Wallet Transaction
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Recipient's Wallet Transaction
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: >-
                      Donor's Wallet Account Transaction (e.g. to deduct 170
                      points from loyalty points balance)
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: Recipient's Wallet Account Transaction
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '30734'
                  parentWalletTransactionId: '0'
                  walletId: '121223'
                  reference: D93A79697BD7A7A90F8AD7589D01F556
                  type: DONATION
                  status: SETTLED
                  meta:
                    foo: bar
                  state: SOME_STATE
                  accounts:
                    - accountTransactionId: '169440'
                      parentAccountTransactionId: ''
                      accountId: '169440'
                      account:
                        accountId: '169440'
                        walletId: '121223'
                        campaignId: '165'
                        type: POINTS
                        clientType: RETAIL
                        status: ACTIVE
                        state: LOADED
                        dates:
                          start: '2017-03-02T02:44:01+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta:
                          key1: foo
                        dateCreated: '2017-03-02T02:44:01+00:00'
                        lastUpdated: '2017-03-02T02:44:05+00:00'
                        overrides: []
                        balances:
                          current: 1000
                          usable: 0
                          locked: 0
                          lifetime: 2000
                          lifetimeSpend: 0
                          lifetimeSpendValue: 0
                        relationships: []
                      event: DONATE
                      value: 1000
                      source: 1
                      balancesBefore:
                        current: 2000
                        lifetime: 2000
                      balancesAfter:
                        current: 1000
                        lifetime: 2000
                      transactionDetails: []
                      properties: []
                      dateCreated: '2017-03-02T02:44:03+00:00'
                      lastUpdated: '2017-03-02T02:44:03+00:00'
                  basket:
                    summary:
                      correspondingWalletFriendlyName: friendly name of the taker's Wallet
                  channel: api
                  location:
                    storeId: '0576'
                    storeParentId: '300'
                  dateCreated: '2017-03-02T02:44:03+00:00'
                  lastUpdated: '2017-03-02T02:44:03+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/gift:
    post:
      summary: Gift
      operationId: gift
      description: >-
        This API method allows the calling application to perform a Gift
        operation. A Gift means a specified amount of points from a giver's
        points account will be used to credit a receiver’s points account.
        If for any reason this operation could not be completed, EES AIR will
        perform a rollback operation. If the rollback is successful, everything
        would be restored to the state before this Gift operation. An error
        message would be returned explaining why this operation failed.
        Please note that a rollback would leave traces in EES AIR in the form
        of a Voided Wallet Transaction and a Voided Account Transaction. If
        for any reason the rollback mechanism fails, this endpoint would return
        the HTTP 207 (Multi-Status) header with all details.
      tags:
        - Services
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/giftPayload'
        description: JSON payload
        required: true
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: WALLET.TRANSACTION.GIFT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Gifter's Wallet Transaction
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: Recipient's Wallet Transaction
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: >-
                      Gifter's Wallet Account Transaction (e.g. to deduct 170
                      points from loyalty points balance)
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: Recipient's Wallet Account Transaction
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                    description: One item for each successfully updated Wallet Transaction
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: 2312422
                  parentWalletTransactionId: 0
                  walletId: 3
                  reference: 'GIFT_61f7d4dc16b051.11279156'
                  transactionDateTime: 2022-01-31T12:23:56+00:00
                  identityId: null
                  identity: null
                  type: GIFT
                  status: SETTLED
                  meta:
                    parentkey: parentValue
                  state: BASIC
                  expiryDate: null
                  accounts:
                    - accountTransactionId: '46342'
                      parentAccountTransactionId: ''
                      accountId: '90'
                      account:
                        accountId: '90'
                        walletId": '3'
                        campaignId: '13'
                        type: POINTS
                        clientType: RETAIL
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: 2022-01-11T10:26:15+00:00
                          end: 2038-01-19T03:14:07+00:00
                        meta: [ ]
                        dateCreated: 2022-01-11T10:26:15+00:00
                        lastUpdated: 2022-01-31T12:23:34+00:00
                        overrides: [ ]
                        balances:
                          current: 990
                          usable: 990
                          locked: 0
                          lifetime: 1000
                          lifetimeSpend: 0
                          lifetimeSpendValue: 0

                        relationships: [ ]
                      event: GIFT
                      value: 10
                      source: 1
                      balancesBefore:
                        current: 1000
                        lifetime: 0
                      balancesAfter:
                        current: 990
                        lifetime: 0
                      transactionDetails:
                        giftKey: giftValue
                      properties: [ ]
                      dateCreated: 2022-01-31T12:23:56+00:00
                      lastUpdated: 2022-01-31T12:23:56+00:00
                  basket:
                    contents: null
                    summary: null
                    payment: null
                  channel: api
                  location:
                    storeId: null
                    storeParentId: null
                  dateCreated: 2022-01-31T12:23:56+00:00
                  lastUpdated: 2022-01-31T12:23:56+00:00
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/credit:
    post:
      summary: Credit
      operationId: createCreditWalletTransactionService
      description: >-
        This API method allows the calling application to Credit an EES AIR
        Account, Create an Account Transaction and create a CREDIT Wallet
        Transaction
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletTransactionServicesCreditPayload'
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.CREATE.CREDIT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '31984'
                  parentWalletTransactionId: '0'
                  walletId: '158815'
                  reference: CREDIT_5dd3d848a8b063.79269022
                  type: CREDIT
                  status: SETTLED
                  meta:
                    metaFoo: metaBar
                  state: BASIC
                  accounts:
                    - accountTransactionId: '252636'
                      parentAccountTransactionId: ''
                      accountId: '133121'
                      account:
                        accountId: '133121'
                        walletId: '158815'
                        campaignId: '1754'
                        type: POINTS
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2019-11-19T11:53:29+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2019-11-19T11:53:29+00:00'
                        lastUpdated: '2019-11-19T11:53:30+00:00'
                        overrides: []
                        balances:
                          current: 110
                          usable: 110
                          locked: 0
                          lifetime: 110
                          lifetimeSpend: 0
                          lifetimeSpendValue: 0
                        relationships: []
                      event: CREDIT
                      value: 10
                      source: 1
                      balancesBefore:
                        current: 100
                        lifetime: 100
                      balancesAfter:
                        current: 110
                        lifetime: 110
                      transactionDetails:
                        detailsFoo: detailsBar
                      properties: []
                      dateCreated: '2019-11-19T11:55:52+00:00'
                      lastUpdated: '2019-11-19T11:55:52+00:00'
                  basket: {}
                  channel: api
                  location:
                    storeId: '32432'
                  dateCreated: '2019-11-19T11:55:52+00:00'
                  lastUpdated: '2019-11-19T11:55:53+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/spend:
    post:
      summary: Spend
      operationId: createSpendWalletTransactionService
      description: >-
        This API method allows the calling application to Spend from an EES AIR
        Account, Create an Account Transaction and create a SPEND Wallet
        Transaction
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletTransactionServicesSpendPayload'
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.CREATE.SPEND
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '31984'
                  parentWalletTransactionId: '0'
                  walletId: '158815'
                  reference: SPEND_5dd3d848a8b063.79269022
                  type: SPEND
                  status: SETTLED
                  meta:
                    metaFoo: metaBar
                  state: BASIC
                  accounts:
                    - accountTransactionId: '252636'
                      parentAccountTransactionId: ''
                      accountId: '133121'
                      account:
                        accountId: '133121'
                        walletId: '158815'
                        campaignId: '1754'
                        type: POINTS
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2019-11-19T11:53:29+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2019-11-19T11:53:29+00:00'
                        lastUpdated: '2019-11-19T11:53:30+00:00'
                        overrides: []
                        balances:
                          current: 110
                          usable: 110
                          locked: 0
                          lifetime: 110
                          lifetimeSpend: 0
                          lifetimeSpendValue: 0
                        relationships: []
                      event: SPEND
                      value: 10
                      source: 1
                      balancesBefore:
                        current: 100
                        lifetime: 100
                      balancesAfter:
                        current: 110
                        lifetime: 110
                      transactionDetails:
                        detailsFoo: detailsBar
                      properties: []
                      dateCreated: '2019-11-19T11:55:52+00:00'
                      lastUpdated: '2019-11-19T11:55:52+00:00'
                  basket: {}
                  channel: api
                  location:
                    storeId: '32432'
                  dateCreated: '2019-11-19T11:55:52+00:00'
                  lastUpdated: '2019-11-19T11:55:53+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/redeemCredit:
    post:
      summary: Redeem Credit
      operationId: createRedeemCreditWalletTransactionService
      description: >-
        This API method allows the calling application to Redeem a Coupon
        Account and in turn Credit an existing Points Account within an
        individual consumer's wallet. It also creates an Account Transaction for
        each, and creates a REDEEM_CREDIT Wallet Transaction.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/walletTransactionServicesRedeemCreditPayload
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.CREATE.REDEEM_CREDIT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '8'
                  parentWalletTransactionId: '0'
                  walletId: '123'
                  reference: REDEEM_CREDIT_5f16e969dd38c8.26969773
                  transactionDateTime: '2020-07-21T13:11:05+00:00'
                  type: REDEEM_CREDIT
                  status: SETTLED
                  meta:
                    metafoo: metaBar
                  state: BASIC
                  accounts:
                    - accountTransactionId: '388'
                      parentAccountTransactionId: ''
                      accountId: '335'
                      account:
                        accountId: '335'
                        walletId: '123'
                        campaignId: '19'
                        type: ECOUPON
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2020-07-21T13:10:13+00:00'
                          end: '2020-07-27T22:59:00+00:00'
                        meta: []
                        dateCreated: '2020-07-21T13:10:13+00:00'
                        lastUpdated: '2020-07-21T13:10:13+00:00'
                        overrides: []
                        balances:
                          available: 0
                          refundable: 0
                        relationships: []
                      event: REDEEM
                      value: 1000
                      source: 1
                      balancesBefore:
                        available: 0
                        refundable: 0
                      balancesAfter:
                        available: 0
                        refundable: 0
                      transactionDetails:
                        reason: we want to redeem an account
                        merchant_store_id: testOutletUnitIncomingIdentifier
                      properties: []
                      dateCreated: '2020-07-21T13:11:06+00:00'
                      lastUpdated: '2020-07-21T13:11:06+00:00'
                    - accountTransactionId: '389'
                      parentAccountTransactionId: ''
                      accountId: '333'
                      account:
                        accountId: '333'
                        walletId: '123'
                        campaignId: '13'
                        type: POINTS
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2020-07-21T13:09:11+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2020-07-21T13:09:11+00:00'
                        lastUpdated: '2020-07-21T13:09:11+00:00'
                        overrides: []
                        balances:
                          current: 1000
                          usable: 1000
                          locked: 0
                          lifetime: 1000
                          lifetimeSpend: 0
                          lifetimeSpendValue: 0
                        relationships: []
                      event: CREDIT
                      value: 1000
                      source: 1
                      balancesBefore:
                        current: 0
                        lifetime: 0
                      balancesAfter:
                        current: 1000
                        lifetime: 1000
                      transactionDetails:
                        reason: we want to credit an account
                        merchant_store_id: testOutletUnitIncomingIdentifier
                        reasonCode: CREDIT
                      properties: []
                      dateCreated: '2020-07-21T13:11:06+00:00'
                      lastUpdated: '2020-07-21T13:11:06+00:00'
                  basket: {}
                  channel: api
                  location:
                    storeId: testOutletUnitIncomingIdentifier
                    storeParentId: eagleeyetestunit
                  dateCreated: '2020-07-21T13:11:05+00:00'
                  lastUpdated: '2020-07-21T13:11:06+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/goodwill:
    post:
      summary: Create Goodwill Transaction
      operationId: createGoodwillWalletTransactionService
      description: >-
        This API method allows the calling application to perform a Goodwill
        transaction for an EES AIR Account, Create an Account Transaction and
        create a GOODWILL Wallet Transaction
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletTransactionServicesGoodwillPayload'
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.CREATE.GOODWILL
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '31984'
                  parentWalletTransactionId: '0'
                  walletId: '158815'
                  reference: GOODWILL_5dd3d848a8b063.79269022
                  type: GOODWILL
                  status: SETTLED
                  meta:
                    metaFoo: metaBar
                  state: BASIC
                  accounts:
                    - accountTransactionId: '252636'
                      parentAccountTransactionId: ''
                      accountId: '133121'
                      account:
                        accountId: '133121'
                        walletId: '158815'
                        campaignId: '1754'
                        type: POINTS
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2019-11-19T11:53:29+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2019-11-19T11:53:29+00:00'
                        lastUpdated: '2019-11-19T11:53:30+00:00'
                        overrides: []
                        balances:
                          current: 110
                          usable: 110
                          locked: 0
                          lifetime: 110
                          lifetimeSpend: 0
                          lifetimeSpendValue: 0
                        relationships: []
                      event: GOODWILL
                      value: 10
                      source: 1
                      balancesBefore:
                        current: 100
                        lifetime: 100
                      balancesAfter:
                        current: 110
                        lifetime: 110
                      transactionDetails:
                        detailsFoo: detailsBar
                      properties: []
                      dateCreated: '2019-11-19T11:55:52+00:00'
                      lastUpdated: '2019-11-19T11:55:52+00:00'
                  basket: {}
                  channel: api
                  location:
                    storeId: '32432'
                  dateCreated: '2019-11-19T11:55:52+00:00'
                  lastUpdated: '2019-11-19T11:55:53+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/debit:
    post:
      summary: Debit
      operationId: createDebitWalletTransactionService
      description: >-
        This API method allows the calling application to Debit an EES AIR
        Account, Create an Account Transaction and create a DEBIT Wallet
        Transaction. Please note&#58; by default for Loyalty Points Accounts,
        EES AIR allows debits of an amount larger than the account's available
        balance, which would result in a negative balance. This could be
        mitigated by EES Scheme settings&#58;
          * Disable 'allow negative balance'
          * Enable 'autotopup' - EES AIR will detect these negative balances and instantly correct them by bringing a balance to zero (and creating a corresponding Account Transaction of type `AUTOTOPUP`).
        In very, very rare case when for some reason this negative balance
        auto-correction is enabled but it fails, EES AIR would perform an
        automatic `ROLLBACK`.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletTransactionServicesDebitPayload'
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.CREATE.DEBIT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: >-
                      One item for each created Account Transaction (please note
                      this could cover also a negative balance AUTOTOPUP)
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '31984'
                  parentWalletTransactionId: '0'
                  walletId: '158815'
                  reference: DEBIT_434543sdertxd.79269022
                  type: DEBIT
                  status: SETTLED
                  meta:
                    metaFoo: metaBar
                  state: BASIC
                  accounts:
                    - accountTransactionId: '252636'
                      parentAccountTransactionId: ''
                      accountId: '133121'
                      account:
                        accountId: '133121'
                        walletId: '158815'
                        campaignId: '1754'
                        type: POINTS
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2019-11-19T11:53:29+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2019-11-19T11:53:29+00:00'
                        lastUpdated: '2019-11-19T11:53:30+00:00'
                        overrides: []
                        balances:
                          current: 70
                          usable: 70
                          locked: 0
                          lifetime: 110
                          lifetimeSpend: 0
                          lifetimeSpendValue: 0
                        relationships: []
                      event: DEBIT
                      value: 40
                      source: 1
                      balancesBefore:
                        current: 110
                        lifetime: 110
                      balancesAfter:
                        current: 70
                        lifetime: 110
                      transactionDetails:
                        detailsFoo: detailsBar
                      properties: []
                      dateCreated: '2019-11-19T11:55:52+00:00'
                      lastUpdated: '2019-11-19T11:55:52+00:00'
                  basket: {}
                  channel: api
                  location:
                    storeId: '32432'
                  dateCreated: '2019-11-19T11:55:52+00:00'
                  lastUpdated: '2019-11-19T11:55:53+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/transaction/unredeem:
    post:
      summary: Unredeem
      operationId: unredeemWalletTransactionService
      description: >-
        This API method allows the calling application to Unredeem previously
        redeemed EES AIR Account, Create an Account Transaction (of type
        UNREDEEM) and create a UNREDEEM Wallet Transaction
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletTransactionServicesUnredeemPayload'
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.TRANSACTION.UNREDEEM
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '36279'
                  parentWalletTransactionId: '0'
                  walletId: '148414'
                  reference: UNREDEEM_5dfa0e42a17fa9.39576977
                  type: UNREDEEM
                  status: SETTLED
                  meta:
                    metafoo: metaBar
                  state: BASIC
                  accounts:
                    - accountTransactionId: '469997'
                      parentAccountTransactionId: '469993'
                      accountId: '129244'
                      account:
                        accountId: '129244'
                        walletId: '148414'
                        campaignId: '1784'
                        type: ECOUPON
                        status: ACTIVE
                        state: BASIC
                        dates:
                          start: '2019-12-18T10:43:34+00:00'
                          end: '2038-01-19T03:14:07+00:00'
                        meta: []
                        dateCreated: '2019-12-18T10:43:34+00:00'
                        lastUpdated: '2019-12-18T10:52:56+00:00'
                        overrides: []
                        balances:
                          available: 0
                          refundable: 0
                        relationships: []
                      event: UNREDEEM
                      value: 0
                      source: 1
                      balancesBefore:
                        available: 0
                        refundable: 0
                      balancesAfter:
                        available: 0
                        refundable: 0
                      transactionDetails:
                        detailsFoo: detailsBar
                        merchant_store_id: testOutletUnitIncomingIdentifier
                      properties: []
                      dateCreated: '2019-12-18T11:32:18+00:00'
                      lastUpdated: '2019-12-18T11:32:18+00:00'
                  basket: {}
                  channel: api
                  location:
                    storeId: testOutletUnitIncomingIdentifier
                    storeParentId: ''
                  dateCreated: '2019-12-18T11:32:18+00:00'
                  lastUpdated: '2019-12-18T11:32:19+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorMessage: 'Not found: Wallet transaction is cancelled.'
                  errorCode: NF
                  additionalErrors:
                    - errorMessage: Unable to rollback account transaction 470704
                      errorCode: RF
                      details:
                        walletTransactions:
                          - WalletsTransactionId: '36423'
                            parentWalletTransactionId: '0'
                            walletId: '148414'
                            reference: UNREDEEM_5e15a14967eff4.07575054
                            type: UNREDEEM
                            status: CANCELLED
                            meta:
                              metafoo: metaBar
                            state: BASIC
                            accounts: []
                            basket: {}
                            channel: api
                            location:
                              storeId: testOutletUnitIncomingIdentifier
                              storeParentId: ''
                            dateCreated: '2020-01-08T09:30:49+00:00'
                            lastUpdated: '2020-01-08T09:30:49+00:00'
                        accountTransactions:
                          - accountTransactionId: '470704'
                            parentAccountTransactionId: '469993'
                            accountId: '129244'
                            account:
                              accountId: '129244'
                              walletId: '148414'
                              campaignId: '1784'
                              type: ECOUPON
                              status: ACTIVE
                              state: BASIC
                              dates:
                                start: '2019-12-18T10:43:34+00:00'
                                end: '2038-01-19T03:14:07+00:00'
                              meta: []
                              dateCreated: '2019-12-18T10:43:34+00:00'
                              lastUpdated: '2019-12-18T10:52:56+00:00'
                              overrides: []
                              balances:
                                available: 0
                                refundable: 0
                              relationships: []
                            event: UNREDEEM
                            value: 0
                            source: 1
                            balancesBefore:
                              available: 0
                              refundable: 0
                            balancesAfter:
                              available: 0
                              refundable: 0
                            transactionDetails:
                              detailsFoo: detailsBar
                              merchant_store_id: testOutletUnitIncomingIdentifier
                            properties: []
                            dateCreated: '2020-01-08T09:30:50+00:00'
                            lastUpdated: '2020-01-08T09:30:50+00:00'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{victimWalletId}/merge/{survivorWalletId}:
    patch:
      summary: Merge
      operationId: mergeTwoWallets
      description: >-
        This API method allows the calling application to Merge two existing
        Wallets of the same type. All Identities except DELETED from the Victim
        Wallet will be moved to the Survivor Wallet. All Accounts (Coupon,
        Stored Value, Loyalty,  Subscription and Entitlement), except EXPIRED
        and CANCELLED, from the Victim Wallet will be moved to the Survivor
        Wallet. For Stored Value and Loyalty Accounts, if the same Account
        exists in the Survivor Wallet then balances will be transferred into
        appropriate Accounts in the Survivor Wallet. All Invites will be moved
        from the Victim to the Survivor Wallet. All Transactions will be moved
        from the Victim to the Survivor Wallet. No Wallet Consumer changes will
        be made in either wallet. Please note&#58; this endpoint might return a
        207 Error (Multi-Status) in case of some move operation failures (e.g.
        Wallet Config permits only up to two Identities)
      parameters:
        - name: victimWalletId
          in: path
          description: Victim Wallet ID
          required: true
          schema:
            type: string
            format: string
        - name: survivorWalletId
          in: path
          description: Survivor Wallet ID
          required: true
          schema:
            type: string
            format: string
      tags:
        - Services
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.MERGE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: One item for each updated Wallet
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: One item for each updated Account
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: CREATE
                    description: One item for each created Account
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: UPDATE
                    description: One item for each updated Identity
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: CREATE
                    description: One item for each created Identity
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: One item for 6t
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletEntity'
                example:
                  walletId: '10663859'
                  friendlyName: John's Wallet
                  status: ACTIVE
                  type: CONSUMER
                  state: EARNBURN
                  relationships:
                    parent: []
                    child:
                      - '10663858'
                    associate: []
                    donor: []
                  meta:
                    key1: Value1
                    foo: bar
                  dateCreated: '2017-01-03T16:25:58+00:00'
                  lastUpdated: '2017-01-03T16:25:58+00:00'
        '207':
          description: Multi-Status
          x-description: >-
            In case AIR wouldn't be able to successfully perform all merge
            related moves (i.e. due to Wallet Config Restrictions for
            Identities) than the Multi-Status response would be returned,
            informing the calling application what was successfully created or
            updated and what failed.
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.MERGE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletEntity'
                    operationType: UPDATE
                    description: One item for each updated Wallet
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                    description: One item for each updated Account
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: CREATE
                    description: One item for each created Account
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: UPDATE
                    description: One item for each updated Identity
                  - schema:
                      $ref: '#/components/schemas/walletIdentityEntity'
                    operationType: CREATE
                    description: One item for each created Identity
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: One item for 6t
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletEntity'
                example:
                  walletId: '10663859'
                  friendlyName: John's Wallet
                  status: ACTIVE
                  type: CONSUMER
                  state: EARNBURN
                  relationships:
                    parent: []
                    child:
                      - '10663858'
                    associate: []
                    donor: []
                  meta:
                    key1: Value1
                    foo: bar
                  dateCreated: '2017-01-03T16:25:58+00:00'
                  lastUpdated: '2017-01-03T16:25:58+00:00'
            walletId:
              examples:
                response:
                  value: '10663859'
            friendlyName:
              examples:
                response:
                  value: John's Wallet
            status:
              examples:
                response:
                  value: ACTIVE
            type:
              examples:
                response:
                  value: CONSUMER
            state:
              examples:
                response:
                  value: EARNBURN
            relationships:
              examples:
                response:
                  value:
                    parent: []
                    child:
                      - '10663858'
                    associate: []
                    donor: []
            meta:
              examples:
                response:
                  value:
                    key1: Value1
                    foo: bar
            dateCreated:
              examples:
                response:
                  value: '2017-01-03T16:25:58+00:00'
            lastUpdated:
              examples:
                response:
                  value: '2017-01-03T16:25:58+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorMessage: 'Not found: Wallet transaction is cancelled.'
                  errorCode: NF
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/campaign/accounts:
    post:
      summary: Create Campaign Accounts by Identity or WalletId
      operationId: createWalletCampaignsAccountsByIdentityOrWalletId
      description: >-
        This API method allows the calling application to create one or many
        coupon accounts and place them into the wallet by identity value or wallet id.
        Either identity-value or walletId must be provided in query parameters.
        This API is considered a bulk action API so the user should consider performance
        implications of calling this API.
      parameters:
        - name: identity-value
          in: query
          required: false
          description: Wallet Identity Value
          schema:
            type: string
            format: string
        - name: walletId
          in: query
          required: false
          description: EES AIR Wallet ID
          schema:
            type: string
            format: string
        - $ref: '#/components/parameters/eesTokens'
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: >-
                  #/components/schemas/walletCouponAccountCreationPayloadOptionalCampaignReference
              example:
                - status: ACTIVE
                  campaignReference: TEST
                - status: ACTIVE
                  campaignId: "1"
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: The request was successful and a number of accounts created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/multiStatus207AccountEntity'
                example:
                  successful:
                    total: 1
                    results:
                      - accountId: '3334'
                        relationships: [ ]
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                  failed:
                    total: 0
                    results: [ ]
                  results:
                    total: 1
                    results:
                      - accountId: '3334'
                        relationships: [ ]
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                        meta:
                          utm_source: twitter
                          utm_medium: social
                          utm_campaign: Big drink offer
                          utm_term: beer
                          utm_content: Get it now
                        balances:
                          available: 0
                          refundable: 0
                        mobileWallet: null
        '207':
          description: Multi-Status meaning not all the accounts could be created, there will be elements in the "failed" part of the response object
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/multiStatus207AccountEntity'
                example:
                  successful:
                    total: 1
                    results:
                      - accountId: '3334'
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                  failed:
                    total: 1
                    results:
                      - errorCode: Error Code
                        errorMessage: Error Message
                  results:
                    total: 2
                    results:
                      - accountId: '3334'
                        relationships: [ ]
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                      - errorCode: Error Code
                        errorMessage: Error Message
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/campaign/accounts/related:
    post:
      summary: Create Entitlement Coupons by Identity or WalletId
      operationId: createWalletEntitlementCouponAccountsByIdentityOrWalletId
      description: >-
        This API method allows the calling application to create one or many
        Entitlement Account (of type COUPON) and link it to existing
        Subscription Account by identity value or wallet id. 
        Either identity-value or walletId must be provided in query parameters.
        This API is considered a bulk action API so the user should consider 
        performance implications of calling this API.
      parameters:
        - name: identity-value
          in: query
          required: false
          description: Wallet Identity Value
          schema:
            type: string
            format: string
        - name: walletId
          in: query
          required: false
          description: EES AIR Wallet ID
          schema:
            type: string
            format: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: >-
                  #/components/schemas/walletRelatedAccountCreationPayloadOptionalCampaignReference
              example:
                - status: ACTIVE
                  parentAccountId: "1"
                  campaignReference: TEST
                - status: ACTIVE
                  parentAccountId: "2"
                  campaignId: "1"
        description: JSON payload
        required: true
      tags:
        - Services
      responses:
        '201':
          description: The request was successful and a number of related accounts created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/multiStatus207AccountEntity'
                example:
                  successful:
                    total: 1
                    results:
                      - accountId: '3334'
                        relationships:
                          ENTITLEMENT_OF:
                            STANDARD_SUBSCRIPTION:
                              - accountId: '3333'
                                dateCreated: '2018-09-23T16:15:23+00:00'
                          OBJECTIVE_OF:
                            QUEST:
                              - accountId: '3333'
                                dateCreated: '2022-11-01T14:53:07+00:00'
                          PROMOTION_OF:
                            MULTI_PROMOTION_COUPON:
                              - accountId: '3333'
                                dateCreated: '2022-10-20T14:28:28+00:00'
                          BOUNCE_BACK_REWARD_OF:
                            ECOUPON:
                              - accountId: '3333'
                                dateCreated: '2022-11-01 16:31:53'
                            CONTINUITY:
                              - accountId: '122'
                                dateCreated: '2022-10-19T14:49:50+00:00'
                          COUPON_STAMP_REWARD_OF:
                            STAMP_CARD:
                              - accountId: '3333'
                                dateCreated: '2022-11-02 12:35:22'
                          LOYALTY_POINTS_REWARD_OF:
                            POINTS:
                              - accountId: '3333'
                                dateCreated: '2022-11-02 14:38:23'
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                        meta:
                          key: value
                        balances:
                          available: 0
                          refundable: 0
                  failed:
                    total: 0
                    results: [ ]
                  results:
                    total: 1
                    results:
                      - accountId: '3334'
                        relationships:
                          ENTITLEMENT_OF:
                            STANDARD_SUBSCRIPTION:
                              - accountId: '3333'
                                dateCreated: '2018-09-23T16:15:23+00:00'
                          OBJECTIVE_OF:
                            QUEST:
                              - accountId: '3333'
                                dateCreated: '2022-11-01T14:53:07+00:00'
                          PROMOTION_OF:
                            MULTI_PROMOTION_COUPON:
                              - accountId: '3333'
                                dateCreated: '2022-10-20T14:28:28+00:00'
                          BOUNCE_BACK_REWARD_OF:
                            ECOUPON:
                              - accountId: '3333'
                                dateCreated: '2022-11-01 16:31:53'
                            CONTINUITY:
                              - accountId: '122'
                                dateCreated: '2022-10-19T14:49:50+00:00'
                          COUPON_STAMP_REWARD_OF:
                            STAMP_CARD:
                              - accountId: '3333'
                                dateCreated: '2022-11-02 12:35:22'
                          LOYALTY_POINTS_REWARD_OF:
                            POINTS:
                              - accountId: '3333'
                                dateCreated: '2022-11-02 14:38:23'
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                        meta:
                          key: value
                        balances:
                          available: 0
                          refundable: 0
        '207':
          description: Multi-Status meaning not all the accounts could be created, there will be elements in the "failed" part of the response object
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/multiStatus207AccountEntity'
                example:
                  successful:
                    total: 1
                    results:
                      - accountId: '3334'
                        relationships:
                          ENTITLEMENT_OF:
                            STANDARD_SUBSCRIPTION:
                              - accountId: '3333'
                                dateCreated: '2018-09-23T16:15:23+00:00'
                          OBJECTIVE_OF:
                            QUEST:
                              - accountId: '3333'
                                dateCreated: '2022-11-01T14:53:07+00:00'
                          PROMOTION_OF:
                            MULTI_PROMOTION_COUPON:
                              - accountId: '3333'
                                dateCreated: '2022-10-20T14:28:28+00:00'
                          BOUNCE_BACK_REWARD_OF:
                            ECOUPON:
                              - accountId: '3333'
                                dateCreated: '2022-11-01 16:31:53'
                            CONTINUITY:
                              - accountId: '122'
                                dateCreated: '2022-10-19T14:49:50+00:00'
                          COUPON_STAMP_REWARD_OF:
                            STAMP_CARD:
                              - accountId: '3333'
                                dateCreated: '2022-11-02 12:35:22'
                          LOYALTY_POINTS_REWARD_OF:
                            POINTS:
                              - accountId: '3333'
                                dateCreated: '2022-11-02 14:38:23'
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                        meta:
                          key: value
                        balances:
                          available: 0
                          refundable: 0
                  failed:
                    total: 1
                    results:
                      - errorCode: Error Code
                        errorMessage: Error Message
                  results:
                    total: 2
                    results:
                      - accountId: '3334'
                        relationships:
                          ENTITLEMENT_OF:
                            STANDARD_SUBSCRIPTION:
                              - accountId: '3333'
                                dateCreated: '2018-09-23T16:15:23+00:00'
                          OBJECTIVE_OF:
                            QUEST:
                              - accountId: '3333'
                                dateCreated: '2022-11-01T14:53:07+00:00'
                          PROMOTION_OF:
                            MULTI_PROMOTION_COUPON:
                              - accountId: '3333'
                                dateCreated: '2022-10-20T14:28:28+00:00'
                          BOUNCE_BACK_REWARD_OF:
                            ECOUPON:
                              - accountId: '3333'
                                dateCreated: '2022-11-01 16:31:53'
                            CONTINUITY:
                              - accountId: '122'
                                dateCreated: '2022-10-19T14:49:50+00:00'
                          COUPON_STAMP_REWARD_OF:
                            STAMP_CARD:
                              - accountId: '3333'
                                dateCreated: '2022-11-02 12:35:22'
                          LOYALTY_POINTS_REWARD_OF:
                            POINTS:
                              - accountId: '3333'
                                dateCreated: '2022-11-02 14:38:23'
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                        meta:
                          key: value
                        balances:
                          available: 0
                          refundable: 0
                      - errorCode: Error Code
                        errorMessage: Error Message
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFound'
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /account/{accountId}/move/to/wallet/{walletId}:
    patch:
      summary: Move
      operationId: moveAccountToWallet
      description: >-
        This API method allows the calling application to move an Account into a
        requested Wallet. Please note&#58; currently this endpoint supports an
        `ACTIVE` Account move of type `COUPON` and initially not assigned to
        any Wallet.
      parameters:
        - name: accountId
          in: path
          description: Account ID
          required: true
          schema:
            type: string
            format: string
        - name: walletId
          in: path
          description: Destination Wallet ID
          required: true
          schema:
            type: string
            format: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                details:
                  $ref: '#/components/schemas/metaEntity'
                location:
                  $ref: '#/components/schemas/locationEntity'
              example:
                details:
                  fooKey: BarValue
                location:
                  storeId: GuildfordHighStreet
        description: JSON payload
      tags:
        - Accounts
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: ACCOUNT.MOVE.TO.WALLET
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: UPDATE
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletAccountTransactionEntity'
                example:
                  accountTransactionId: '485266'
                  parentAccountTransactionId: ''
                  accountId: '138227'
                  account:
                    accountId: '138227'
                    walletId: '158844'
                    campaignId: '1784'
                    type: ECOUPON
                    status: ACTIVE
                    dates:
                      start: '2020-05-07T09:33:06+01:00'
                      end: '2038-01-19T03:14:07+00:00'
                    meta: []
                    dateCreated: '2020-05-07T09:33:06+01:00'
                    lastUpdated: '2020-05-07T10:54:25+01:00'
                    overrides: []
                    balances:
                      available: 0
                      refundable: 0
                    relationships: []
                  event: UPDATE
                  value: 0
                  source: 1
                  balancesBefore:
                    available: 0
                    refundable: 0
                  balancesAfter:
                    available: 0
                    refundable: 0
                  transactionDetails:
                    merchant_store_id: testOutletUnitIncomingIdentifier
                  properties: []
                  dateCreated: '2020-05-07T10:54:25+01:00'
                  lastUpdated: '2020-05-07T10:54:25+01:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorMessage: 'Not found: Wallet transaction is cancelled.'
                  errorCode: NF
        '409':
          $ref: '#/components/responses/conflict'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/recommendations:
    get:
      summary: Get by Wallet Id
      operationId: getWalletRecommendationsbyWalletId
      description: >-
        This API method allows the calling application to retrieve a list of
        Wallet's Recommendations.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
        - name: status
          in: query
          required: true
          description: Search by Recommendation status
          allowEmptyValue: false
          schema:
            type: string
            format: string
        - name: channel
          in: query
          required: true
          description: Search by Recommendation channel
          allowEmptyValue: false
          schema:
            type: string
            format: string
      tags:
        - Recommendations
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/recommendationEntity'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/recommendations:
    get:
      summary: Get by Identity Value
      operationId: getWalletRecommendationsByIdentityValue
      description: >-
        This API method allows the calling application to retrieve of
        recommendations linked to the identity value given in the request. The
        validity of the identity value is not checked in this request.
      parameters:
        - name: identity-value
          in: query
          required: true
          description: Wallet Identity value
          schema:
            type: string
            format: string
        - name: status
          in: query
          required: true
          description: Search by Recommendation status
          allowEmptyValue: false
          schema:
            type: string
            format: string
        - name: channel
          in: query
          required: true
          description: Search by Recommendation channel
          allowEmptyValue: false
          schema:
            type: string
            format: string
      tags:
        - Recommendations
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/recommendationEntity'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/catalogue/{catalogueGuid}/recommendation/{recommendationGuid}/status/activate:
    patch:
      summary: Change Status to Active
      operationId: changeRecommendationStatusToActive
      description: >
        This API method allows the calling application to change a status of a
        Recommendation to `ACTIVE`.
      parameters:
        - name: walletId
          in: path
          description: Wallet ID (must match recommendation wallet ID)
          required: true
          schema:
            type: string
            format: string
        - name: catalogueGuid
          in: path
          description: Catalogue ID (GUID)
          required: true
          schema:
            type: string
            format: string
        - name: recommendationGuid
          in: path
          description: Recommendation ID (GUID)
          required: true
          schema:
            type: string
            format: string
      tags:
        - Recommendations
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: RECOMMENDATION.AVAILIABLE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/recommendationEntity'
                    operationType: UPDATE
                    description: One item for each updated Recommendation
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/recommendationEntity'
                example:
                  guid: 6d7030cf-5a3f-437c-9f8e-8f8c8315a8ad
                  catalogue: 6d4af79b-6f2e-47db-9386-8ddc590e68a2
                  target:
                    - 'campaignId: 12345'
                  validFrom: '2020-04-10T10:00:00+00:00'
                  validTo: '2020-05-31T23:59:59+00:00'
                  channels:
                    - WEB
                    - APP
                  weight: 10
                  status: AVAILIABLE
                  meta: {}
                  data:
                    startDate: '2020-04-17T08:00:00+00:00'
                    endDate: '2020-04-23T23:59:59+00:00'
                    status: ACTIVE
                    state: LOADED
                    overrides:
                      key1: value
                    meta:
                      foo: bar
                  dateCreated: '2020-04-02T08:52:43+00:00'
                  lastUpdated: '2020-04-05T15:55:12+00:00'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
              example:
                errorCode: IR
                errorMessage: Invalid Request - wallet ID in request doesn't match with this recommendation
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/catalogue/{catalogueGuid}/recommendation/{recommendationGuid}/status/accept:
    patch:
      summary: Change Status to Accepted
      operationId: changeRecommendationStatusToAccepted
      description: >
        This API method allows the calling application to change a status of a
        Recommendation to `ACCEPTED`.

        Please note&#58; This endpoint only changes a Recommendation status to
        `ACCEPTED`, but without an issuance of recommended entities.
      parameters:
        - name: walletId
          in: path
          description: Wallet ID (must match recommendation wallet ID)
          required: true
          schema:
            type: string
            format: string
        - name: catalogueGuid
          in: path
          description: Catalogue ID (GUID)
          required: true
          schema:
            type: string
            format: string
        - name: recommendationGuid
          in: path
          description: Recommendation ID (GUID)
          required: true
          schema:
            type: string
            format: string
      tags:
        - Recommendations
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: RECOMMENDATION.ACCEPTED
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/recommendationEntity'
                    operationType: UPDATE
                    description: One item for each updated Recommendation
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/recommendationEntity'
                example:
                  guid: 6d7030cf-5a3f-437c-9f8e-8f8c8315a8ad
                  catalogue: 6d4af79b-6f2e-47db-9386-8ddc590e68a2
                  target:
                    - 'campaignId: 12345'
                  validFrom: '2020-04-10T10:00:00+00:00'
                  validTo: '2020-05-31T23:59:59+00:00'
                  channels:
                    - WEB
                    - APP
                  weight: 10
                  status: ACCEPTED
                  meta: {}
                  data:
                    startDate: '2020-04-17T08:00:00+00:00'
                    endDate: '2020-04-23T23:59:59+00:00'
                    status: ACTIVE
                    state: LOADED
                    overrides:
                      key1: value
                    meta:
                      foo: bar
                  dateCreated: '2020-04-02T08:52:43+00:00'
                  lastUpdated: '2020-04-05T15:55:12+00:00'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
              example:
                errorCode: IR
                errorMessage: Invalid Request - wallet ID in request doesn't match with this recommendation
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/catalogue/{catalogueGuid}/recommendation/{recommendationGuid}/status/reject:
    patch:
      summary: Change Status to Rejected
      operationId: changeRecommendationStatusToRejected
      description: >
        This API method allows the calling application to change a status of a
        Recommendation to `REJECTED`.
      parameters:
        - name: walletId
          in: path
          description: Wallet ID (must match recommendation wallet ID)
          required: true
          schema:
            type: string
            format: string
        - name: catalogueGuid
          in: path
          description: Catalogue ID (GUID)
          required: true
          schema:
            type: string
            format: string
        - name: recommendationGuid
          in: path
          description: Recommendation ID (GUID)
          required: true
          schema:
            type: string
            format: string
      tags:
        - Recommendations
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: OK
          x-eventNotifications:
            events:
              - eventName: RECOMMENDATION.REJECTED
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/recommendationEntity'
                    operationType: UPDATE
                    description: One item for each updated Recommendation
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/recommendationEntity'
                example:
                  guid: 6d7030cf-5a3f-437c-9f8e-8f8c8315a8ad
                  catalogue: 6d4af79b-6f2e-47db-9386-8ddc590e68a2
                  target:
                    - 'campaignId: 12345'
                  validFrom: '2020-04-10T10:00:00+00:00'
                  validTo: '2020-05-31T23:59:59+00:00'
                  channels:
                    - WEB
                    - APP
                  weight: 10
                  status: REJECTED
                  meta: {}
                  data:
                    startDate: '2020-04-17T08:00:00+00:00'
                    endDate: '2020-04-23T23:59:59+00:00'
                    status: ACTIVE
                    state: LOADED
                    overrides:
                      key1: value
                    meta:
                      foo: bar
                  dateCreated: '2020-04-02T08:52:43+00:00'
                  lastUpdated: '2020-04-05T15:55:12+00:00'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
              example:
                errorCode: IR
                errorMessage: Invalid Request - wallet ID in request doesn't match with this recommendation
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallet/{walletId}/catalogue/{catalogueGuid}/recommendation/{recommendationGuid}/status/delete:
    delete:
      summary: Change Status to Deleted
      operationId: changeRecommendationStatusToDeleted
      description: >
        This API method allows the calling application to change a status of a
        Recommendation to `DELETED`.

        Please note&#58; Status `DELETE` is a terminal status and a
        Recommendation with this status cannot be used nor changed.
      parameters:
        - name: walletId
          in: path
          description: Wallet ID (must match recommendation wallet ID)
          required: true
          schema:
            type: string
            format: string
        - name: catalogueGuid
          in: path
          description: Catalogue ID (GUID)
          required: true
          schema:
            type: string
            format: string
        - name: recommendationGuid
          in: path
          description: Recommendation ID (GUID)
          required: true
          schema:
            type: string
            format: string
      tags:
        - Recommendations
      responses:
        '204':
          description: No Content
          x-eventNotifications:
            events:
              - eventName: RECOMMENDATION.DELETE
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/recommendationEntity'
                    operationType: UPDATE
                    description: One item for each updated Recommendation
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
              example:
                errorCode: IR
                errorMessage: Invalid Request - wallet ID in request doesn't match with this recommendation
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/{walletId}/catalogue/{catalogueGuid}/recommendation/{recommendationGuid}/accept:
    post:
      summary: Accept
      operationId: acceptRecommendation
      description: >-
        This API method allows the calling application to request a
        Recommendation Acceptance. Accepting a Recommendation would result in an
        issuance of recommended entities and changing a Recommendation status to
        'ACCEPTED'
      parameters:
        - name: walletId
          in: path
          description: Wallet ID (must match recommendation wallet ID)
          required: true
          schema:
            type: string
            format: string
        - name: catalogueGuid
          in: path
          description: Catalogue ID (GUID)
          required: true
          schema:
            type: string
            format: string
        - name: recommendationGuid
          in: path
          description: Recommendation ID (GUID)
          required: true
          schema:
            type: string
            format: string
      tags:
        - Recommendations
        - Services
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/emptyPatchPayload'
        description: JSON payload
        required: true
      responses:
        '200':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.RECOMMENDATION.ACCEPT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletAccountEntity'
                    operationType: CREATE
                    description: One item for each created Account
                  - schema:
                      $ref: '#/components/schemas/walletAccountTransactionEntity'
                    operationType: CREATE
                    description: One item for each created Account
                  - schema:
                      $ref: '#/components/schemas/recommendationEntity'
                    operationType: UPDATE
                    description: One item for each updated (used) Recommendation
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletAccountEntity'
                example:
                  accountId: '7774363'
                  relationships: {}
                  walletId: '75875'
                  campaignId: '12345'
                  type: ECOUPON
                  clientType: REDEMPTION
                  status: ACTIVE
                  state: LOADED
                  dates:
                    start: '2020-04-17T08:00:00+00:00'
                    end: '2020-08-23T23:59:59+00:00'
                  meta:
                    foo: bar
                  dateCreated: '2020-05-05T08:35:11+00:00'
                  lastUpdated: '2020-05-05T08:35:11+00:00'
                  balances:
                    available: 0
                    refundable: 0
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
              example:
                errorCode: IR
                errorMessage: Invalid Request - wallet ID in request doesn't match with this recommendation
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
              example:
                errorCode: AF
                errorMessage: >-
                  Authentication Failure, Please check if required AUTH
                  headers are present in your Request and if AUTH Hash is
                  calculated correctly
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
              example:
                errorCode: P
                errorMessage: >-
                  You don't have appropriate Privileges to perform this
                  operation
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
              example:
                errorMessage: Recommendation GUID not found
                errorCode: NF
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
              example:
                errorMessage: >-
                  Unable to Fulfil this Recommendation - recommended Campaign
                  is INACTIVE
                errorCode: CI
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/backendpointsredeem:
    post:
      summary: Backend Points Redeem
      operationId: adjustPointBalanceRedeem
      description: >-
        This API method allows the calling application to redeem a coupon account and
        adjust a points account balance of a specified wallet. The points balance will
        be increased or decreased based on the value specified in the PointsValue column.
      tags:
        - Services
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletServicesRedeemPayload'
        description: JSON payload
        required: true
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.BACKENDPOINTSREDEEM
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: CREATE
                    description: One item for each created Account
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                    description: One item for each created Account
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '556786'
                  parentWalletTransactionId: '0'
                  walletId: '115058062'
                  reference: 'asdfawerest435werry54ery54tery54ete4'
                  transactionDateTime: '2021-12-02T10:41:43+00:00'
                  transactionDateTimeOffset: '+00:00'
                  identityId: '88545390'
                  identity: null,
                  type: 'ADJUSTMENT'
                  status: 'SETTLED'
                  meta:
                    key1: 'value1'
                    wallettransactionmeta: 'testMetaTxt'
                    transactiondescription: 'testTxt'
                    transactiondate: '2021-12-02 10:41:43'
                  state: 'ORIGINAL'
                  expiryDate: null
                  accounts:
                    - accountTransactionId: '1839143771'
                      accountId: '979761142'
                    - accountTransactionId: '1839143769'
                      accountId: '979761095'
                  basket:
                    contents: null
                    summary:
                      pointsCredited: 10
                      pointsRedeemed: 0
                      pointsRefunded: 0
                    payment: null
                  channel: 'api'
                  location:
                    storeId: '5022'
                    storeParentId: '5'
                  dateCreated: '2021-12-02T10:41:44+00:00'
                  lastUpdated: '2021-12-02T10:41:44+00:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorMessage: Resource cannot be found
                  errorCode: NF
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/backendpointsrefund:
    post:
      summary: Backend Points Refund
      operationId: backendPointsRefund
      description: >-
        This API method allows the calling application to refund into a points account of a specified wallet.
        The points balance will be increased based on the value specified in the PointsValue column.
      tags:
        - Services
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletServicesRefundPayload'
        description: JSON payload
        required: true
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.BACKENDPOINTSREFUND
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                    operationType: UPDATE
                    description: One item for each created Account
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '556786'
                  parentWalletTransactionId: '0'
                  walletId: '115058062'
                  reference: 'zyrafywchodzadoszafy'
                  transactionDateTime: '2023-10-19T10:41:43+00:00'
                  transactionDateTimeOffset: '+01:00'
                  identityId: '88545390'
                  identity: null,
                  type: 'ADJUSTMENT'
                  status: 'SETTLED'
                  meta:
                    key1: 'value1'
                    ence: 'pence'
                    wktorej: 'rece'
                    wallettransactionmeta: 'testMetaTxt'
                    transactiondescription: 'testTxt'
                    transactiondate: '2023-10-19 10:41:43'
                  state: 'ORIGINAL'
                  expiryDate: null
                  accounts:
                    - accountTransactionId: '1839143771'
                      accountId: '979761142'
                    - accountTransactionId: '1839143769'
                      accountId: '979761095'
                  basket:
                    contents: null
                    summary:
                      pointsCredited: 10
                      pointsRedeemed: 0
                      pointsRefunded: 0
                    payment: null
                  channel: 'api'
                  location:
                    storeId: '5022'
                    storeParentId: '5'
                  dateCreated: '2023-10-19T10:41:44+01:00'
                  lastUpdated: '2023-10-19T10:41:44+01:00'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorMessage: Resource cannot be found
                  errorCode: NF
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/backendpoints:
    post:
      summary: Backend Points
      operationId: adjustPointBalance
      description: >-
        This API method allows the calling application to adjust a points account balance
        of a specified wallet. The points balance will be increased or decreased based on
        the value specified in the PointsValue column.
      tags:
        - Services
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletServicesAdjustPayload'
        description: JSON playload
        required: true
      responses:
        '200':
          description: Success
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.BACKENDPOINTS
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                      operationType: CREATE
                      description: One item for each created Account
                  - schema:
                      $ref: '#/components/schemas/walletTransactionEntity'
                      operationType: UPDATE
                      description: One item for each created Account
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletTransactionExpandedEntity'
                example:
                  walletTransactionId: '556786'
                  parentWalletTransactionId: '0'
                  walletId: '115058062'
                  reference: 'asdfawerest435werry54ery54tery54ete4'
                  transactionDateTime: '2021-12-02T10:41:43+00:00'
                  transactionDateTimeOffset: '+00:00'
                  identityId: '88545390'
                  identity: null,
                  type: 'ADJUSTMENT'
                  status: 'SETTLED'
                  meta:
                    key1: 'value1'
                    wallettransactionmeta: 'testMetaTxt'
                    transactiondescription: 'testTxt'
                    transactiondate: '2021-12-02 10:41:43'
                  state: 'ORIGINAL'
                  expiryDate: null
                  accounts:
                    - accountTransactionId: '1839143771'
                      accountId: '979761142'
                    - accountTransactionId: '1839143769'
                      accountId: '979761095'
                  basket:
                    contents: null
                    summary:
                      pointsCredited: 10
                      pointsRedeemed: 0
                      pointsRefunded: 0
                    payment: null
                  channel: 'api'
                  location:
                    storeId: '5022'
                    storeParentId: 'store'
                  dateCreated: '2021-12-02T10:41:44+00:00'
                  lastUpdated: '2021-12-02T10:41:44+00:00'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorCode: IR
                  errorMessage: Identical points adjustment has already been processed
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorMessage: Resource cannot be found
                  errorCode: NF
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/consumer:
    post:
      summary: Wallet Consumer
      operationId: updateWalletConsumerByIdentity
      description: >-
        This API method allows the calling application to create or update a wallet consumer
        for a wallet specified by the identity-value. The consumer will be created if it
        does not exist, otherwise the existing wallet consumer will be updated.
      parameters:
        - name: identity-value
          in: query
          required: true
          description: Wallet Identity Value
          schema:
            type: string
            format: string
      tags:
        - Services
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/walletConsumerCreatePayload'
        description: JSON playload
        required: true
      responses:
        '200':
          description: Success
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.CONSUMER.UPSERT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletConsumerEntity'
                    operationType: UPDATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletConsumerEntity'
                example:
                  consumerId: '42484'
                  walletId: '75859'
                  friendlyName: John's Consumer
                  type: DEFAULT
                  status: ACTIVE
                  state: ACTIVE
                  data:
                    tcVersionNumber: '1.1'
                  meta:
                    someKey: someValue
                  dateCreated: '2022-04-11T17:21:04+00:00'
                  lastUpdated: '2022-04-11T17:21:04+00:00'
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.CONSUMER.UPSERT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletConsumerEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletConsumerEntity'
                example:
                  consumerId: '42484'
                  walletId: '75859'
                  friendlyName: John's Consumer
                  type: DEFAULT
                  status: ACTIVE
                  state: ACTIVE
                  data:
                    tcVersionNumber: '1.1'
                  meta:
                    someKey: someValue
                  dateCreated: '2022-04-11T17:21:04+00:00'
                  lastUpdated: '2022-04-11T17:21:04+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorMessage: Wallet not found
                  errorCode: NF
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '423':
          $ref: '#/components/responses/locked'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /composite/wallet/{walletId}/householdBalances:
    get:
      summary: Get the Balances for Accounts Across a Household
      operationId: getWalletHouseholdBalances
      description: >-
        This API method allows the calling application to retrieve the household
        balances from points accounts across a household of Wallets. If enabled, and set 
        to HOUSEHOLD mode, the Tier Membership and Tier Membership Balances are 
        also returned in the response.
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      tags:
        - Accounts
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    schemeId:
                      type: string
                    accounts:
                      type: array
                      items:
                        $ref: '#/components/schemas/walletAccountEntity'
                    household:
                      type: object
                      properties:
                        balances:
                          type: object
                          properties:
                            current:
                              type: integer
                            usable:
                              type: integer
                            locked:
                              type: integer
                            lifetime:
                              type: integer
                            lifetimeSpend:
                              type: integer
                            lifetimeSpendValue:
                              type: integer
                            pending:
                              type: integer
                        tierMembership:
                          $ref: '#/components/schemas/tierMembershipEntity'
  /composite/wallet/accounts/createAndFetch:
    post:
      summary: Create and Fetch Wallet Accounts.
      operationId: createAndFetchWalletAccounts
      description: >-
        This endpoint allows you to fetch recommendations and campaigns based on the provided identity-value or walletId and mark them as accepted. 
        Campaigns are fetched based on tags, and accounts are created accordingly.
        All existing accounts (ACTIVE & LOCKED only) in the wallet are fetched and returned as part of the same response, but only in the results section.
        A single event is created for all accounts created.
      tags:
        - Recommendations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - required:
                    - identity-value
                  properties:
                    identity-value:
                      type: string
                      description: The identity value of the customer. Required if no walletId is provided.
                - required:
                    - walletId
                  properties:
                    walletId:
                      type: integer
                      description: The wallet ID of the customer. Required if no identity-value is provided.
              properties:
                campaigns:
                  type: array
                  description: Array of campaigns to create accounts and fetch recommendations.
                  items:
                    type: object
                    required:
                      - campaignTag
                      - status
                      - state
                    properties:
                      campaignTag:
                        type: string
                        description: The tag of the campaign.
                      status:
                        type: string
                        description: The status of the campaign.
                      state:
                        type: string
                        description: The state of the campaign.
        description: JSON payload
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.RECOMMENDATIONS.CREATEANDFETCH
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletRecommendationsEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletRecommendationsEntity'
                example:
                  successful:
                    total: 1
                    results:
                      - accountId: '3334'
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                  failed:
                    total: 1
                    results:
                      - errorCode: Error Code
                        errorMessage: Error Message.
                  results:
                    total: 2
                    results:
                      - accountId: '3334'
                        relationships: [ ]
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                      - errorCode: Error Code
                        errorMessage: Error Message.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorMessage: Wallet not found.
                  errorCode: NF
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /services/wallet/recommendations/accept:
    post:
      summary: Accept All Recommendations API.
      operationId: acceptRecommendations
      description: >-
        This API allows you to accept all recommendations associated with a customer's identity-value or walletId,
         automatically creating accounts for each recommendation offer and linking them to the customer's wallet.
         Additionally, all recommendations, regardless of account creation success or failure, will be accepted.
      tags:
        - Recommendations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - required:
                    - identity-value
                  properties:
                    identity-value:
                      type: string
                      description: The identity value of the customer. Required if no walletId is provided.
                - required:
                    - walletId
                  properties:
                    walletId:
                      type: integer
                      description: The wallet ID of the customer. Required if no identity-value is provided.
        description: JSON payload
      responses:
        '201':
          description: Created
          x-eventNotifications:
            events:
              - eventName: SERVICE.WALLET.RECOMMENDATIONS.ACCEPT
                atomicOperations:
                  - schema:
                      $ref: '#/components/schemas/walletRecommendationsEntity'
                    operationType: CREATE
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/walletRecommendationsEntity'
                example:
                  successful:
                    total: 1
                    results:
                      - accountId: '3334'
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                  failed:
                    total: 1
                    results:
                      - errorCode: Error Code
                        errorMessage: Error Message.
                  results:
                    total: 2
                    results:
                      - accountId: '3334'
                        relationships: [ ]
                        walletId: '1178'
                        campaignId: '334'
                        type: ECOUPON
                        clientType: A_CLIENT_ACCOUNT_TYPE
                        status: ACTIVE
                        state: A_CLIENT_ACCOUNT_STATE
                        dates:
                          start: '2018-09-16T11:53:08+01:00'
                          end: '2021-12-31T23:59:59+01:00'
                        dateCreated: '2018-09-16T11:53:08+01:00'
                        lastUpdated: '2019-09-16T11:53:08+01:00'
                      - errorCode: Error Code.
                        errorMessage: Error Message.
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/defaultErrorEntity'
                example:
                  errorMessage: Wallet not found.
                  errorCode: NF
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /audiences/{audienceId}/wallets:
    post:
      summary: Add Wallets to an Audience
      operationId: addWalletsToAudience
      description: >-
        This API method allows the calling application to add wallets to a specified audience within the Eagle Eye Platform.
        This endpoint will not validate if the walletIds exist and it will only process once any duplicated entries.
      tags:
        - Audiences
      parameters:
        - $ref: '#/components/parameters/audienceId'
      requestBody:
        description: JSON payload
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - wallets
              properties:
                wallets:
                  type: array
                  items:
                    type: object
                    required:
                      - walletId
                    properties:
                      walletId:
                        type: string
                        description: The ID of the wallet to be added.
            example:
              wallets:
                - walletId: '123456789'
                - walletId: '987654321'
                - walletId: '1122334455'
      responses:
        '204':
          description: No content
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/audiencesNotFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /audiences/{audienceId}/wallets/delete:
    post:
      summary: Delete Wallets from Audience
      operationId: deleteWalletsFromAudience
      description: >-
        This API method allows the calling application to remove wallets from a specified audience within the Eagle Eye Platform.
        This endpoint will not validate if the walletIds exist and it will only process once any duplicated entries.
      tags:
        - Audiences
      parameters:
        - $ref: '#/components/parameters/audienceId'
      requestBody:
        description: JSON payload
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - wallets
              properties:
                wallets:
                  type: array
                  items:
                    type: object
                    required:
                      - walletId
                    properties:
                      walletId:
                        type: string
                        description: The ID of the wallet to be removed.
            example:
              wallets:
                - walletId: '123456789'
                - walletId: '987654321'
                - walletId: '1122334455'
      responses:
        '204':
          description: No content
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/audiencesNotFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'
  /wallets/{walletId}/audiences:
    get:
      summary: Get Audiences For A Wallet
      operationId: getWalletAudiences
      description: >-
        This API method allows the calling application to retrieve all the audiences associated with a specified Wallet ID within the Eagle Eye Platform.
      tags:
        - Audiences
      parameters:
        - $ref: '#/components/parameters/eesAirWalletId'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      description: Audience that the wallet belongs to.
                      properties:
                        id:
                          type: string
                          description: The ID of the Audience.
                        name:
                          type: string
                          description: The name of the Audience.
                        reference:
                          type: string
                          description: The reference of the Audience.
                        startDate:
                          description: The start date of the Audience.
                          nullable: true
                          type: string
                          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
                        endDate:
                          description: The end date of the Audience.
                          nullable: true
                          type: string
                          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
                        dateCreated:
                          description: Date this Audience was created.
                          nullable: false
                          type: string
                          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
                        lastUpdated:
                          description: Date this Audience was last updated.
                          nullable: false
                          type: string
                          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
              example:
                results:
                  - id: '123456789'
                    name: 'Audience'
                    reference: 'audience-001'
                    startDate: '2023-01-01T00:00:00+00:00'
                    endDate: '2023-12-31T23:59:59+00:00'
                    dateCreated: '2023-01-01T00:00:00+00:00'
                    lastUpdated: '2023-01-01T00:00:00+00:00'
                  - id: '987654321'
                    name: 'Another Audience'
                    reference: 'another-audience-001'
                    startDate: '2023-01-01T00:00:00+00:00'
                    endDate: '2023-12-31T23:59:59+00:00'
                    dateCreated: '2023-01-01T00:00:00+00:00'
                    lastUpdated: '2023-01-01T00:00:00+00:00'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/audiencesNotFound'
        '415':
          $ref: '#/components/responses/unsupportedMediaType'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          $ref: '#/components/responses/serverError'

security:
  - eesAuthenticationClientId: []
    eesAuthenticationHash: []
components:
  parameters:
    eesAirWalletId:
      name: walletId
      in: path
      required: true
      description: EES AIR Wallet ID
      schema:
        type: string
        format: string
    eesAirSourceWalletId:
      name: sourceWalletId
      in: path
      required: true
      description: EES AIR Wallet ID
      schema:
        type: string
        format: string
    eesAirDateFrom:
      name: dateFrom
      in: query
      required: true
      description: 'Date From (format: `YYYY-MM-DD`)'
      schema:
        type: string
        format: date
    eesAirDateTo:
      name: dateTo
      in: query
      required: true
      description: 'Date To (format: `YYYY-MM-DD`)'
      schema:
        type: string
        format: date
    eesAirWalletTransactionReference:
      name: reference
      in: query
      description: The wallet transaction reference.
      required: true
      schema:
        type: string
    eesAirWalletAccountId:
      name: accountId
      in: path
      required: true
      description: EES AIR Wallet Account ID
      schema:
        type: string
        format: string
    eesAirAccountTransactionId:
      name: accountTransactionId
      in: path
      required: true
      description: EES AIR Account Transaction ID
      schema:
        type: string
        format: string
    eesAirRelationshipWalletId:
      name: relationshipWalletId
      in: path
      required: true
      description: EES AIR Wallet ID
      schema:
        type: string
        format: string
    eesAirRecipientWalletId:
      name: recipientWalletId
      in: path
      required: true
      description: EES AIR Wallet ID
      schema:
        type: string
        format: string
    eesAirWalletIdentityId:
      name: identityId
      in: path
      required: true
      description: EES AIR Wallet Identity ID
      schema:
        type: string
        format: string
    eesAirWalletConsumerId:
      name: consumerId
      in: path
      required: true
      description: EES AIR Wallet Consumer ID
      schema:
        type: string
        format: string
    eesAirWalletTransactionId:
      name: transactionId
      in: path
      required: true
      description: EES AIR Wallet Transaction ID
      schema:
        type: string
        format: string
    eesAirCampaignId:
      name: campaignId
      in: path
      required: true
      description: EES AIR Campaign ID
      schema:
        type: string
        format: string
    eesAirPlanId:
      name: planId
      in: path
      required: true
      description: EES AIR Plan ID
      schema:
        type: string
        format: string
    eesAirProgrammeId:
      name: programmeId
      in: path
      required: true
      description: EES AIR Programme ID
      schema:
        type: string
        format: string
    eesAirSchemeId:
      name: schemeId
      in: path
      required: true
      description: EES AIR Scheme ID
      schema:
        type: string
        format: string
    eesAirWalletInvitationGuid:
      name: guid
      in: query
      required: false
      description: Wallet Invitation GUID
      schema:
        type: string
        format: string
    eesAirWalletInvitationGuidRequired:
      name: guid
      in: query
      required: true
      description: Wallet Invitation GUID
      schema:
        type: string
        format: string
    eesAirWalletInvitationReference:
      name: reference
      in: query
      required: false
      description: Wallet Invitation Reference
      schema:
        type: string
        format: string
    eesAirWalletInvitationId:
      name: walletInviteId
      in: path
      required: true
      description: EES AIR Wallet Invite ID
      schema:
        type: string
        format: string
    eesTokens:
      name: tokens
      in: query
      required: false
      description: Show up to 100 active Tokens associated with the account.
      schema:
        type: boolean
        format: string
    eesAccountInclude:
      name: include
      in: query
      description: A list of entities that should be included in the Account response
      required: false
      schema:
        type: array
        items:
          type: string
          enum:
            - campaign.rules.redemption.maxRedemptionsPerPeriod
            - account.statistics.redemption
        format: array
    eesAccountTransactionInclude:
      name: include
      in: query
      description: A list of entities that should be included in the Account Transaction response
      required: false
      schema:
        type: array
        items:
          type: string
          enum:
            - pointsIncreaseLedger
            - pointsDecreaseLedger
        format: array
    eesClientTransactionTime:
      name: x-client-transaction-time
      in: header
      required: false
      description: Client Transaction Time Override
      schema:
        type: string
        format: string
    audienceId:
      name: audienceId
      in: path
      required: true
      description: The ID of the Audience to which the wallets will be added.
      schema:
        type: string
        format: string
  responses:
    badRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/defaultErrorEntity'
    unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/defaultErrorEntity'
          example:
            errorCode: AF
            errorMessage: >-
              Authentication Failure, Please check if required AUTH
              headers are present in your Request and if AUTH Hash is
              calculated correctly
    forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorCode: P
              errorMessage: >-
                You don't have appropriate Privileges to perform this
                operation
    notFound:
      description: Not Found
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Not Found
              errorCode: NF
    conflict:
      description: Conflict
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Conflict
              errorCode: C
    unsupportedMediaType:
      description: Unsupported Media Type
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Unsupported media type - Check the content type of your request
              errorCode: MP
    locked:
      description: Locked
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Transaction ID {transactionId} is not unique
              errorCode: ITID
    tooManyRequests:
      description: Too Many Requests
      headers:
        Retry-after:
          description: The number of seconds after which to retry the request
          schema:
            type: integer
      content:
        application/json:
          schema:
            properties:
              errorCode:
                type: string
                description: The error code
                enum:
                  - 'CE'
              errorMessage:
                type: string
                description: The error message for this error
                enum:
                  - 'This request has been throttled. Please try again later.'
    serverError:
      description: Server Error
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Internal Server Error
    audiencesNotFound:
      description: Not Found.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/defaultErrorEntity'
            example:
              errorMessage: Audience not found
              errorCode: NF

  requestBodies:
    walletTransactionServicesUpdatePayload:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/walletTransactionServicesUpdatePayload'
      description: JSON payload
      required: true
    walletAccountBaseCreationPayload:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/walletAccountBaseCreationPayload'
      description: JSON payload
      required: true
    statePatchPayload:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/statePatchPayload'
      description: JSON payload
      required: true
    multipleStatePatchPayload:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/multipleStatePatchPayload'
      description: JSON payload
      required: true
    walletTransactionServicesSettlePayload:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/walletTransactionServicesSettlePayload'
      description: JSON payload
      required: true
    walletTransactionServicesCancelPayload:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/walletTransactionServicesCancelPayload'
      description: JSON payload
      required: true
    accountBalancesTransactionPayload:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/accountBalancesTransactionPayload'
      description: JSON payload
      required: true
    walletAccountCreateRelatedPayload:
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                $ref: '#/components/schemas/accountStatusEntity'
              state:
                type: string
                description: Account state
              currency:
                type: string
              meta:
                $ref: '#/components/schemas/metaEntity'
              details:
                $ref: '#/components/schemas/detailsEntity'
              location:
                $ref: '#/components/schemas/locationEntity'
              overrides:
                $ref: '#/components/schemas/accountOverridesEntity'
            description: JSON payload
      required: true

  securitySchemes:
    eesAuthenticationClientId:
      type: apiKey
      in: header
      description: >-
        Client ID, This will be provided by EES and is unique to the company
        calling the API. Please note 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.
      name: X-EES-AUTH-CLIENT-ID
    eesAuthenticationHash:
      type: apiKey
      in: header
      description: >-
        Request Security Hash, calculated using SHA-256 function from
        concatenated full Request URI Path with Query String(s), Payload and
        Client Secret. Please note 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.
      name: X-EES-AUTH-HASH
  schemas:
    dateTimeEntity:
      type: string
      pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
      example: "2024-03-11T16:33:00+00:00"
      description: DateTime in ATOM format

    tierMembershipBalancesEntity:
      type: object
      properties:
        transactions:
          type: integer
          description: >-
            The value representing the Tier Membership Bbalance for a customers Tier Membership relating to 
            the number of Tier Transactions
        spend:
          type: integer
          description: >-
            The value representing the Tier Membership Balance for a customers Tier Membership relating to 
            the Tier Membership Spend
        points:
          type: integer
          description: >-
            The value representing the Tier Membership Balance for a customers Tier Membership showing 
            the Tier Membership Points 

    tierMembershipStatusEntity:
      type: object
      properties:
        status:
          type: string
          description: >-
            The status of this tier membership.
          enum:
            - ACTIVE
    tierMembershipEntity:
      type: object
      required:
        - tierMembershipId
        - tierId
        - status
        - balances
        - dateCreated
        - lastUpdated
        - accountIds
      allOf:
        - $ref: '#/components/schemas/tierMembershipStatusEntity'
        - type: object
          properties:
            tierMembershipId:
              type: string
              description: >-
                The uniqueId for this membership into a tier. This will be a numeric string value of
                variable length.
            tierId:
              type: string
              description: >-
                The ID for the tier to which the customer belongs. This will be a numeric string value of
                variable length.
            balances:
              $ref: '#/components/schemas/tierMembershipBalancesEntity'
            expiryDate:
              $ref: '#/components/schemas/dateTimeEntity'
            tierBalanceResetDate:
              $ref: '#/components/schemas/dateTimeEntity'
            dateCreated:
              $ref: '#/components/schemas/dateTimeEntity'
            lastUpdated:
              $ref: '#/components/schemas/dateTimeEntity'
            accountIds:
              type: array
              minItems: 1
              items:
                type: string
                description: >-
                  The IDs of the accounts to which the tier membership is linked. These are numeric strings
                  of variable length.

    walletConsumerOperationPatchPayload:
      type: object
      required:
        - op
        - path
      properties:
        op:
          type: string
          description: Operation instruction as described in RFC 6902.
          enum:
            - replace
        path:
          type: string
          description: Wallet Consumer Data sub-structure path to be actioned
          format: string
        value:
          type: string
          description: >-
            Value of newly modified item in Wallet Consumer data sub-structure.
            Please note it is possible other operation might be implemented and
            they may not require this field, however it is required for replace
            operation
          format: string
    walletTransactionServicesCreationPayload:
      type: object
      required:
        - walletId
        - reference
        - type
        - accountTransactions
      properties:
        parentWalletTransactionId:
          type: string
          description: Parent Wallet Transaction ID
        walletId:
          type: string
          description: Wallet ID
        reference:
          type: string
          description: Calling party's reference to this transaction
        identityId:
          type: string
          description: The Identity ID responsible for this transaction.
        type:
          type: string
          description: 'Transaction Type, defined per retailer'
        meta:
          $ref: '#/components/schemas/metaEntity'
        state:
          type: string
          description: Transaction state
        expiryDate:
          type: string
          format: date-time
          description: 'Transaction expiry date (date-time), when transaction should expire.'
        accountTransactions:
          type: array
          items:
            $ref: >-
              #/components/schemas/walletTransactionServicesAccountTransactionEntity
        basket:
          $ref: '#/components/schemas/walletTransactionBasketEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
        transactionDateTime:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: Explicit Wallet Transaction Date Time (for non real time transactions)
    walletTransactionServicesSpendPayload:
      type: object
      required:
        - balances
        - accountId
      properties:
        balances:
          type: object
          description: The object of balances with the amounts to be adjusted.
          properties:
            current:
              type: integer
              description: Amount to be spent against the current balance.
            lifetime_spend:
              type: integer
              description: >-
                The value to add to the lifetime spend balance of the points
                account. This value is the number of points to be spent.
            lifetime_spend_value:
              type: integer
              description: >-
                The value to add to the lifetime spend value balance field of
                the points account. This value is the monetary value of the
                points to be spent.
        accountId:
          type: string
          format: string
          description: EES AIR Account ID
        walletTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Wallet Transaction State
            reference:
              type: string
              format: string
              description: Wallet Transaction Reference
            meta:
              $ref: '#/components/schemas/metaEntity'
            transactionDateTime:
              type: string
              format: ees-date-time
              description: >-
                Date-time override in ATOM format, if provided than created
                Wallet Transaction will be created with this date-time,
                otherwise the current date-time will be used
        spendAccountTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Account Transaction State
            reference:
              type: string
              format: string
              description: Account Transaction Reference
            details:
              $ref: '#/components/schemas/metaEntity'
            reasonCode:
              type: string
              format: string
              description: Reason Code
        location:
          $ref: '#/components/schemas/locationEntity'
      example:
        balances:
          current: 130
          lifetime_spend: 800
          lifetime_spend_value: 33
        accountId: '133121'
        walletTransaction:
          meta:
            metaFoo: metaBar
          transactionDateTime: '2020-04-01T15:15:14+00:00'
        spendAccountTransaction:
          details:
            detailsFoo: detailsBar
            reason: 'A Reason #1'
          reasonCode: AA
        location:
          storeId: '32432'
    walletTransactionServicesCreditPayload:
      type: object
      required:
        - amount
        - accountId
      properties:
        amount:
          type: integer
          format: int32
          description: >-
            The points amount to be credited.
        accountId:
          type: string
          format: string
          description: EES AIR Account ID
        walletTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Wallet Transaction State
            reference:
              type: string
              format: string
              description: Wallet Transaction Reference
            meta:
              $ref: '#/components/schemas/metaEntity'
            transactionDateTime:
              type: string
              format: ees-date-time
              description: >-
                Date-time override in ATOM format, if provided than created
                Wallet Transaction will be created with this date-time,
                otherwise the current date-time will be used
        creditAccountTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Account Transaction State
            reference:
              type: string
              format: string
              description: Account Transaction Reference
            details:
              $ref: '#/components/schemas/metaEntity'
            reasonCode:
              type: string
              format: string
              description: Reason Code
        location:
          $ref: '#/components/schemas/locationEntity'
      example:
        amount: 10
        accountId: '133121'
        walletTransaction:
          meta:
            metaFoo: metaBar
          transactionDateTime: '2020-04-01T15:15:14+00:00'
        creditAccountTransaction:
          details:
            detailsFoo: detailsBar
            reason: 'A Reason #1'
          reasonCode: AA
        location:
          storeId: '32432'
    walletTransactionServicesRedeemCreditPayload:
      type: object
      required:
        - redeemAccountId
        - creditAccountId
        - creditAccountTransaction
      properties:
        redeemAccountId:
          type: string
          format: string
          description: EES AIR Coupon Account ID
        creditAccountId:
          type: string
          format: string
          description: EES AIR Points Account ID
        walletTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Wallet Transaction State
            reference:
              type: string
              format: string
              description: Wallet Transaction Reference
            meta:
              $ref: '#/components/schemas/metaEntity'
            transactionDateTime:
              type: string
              format: ees-date-time
              description: >-
                Date-time override in ATOM format, if provided than created
                Wallet Transaction will be created with this date-time,
                otherwise the current date-time will be used
        creditAccountTransaction:
          type: object
          required:
            - amount
          properties:
            amount:
              type: integer
              format: int32
              description: >-
                Credit Amount, for monetary values denominated to the smallest
                currency value
            state:
              type: string
              format: string
              description: Account Transaction State
            reference:
              type: string
              format: string
              description: Account Transaction Reference
            details:
              $ref: '#/components/schemas/metaEntity'
            reasonCode:
              type: string
              format: string
              description: Reason Code
        redeemAccountTransaction:
          type: object
          properties:
            amount:
              type: integer
              format: int32
              description: >-
                Value of redeem, for monetary values denominated to the smallest
                currency value
            state:
              type: string
              format: string
              description: Account Transaction State
            reference:
              type: string
              format: string
              description: Account Transaction Reference
            details:
              $ref: '#/components/schemas/metaEntity'
            reasonCode:
              type: string
              format: string
              description: Reason Code
        location:
          $ref: '#/components/schemas/locationEntity'
      example:
        redeemAccountId: '1000'
        creditAccountId: '1001'
        walletTransaction:
          meta:
            metaFoo: metaBar
        redeemAccountTransaction:
          amount: 1000
          details:
            reason: we want to redeem an account
          reasonCode: REDEEM
        creditAccountTransaction:
          amount: 1000
          details:
            reason: we want to credit an account
          reasonCode: CREDIT
        location:
          storeId: testOutletUnitIncomingIdentifier
    walletTransactionServicesUnredeemPayload:
      type: object
      required:
        - accountId
      properties:
        accountId:
          type: string
          format: string
          description: EES AIR Account ID
        walletTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Wallet Transaction State
            reference:
              type: string
              format: string
              description: Wallet Transaction Reference
            meta:
              $ref: '#/components/schemas/metaEntity'
        creditAccountTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Account Transaction State
            reference:
              type: string
              format: string
              description: Account Transaction Reference
            details:
              $ref: '#/components/schemas/metaEntity'
            reasonCode:
              type: string
              format: string
              description: Reason Code
        location:
          $ref: '#/components/schemas/locationEntity'
      example:
        accountId: '129244'
        walletTransaction:
          meta:
            metaFoo: metaBar
        unredeemAccountTransaction:
          redeemAccountTransactionId: 469993
          details:
            detailsFoo: detailsBar
        location:
          storeId: testOutletUnitIncomingIdentifier
    walletTransactionServicesGoodwillPayload:
      type: object
      required:
        - amount
        - accountId
      properties:
        amount:
          type: integer
          format: int32
          description: Goodwill Amount
        accountId:
          type: string
          format: string
          description: EES AIR Account ID
        walletTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Wallet Transaction State
            reference:
              type: string
              format: string
              description: Wallet Transaction Reference
            meta:
              $ref: '#/components/schemas/metaEntity'
            transactionDateTime:
              type: string
              format: ees-date-time
              description: >-
                Date-time override in ATOM format, if provided than created
                Wallet Transaction will be created with this date-time,
                otherwise the current date-time will be used
        creditAccountTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Account Transaction State
            reference:
              type: string
              format: string
              description: Account Transaction Reference
            details:
              $ref: '#/components/schemas/metaEntity'
            reasonCode:
              type: string
              format: string
              description: Reason Code
        location:
          $ref: '#/components/schemas/locationEntity'
      example:
        amount: 10
        accountId: '133121'
        walletTransaction:
          meta:
            metaFoo: metaBar
          transactionDateTime: '2020-04-01T15:15:14+00:00'
        goodwillAccountTransaction:
          details:
            detailsFoo: detailsBar
            reason: 'A Reason #2'
          reasonCode: AA
        location:
          storeId: '32432'
    walletTransactionServicesDebitPayload:
      type: object
      required:
        - amount
        - accountId
      properties:
        amount:
          type: integer
          format: int32
          description: >-
            Credit Amount, for monetary values denominated to the smallest
            currency value
        accountId:
          type: string
          format: string
          description: EES AIR Account ID
        walletTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Wallet Transaction State
            reference:
              type: string
              format: string
              description: Wallet Transaction Reference
            meta:
              $ref: '#/components/schemas/metaEntity'
            transactionDateTime:
              type: string
              format: ees-date-time
              description: >-
                Date-time override in ATOM format, if provided than created
                Wallet Transaction will be created with this date-time,
                otherwise the current date-time will be used
        debitAccountTransaction:
          type: object
          properties:
            state:
              type: string
              format: string
              description: Account Transaction State
            reference:
              type: string
              format: string
              description: Account Transaction Reference
            details:
              $ref: '#/components/schemas/metaEntity'
            reasonCode:
              type: string
              format: string
              description: Reason Code
            autotopupAccountTransaction:
              type: object
              properties:
                reasonCode:
                  type: string
                  format: string
                  description: Reason Code
                details:
                  $ref: '#/components/schemas/metaEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
      example:
        amount: 40
        accountId: '133121'
        walletTransaction:
          meta:
            metaFoo: metaBar
          transactionDateTime: '2020-04-01T15:15:14+00:00'
        debitAccountTransaction:
          details:
            detailsFoo: detailsBar
            reason: 'A Reason #3'
          reasonCode: AA
        location:
          storeId: '32432'
    walletTransactionServicesAccountTransactionEntity:
      type: object
      discriminator:
        propertyName: transaction
      required:
        - accountId
        - transaction
      properties:
        accountId:
          type: string
          description: Account ID
        transaction:
          type: string
          description: The account transaction to be performed.
          enum:
            - redeem
    goodwillPayload:
      type: object
      required:
        - pointsAmount
      properties:
        ignoreRules:
          type: boolean
          description: Flag instructing AIR to ignore validation Rules
        pointsAmount:
          type: integer
          format: int32
          description: Points Amount to be credited
        details:
          $ref: '#/components/schemas/detailsEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
    walletConsumerPatchPayload:
      type: object
      required:
        - friendlyName
      properties:
        friendlyName:
          type: string
          description: The friendly name of the Wallet Consumer to be updated
        data:
          type: object
          properties:
            key1:
              type: string
              description: >-
                Meta 1 property, up to 255 characters; up to 255 characters for
                Key 1 Value
            key2:
              type: string
              description: >-
                Meta 2 property, up to 255 characters; up to 255 characters for
                Key 2 Value
        meta:
          $ref: '#/components/schemas/metaEntity'
        personal:
          type: object
          description: It contains the data about the person.
          required:
            - title
            - firstName
            - lastName
          properties:
            title:
              type: string
              description: The title of the person.
            firstName:
              type: string
              description: First name of the person.
            lastName:
              type: string
              description: Last name of the person.
            preferredName:
              type: string
              description: If provided, the preferred name of the person.
            language:
              type: string
              description: If provided, the preferred language of the person.
            gender:
              type: string
              description: If provided, the given gender of the person.
            birthDate:
              type: string
              description: If provided, the given date of birth.
        address:
          type: array
          description: Any kind of address.
          items:
            type: object
            required:
              - name
              - line1
              - city
              - county
              - postcode
              - country
            properties:
              name:
                type: string
                description: An identifier for this particular address.
              type:
                type: string
                description: Type of address, usually not required but may be needed for BFPO.
                enum:
                  - local
                  - overseas
                  - bfpo
              line1:
                type: string
                description: First address line.
              line2:
                type: string
                description: Second address line.
              line3:
                type: string
                description: Third address line.
              city:
                type: string
                description: City.
              state:
                type: string
                description: State/Provence, if applicable in the territory.
              county:
                type: string
                description: County.
              postcode:
                type: string
                description: Postcode.
              country:
                type: string
                description: Country.
        contact:
          type: array
          description: Contact details for an entity.
          items:
            type: object
            required:
              - name
              - type
              - value
            properties:
              name:
                type: string
                description: Unique per type of contact, used to differentiate contacts of the same type.
              type:
                type: string
                description: The type of contact, used to set the communication medium.
                enum:
                  - email
                  - phone
                  - whatsapp
              value:
                type: string
                description: The contact value to be used in communications.
        communication:
          type: array
          description: Information relating to a marketing channel, including optin options.
          items:
            type: object
            required:
              - type
            properties:
              type:
                type: string
                description: The type of channel used for communication.
                enum:
                  - default
                  - sms
                  - email
                  - postal
                  - phone
              optin:
                type: object
                description: Information about optin options.
                required:
                  - admin
                properties:
                  admin:
                    type: boolean
                    description: Indication of optin to administrative communications.
                  marketing:
                    type: boolean
                    description: Indication of optin to marketing communications.
        consent:
          type: array
          description: Types of consent that may have been agreed to.
          items:
            type: object
            required:
              - name
              - accepted
            properties:
              name:
                type: string
                description: A unique name identifying the name of the consented agreement. Take care for the name to be specific enough to be identified later.
              accepted:
                type: boolean
                description: A simple boolean indicating consent has been agreed.
              datetime:
                type: string
                description: The date and time that the consent was given.
              link:
                type: string
                description: A link (if applicable) to the consent agreement.
              signature:
                type: string
                description: A digital signature link, image link, or some other proof that the consent was agreed.
        preference:
          type: object
          description: Information about the store preference.
          properties:
            store:
              type: array
              description: Information about the store.
              items:
                type: object
                properties:
                  brand:
                    type: string
                    description: The name of the brand.
                  outlet:
                    type: array
                    description: Information about the outlet.
                    items:
                      type: string
        segment:
          type: array
          description: It holds information about a marketing segment against an entity.
          items:
            type: object
            required:
              - labels
            properties:
              labels:
                type: array
                minItems: 1
                description: List of segment labels that the entity belongs to for the given segmentation entry. The list can be used to denote hierarchy, lowest indexed items are higher in hierarchy terms. At least one item is required.
                items:
                  type: string
              data:
                type: object
                description: A place to store arbitrary domain-specific data against the segmentation object.
              base:
                type: string
                description: An optional base of segmentation that is being applied.
                enum:
                  - DEM
              weight:
                type: integer
                description: The relative importance of the segmentation entry, lower numbers are lighter and more important, higher numbers are heavier and sink lower.
              confidence:
                type: number
                description: The score of how likely the segmentation is to be correct. Valid values are floats less than or equal to 1.
        segmentation:
          type: array
          description: It holds information about the result of Marketing Segmentation against a given entity.
          items:
            type: object
            required:
              - name
              - segments
            properties:
              name:
                type: string
                description: Customer defined name / category for the segment.
              segments:
                type: array
                description: It contains segment objects in the array.
                items:
                  type: object
                  required:
                    - labels
                  properties:
                    labels:
                      type: array
                      minItems: 1
                      description: List of segment labels that the entity belongs to for the given segmentation entry. The list can be used to denote hierarchy, lowest indexed items are higher in hierarchy terms. At least one item is required.
                      items:
                        type: string
                    data:
                      type: object
                      description: A place to store arbitrary domain-specific data against the segmentation object.
                    base:
                      type: string
                      description: An optional base of segmentation that is being applied.
                      enum:
                        - DEM
                    weight:
                      type: integer
                      description: The relative importance of the segmentation entry, lower numbers are lighter and more important, higher numbers are heavier and sink lower.
                    confidence:
                      type: number
                      description: The score of how likely the segmentation is to be correct. Valid values are floats less than or equal to 1.
        dimension:
          type: array
          description: Dimensions are a means for defining arbitrary facts against an entity. The Air system may define standard dimension names against entities.
          items:
            type: object
            required:
              - label
              - value
            properties:
              label:
                type: string
                description: Name of a dimension, standard supported names may exist in the main entity, refer to entity documentation for details.
              value:
                type: string
                description: The value for the dimension, must be a string.
    walletConsumerCreatePayload:
      type: object
      required:
        - friendlyName
        - type
        - status
      properties:
        friendlyName:
          type: string
          description: The friendly name of the Wallet Consumer to be created
        type:
          type: string
          description: >-
            The type of the Wallet Consumer to be created. These types are
            managed on a per-retailer basis.
        status:
          type: string
          description: >-
            The status of the Wallet Consumer to be created. Can be set to
            ACTIVE or DELETED
        state:
          type: string
          description: >-
            The state of the Wallet Consumer to be created.
        data:
          type: object
          properties:
            key1:
              type: string
              description: >-
                Meta 1 property, up to 255 characters; up to 255 characters for
                Key 1 Value
            key2:
              type: string
              description: >-
                Meta 2 property, up to 255 characters; up to 255 characters for
                Key 2 Value
        meta:
          $ref: '#/components/schemas/metaEntity'
        personal:
          type: object
          description: It contains the data about the person.
          required:
            - title
            - firstName
            - lastName
          properties:
            title:
              type: string
              description: The title of the person.
            firstName:
              type: string
              description: First name of the person.
            lastName:
              type: string
              description: Last name of the person.
            preferredName:
              type: string
              description: If provided, the preferred name of the person.
            language:
              type: string
              description: If provided, the preferred language of the person.
            gender:
              type: string
              description: If provided, the given gender of the person.
            birthDate:
              type: string
              description: If provided, the given date of birth.
        address:
          type: array
          description: Any kind of address.
          items:
            type: object
            required:
              - name
              - line1
              - city
              - county
              - postcode
              - country
            properties:
              name:
                type: string
                description: An identifier for this particular address.
              type:
                type: string
                description: Type of address, usually not required but may be needed for BFPO.
                enum:
                  - local
                  - overseas
                  - bfpo
              line1:
                type: string
                description: First address line.
              line2:
                type: string
                description: Second address line.
              line3:
                type: string
                description: Third address line.
              city:
                type: string
                description: City.
              state:
                type: string
                description: State/Provence, if applicable in the territory.
              county:
                type: string
                description: County.
              postcode:
                type: string
                description: Postcode.
              country:
                type: string
                description: Country.
        contact:
          type: array
          description: Contact details for an entity.
          items:
            type: object
            required:
              - name
              - type
              - value
            properties:
              name:
                type: string
                description: Unique per type of contact, used to differentiate contacts of the same type.
              type:
                type: string
                description: The type of contact, used to set the communication medium.
                enum:
                  - email
                  - phone
                  - whatsapp
              value:
                type: string
                description: The contact value to be used in communications.
        communication:
          type: array
          description: Information relating to a marketing channel, including optin options.
          items:
            type: object
            required:
              - type
            properties:
              type:
                type: string
                description: The type of channel used for communication.
                enum:
                  - default
                  - sms
                  - email
                  - postal
                  - phone
              optin:
                type: object
                description: Information about optin options.
                required:
                  - admin
                properties:
                  admin:
                    type: boolean
                    description: Indication of optin to administrative communications.
                  marketing:
                    type: boolean
                    description: Indication of optin to marketing communications.
        consent:
          type: array
          description: Types of consent that may have been agreed to.
          items:
            type: object
            required:
              - name
              - accepted
            properties:
              name:
                type: string
                description: A unique name identifying the name of the consented agreement. Take care for the name to be specific enough to be identified later.
              accepted:
                type: boolean
                description: A simple boolean indicating consent has been agreed.
              datetime:
                type: string
                description: The date and time that the consent was given.
              link:
                type: string
                description: A link (if applicable) to the consent agreement.
              signature:
                type: string
                description: A digital signature link, image link, or some other proof that the consent was agreed.
        preference:
          type: object
          description: Information about the store preference.
          properties:
            store:
              type: array
              description: Information about the store.
              items:
                type: object
                properties:
                  brand:
                    type: string
                    description: The name of the brand.
                  outlet:
                    type: array
                    description: Information about the outlet.
                    items:
                      type: string
        segment:
          type: array
          description: It holds information about a marketing segment against an entity.
          items:
            type: object
            required:
              - labels
            properties:
              labels:
                type: array
                minItems: 1
                description: List of segment labels that the entity belongs to for the given segmentation entry. The list can be used to denote hierarchy, lowest indexed items are higher in hierarchy terms. At least one item is required.
                items:
                  type: string
              data:
                type: object
                description: A place to store arbitrary domain-specific data against the segmentation object.
              base:
                type: string
                description: An optional base of segmentation that is being applied.
                enum:
                  - DEM
              weight:
                type: integer
                description: The relative importance of the segmentation entry, lower numbers are lighter and more important, higher numbers are heavier and sink lower.
              confidence:
                type: number
                description: The score of how likely the segmentation is to be correct. Valid values are floats less than or equal to 1.
        segmentation:
          type: array
          description: It holds information about the result of Marketing Segmentation against a given entity.
          items:
            type: object
            required:
              - name
              - segments
            properties:
              name:
                type: string
                description: Customer defined name / category for the segment.
              segments:
                type: array
                description: It contains segment objects in the array.
                items:
                  type: object
                  required:
                    - labels
                  properties:
                    labels:
                      type: array
                      minItems: 1
                      description: List of segment labels that the entity belongs to for the given segmentation entry. The list can be used to denote hierarchy, lowest indexed items are higher in hierarchy terms. At least one item is required.
                      items:
                        type: string
                    data:
                      type: object
                      description: A place to store arbitrary domain-specific data against the segmentation object.
                    base:
                      type: string
                      description: An optional base of segmentation that is being applied.
                      enum:
                        - DEM
                    weight:
                      type: integer
                      description: The relative importance of the segmentation entry, lower numbers are lighter and more important, higher numbers are heavier and sink lower.
                    confidence:
                      type: number
                      description: The score of how likely the segmentation is to be correct. Valid values are floats less than or equal to 1.
        dimension:
          type: array
          description: Dimensions are a means for defining arbitrary facts against an entity. The Air system may define standard dimension names against entities.
          items:
            type: object
            required:
              - label
              - value
            properties:
              label:
                type: string
                description: Name of a dimension, standard supported names may exist in the main entity, refer to entity documentation for details.
              value:
                type: string
                description: The value for the dimension, must be a string.
    walletCreatePayload:
      type: object
      required:
        - type
        - status
      properties:
        type:
          type: string
          description: Type of the Wallet to be created; e.g. CONSUMER
        status:
          type: string
          description: Wallet status
          enum:
            - ACTIVE
            - DELETED
            - INACTIVE
            - SUSPENDED
            - TERMINATED
        state:
          type: string
          description: Wallet state
        friendlyName:
          type: string
          description: The friendly name of the wallet
        meta:
          $ref: '#/components/schemas/metaEntity'
      example:
        type: CONSUMER
        status: ACTIVE
        state: EARNBURN
        friendlyName: Susan's Wallet
        meta:
          key2: Value2
    walletPatchPayload:
      type: object
      required:
        - friendlyName
      properties:
        friendlyName:
          type: string
          description: The friendly name of the wallet
        meta:
          $ref: '#/components/schemas/metaEntity'
      example:
        friendlyName: Susan's new Wallet
    walletInviteCreatePayload:
      type: object
      properties:
        description:
          type: string
          description: Invite description
        reference:
          type: string
          description: Invite reference
        state:
          type: string
          description: Invite state
        type:
          type: string
          description: Type of the Invite
        status:
          type: string
          description: Wallet Transaction status
          enum:
            - ACTIVE
            - EXPIRED
            - CANCELLED
            - ACCEPTED
            - REJECTED
        meta:
          $ref: '#/components/schemas/metaEntity'
        validFrom:
          description: Date this invite is valid from
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        validTo:
          description: Date this invite is valid to
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
    walletInvitePatchPayload:
      type: object
      properties:
        description:
          type: string
          description: Invite description
        reference:
          type: string
          description: Invite reference
        meta:
          $ref: '#/components/schemas/metaEntity'
        validFrom:
          description: Date this invite is valid from
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        validTo:
          description: Date this invite is valid to
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
    walletIdentityMovePatchPayload:
      type: object
      required:
        - walletId
      properties:
        walletId:
          type: string
          description: Destination Wallet ID
    walletIdentityCreatePayload:
      type: object
      required:
        - type
        - friendlyName
        - value
        - status
      properties:
        type:
          type: string
          description: Type of the Identity
        friendlyName:
          type: string
          description: Identity friendly name
        value:
          type: string
          description: 'Identity value '
        safeValue:
          type: string
          description: >-
            Identity safe value (e.g. "original value salted and hashed") -
            safeValue could then be 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: Identity secret
        dates:
          $ref: '#/components/schemas/datesEntity'
        meta:
          $ref: '#/components/schemas/metaEntity'
        state:
          type: string
          description: Identity state
        status:
          type: string
          description: Identity status
          enum:
            - ACTIVE
            - DELETED
            - INACTIVE
            - LOST
            - STOLEN
            - SUSPENDED
            - TERMINATED
    walletIdentityPatchPayload:
      type: object
      required:
        - friendlyName
      properties:
        friendlyName:
          type: string
          description: Identity friendly name
        safeValue:
          type: string
          description: >-
            Identity safe value (e.g. "original value salted and hashed") -
            safeValue can then be used in external systems like analytics,
            referencing the original identity, and providing uniqueness within a
            retailer, but without exposing sensible information like card
            number.
        secret:
          type: string
          description: Identity secret
        dates:
          $ref: '#/components/schemas/datesEntity'
        meta:
          $ref: '#/components/schemas/metaEntity'
    statePatchPayload:
      type: object
      required:
        - state
      properties:
        state:
          type: string
          description: The state to set.
      example:
        state: EARNBURN
    multipleStatePatchPayload:
      type: array
      items:
        type: object
        properties:
          accountId:
            type: string
            format: string
            nullable: false
            description: The account ID to apply the operation against.
          state:
            type: string
            description: The state to set.
          dates:
            $ref: '#/components/schemas/datesEntity'
          meta:
            $ref: '#/components/schemas/metaEntity'
        required:
          - accountId
          - state
      example:
        - accountId: 1234
          state: EARNBURN
          dates:
            start: '2025-04-20T00:00:00+00:00'
            end: '2025-05-22T00:00:00+00:00'
        - accountId: 1256
          state: EARNBURN
          meta:
            someKey: someValue
    emptyPatchPayload:
      type: object
      example: '{}'
    servicesWalletAccountsPayload:
      type: object
      required:
        - type
        - identities
        - accounts
      properties:
        type:
          type: string
          description: Type of the Wallet to be created; e.g. CONSUMER
        status:
          type: string
          description: Wallet status
          enum:
            - ACTIVE
            - INACTIVE
            - SUSPENDED
            - TERMINATED
        state:
          type: string
          description: Wallet state
        friendlyName:
          type: string
          description: The friendly name of the wallet
        identities:
          type: array
          items:
            $ref: >-
              #/components/schemas/walletIdentityCreatePayload
        accounts:
          type: object
          properties:
            campaign:
              type: array
              items:
                $ref: >-
                  #/components/schemas/walletCouponAccountCreationPayloadOptionalCampaignTag
            scheme:
              type: array
              items:
                $ref: >-
                  #/components/schemas/servicesWalletAccountsSchemePayload
        consumer:
          $ref: '#/components/schemas/walletConsumerCreatePayload'

      example:
        type: 'BASIC_PARENT'
        status: 'ACTIVE'
        state: 'BASIC'
        friendlyName: 'testWallet_854935006'
        identities:
          - friendlyName: ''
            type: 'BASIC_CARD'
            state: 'BASIC'
            status: 'ACTIVE'
            value: 'identityValue_1526762061'
          - friendlyName: ''
            type: 'BASIC_CARD'
            state: 'BASIC'
            status: 'ACTIVE'
            value: 'identityValue_1978067984'
        accounts:
          campaign:
            - campaignId: '12619'
              tokenCode: '20211022112335729351'
              status: 'ACTIVE'
              state: 'BASIC'
              dates:
                start: '2021-10-23T00:00:00+00:00'
                end: '2021-11-22T00:00:00+00:00'
            - campaignId: '12619'
              status: 'ACTIVE'
              state: 'BASIC'
          scheme:
            - schemeId: '12653'
              status: 'ACTIVE'
              state: 'EARNONLY'
        consumer:
          type: 'INDIVIDUAL'
          state: 'DEFAULT'
          status: 'ACTIVE'
          data:
            personal:
              firstName: "John"
              lastName: "Doe"

    servicesWalletAccountsSchemePayload:
      type: object
      required:
        - schemeId
      properties:
        schemeId:
          type: string
        status:
          $ref: '#/components/schemas/accountStatusEntity'
        state:
          type: string
          description: Account state
        dates:
          $ref: '#/components/schemas/datesEntity'
        meta:
          $ref: '#/components/schemas/metaEntity'
        details:
          $ref: '#/components/schemas/detailsEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
        balances:
          $ref: '#/components/schemas/accountBalancesCreateEntity'

    amendRewardBankWalletLinkPayload:
      type: object
      required:
        - status
        - state
        - validFrom
        - validTo
      properties:
        pointsRewardBankRewardId:
          type: string
          format: string
          description: >-
            [Optional] This optional request attribute allows to create more
            granular links, allowing to link a wallet to a Reward Bank and to a
            specific Reward from that Bank
        status:
          type: string
          description: 'Link Status'
          enum:
            - ACTIVE
            - USED
            - EXPIRED
            - CANCELLED
            - DELETED
        state:
          type: string
          format: string
          description: >-
            Link state - please refer to your Wallet Config document as
            available for each Client enum values for this field, and their
            meaning should be documented there
        validFrom:
          type: string
          format: ees-date-time
          description: Link Validity-From a Date-time (ATOM format)
        validTo:
          type: string
          format: ees-date-time
          description: Link Validity-To a Date-time (ATOM format)
      example:
        status: ACTIVE
        state: BASIC
        validFrom: '2020-01-12T01:00:01+01:00'
        validTo: '2021-01-12T01:00:01+01:00'
    createRewardBankWalletLinkPayload:
      type: object
      required:
        - type
        - status
        - state
        - validFrom
        - validTo
      properties:
        pointsRewardBankRewardId:
          type: string
          format: string
          description: >-
            [Optional] This optional request attribute allows to create more
            granular links, allowing to link a wallet to a Reward Bank and to a
            specific Reward from that Bank
        type:
          type: string
          format: string
          description: >-
            Link Type - please refer to your Wallet Config document as
            available for each Client enum values for this field, and their
            meaning should be documented there
        status:
          type: string
          description: 'Link Status'
          enum:
            - ACTIVE
            - USED
            - EXPIRED
            - CANCELLED
            - DELETED
        state:
          type: string
          format: string
          description: >-
            Link state - - please refer to your Wallet Config document as
            available for each Client enum values for this field, and their
            meaning should be documented there
        validFrom:
          type: string
          format: ees-date-time
          description: Link Validity-From a Date-time (ATOM format)
        validTo:
          type: string
          format: ees-date-time
          description: Link Validity-To a Date-time (ATOM format)
      example:
        type: BASIC_LINK_TYPE
        status: ACTIVE
        state: BASIC
        validFrom: '2020-01-12T01:00:01+01:00'
        validTo: '2021-01-12T01:00:01+01:00'
    reasonCodePayload:
      type: object
      properties:
        details:
          type: object
          properties:
            reasoncode:
              type: string
            reference:
              type: string
    pointsrewardBankWalletLinkEntity:
      type: object
      required:
        - pointsRewardBankWalletLinkId
        - walletId
        - pointsRewardBankId
        - pointsRewardBankRewardId
        - type
        - status
        - state
        - validFrom
        - validTo
        - dateCreated
        - lastUpdated
      properties:
        pointsRewardBankWalletLinkId:
          type: string
          format: string
          description: EES AIR Link ID
        walletId:
          type: string
          format: string
          description: EES AIR Wallet ID
        pointsRewardBankId:
          type: string
          format: string
          description: EES AIR Reward Bank ID
        pointsRewardBankRewardId:
          type: string
          format: string
          description: Reward ID
        type:
          type: string
          format: string
          description: >-
            Link Type - please refer to your Wallet Config document as
            available for each Client enum values for this field, and their
            meaning should be documented there
        status:
          type: string
          description: Link Status
          enum:
            - ACTIVE
            - USED
            - EXPIRED
            - CANCELLED
            - DELETED
        state:
          type: string
          format: string
          description: >-
            Link state - - please refer to your Wallet Config document as
            available for each Client enum values for this field, and their
            meaning should be documented there
        validFrom:
          type: string
          format: ees-date-time
          description: Link Validity-From a Date-time (ATOM format)
        validTo:
          type: string
          format: ees-date-time
          description: Link Validity-To a Date-time (ATOM format)
        dateCreated:
          type: string
          format: ees-date-time
          description: Link Creation Date-time (ATOM format)
        lastUpdated:
          type: string
          format: ees-date-time
          description: Link last update Date-time (ATOM format)
      example:
        pointsRewardBankWalletLinkId: '76'
        pointsRewardBankId: '6855'
        pointsRewardBankRewardId: '5077'
        type: DEFAULT_LINK_TYPE
        status: ACTIVE
        state: BASIC
        validFrom: '2020-03-19T00:00:00+00:00'
        validTo: '2020-04-19T00:00:00+01:00'
        dateCreated: '2020-03-23T08:35:22+00:00'
        lastUpdated: '2020-03-23T08:35:22+00:00'
    walletConsumerEntity:
      type: object
      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.
          properties:
            key1:
              type: string
              description: >-
                Data 1 property, up to 255 characters; up to 255 characters for
                Key 1 Value
            key2:
              type: string
              description: >-
                Data 2 property, up to 255 characters; up to 255 characters for
                Key 2 Value
        meta:
          $ref: '#/components/schemas/metaEntity'
        personal:
          type: object
          description: It contains the data about the person.
          required:
            - title
            - firstName
            - lastName
          properties:
            title:
              type: string
              description: The title of the person.
            firstName:
              type: string
              description: First name of the person.
            lastName:
              type: string
              description: Last name of the person.
            preferredName:
              type: string
              description: If provided, the preferred name of the person.
            language:
              type: string
              description: If provided, the preferred language of the person.
            gender:
              type: string
              description: If provided, the given gender of the person.
            birthDate:
              type: string
              description: If provided, the given date of birth.
        address:
          type: array
          description: Any kind of address.
          items:
            type: object
            required:
              - name
              - line1
              - city
              - county
              - postcode
              - country
            properties:
              name:
                type: string
                description: An identifier for this particular address.
              type:
                type: string
                description: Type of address, usually not required but may be needed for BFPO.
                enum:
                  - local
                  - overseas
                  - bfpo
              line1:
                type: string
                description: First address line.
              line2:
                type: string
                description: Second address line.
              line3:
                type: string
                description: Third address line.
              city:
                type: string
                description: City.
              state:
                type: string
                description: State/Provence, if applicable in the territory.
              county:
                type: string
                description: County.
              postcode:
                type: string
                description: Postcode.
              country:
                type: string
                description: Country.
        contact:
          type: array
          description: Contact details for an entity.
          items:
            type: object
            required:
              - name
              - type
              - value
            properties:
              name:
                type: string
                description: Unique per type of contact, used to differentiate contacts of the same type.
              type:
                type: string
                description: The type of contact, used to set the communication medium.
                enum:
                  - email
                  - phone
                  - whatsapp
              value:
                type: string
                description: The contact value to be used in communications.
        communication:
          type: array
          description: Information relating to a marketing channel, including optin options.
          items:
            type: object
            required:
              - type
            properties:
              type:
                type: string
                description: The type of channel used for communication.
                enum:
                  - default
                  - sms
                  - email
                  - postal
                  - phone
              optin:
                type: object
                description: Information about optin options.
                required:
                  - admin
                properties:
                  admin:
                    type: boolean
                    description: Indication of optin to administrative communications.
                  marketing:
                    type: boolean
                    description: Indication of optin to marketing communications.
        consent:
          type: array
          description: Types of consent that may have been agreed to.
          items:
            type: object
            required:
              - name
              - accepted
            properties:
              name:
                type: string
                description: A unique name identifying the name of the consented agreement. Take care for the name to be specific enough to be identified later.
              accepted:
                type: boolean
                description: A simple boolean indicating consent has been agreed.
              datetime:
                type: string
                description: The date and time that the consent was given.
              link:
                type: string
                description: A link (if applicable) to the consent agreement.
              signature:
                type: string
                description: A digital signature link, image link, or some other proof that the consent was agreed.
        preference:
          type: object
          description: Information about the store preference.
          properties:
            store:
              type: array
              description: Information about the store.
              items:
                type: object
                properties:
                  brand:
                    type: string
                    description: The name of the brand.
                  outlet:
                    type: array
                    description: Information about the outlet.
                    items:
                      type: string
        segment:
          type: array
          description: It holds information about a marketing segment against an entity.
          items:
            type: object
            required:
              - labels
            properties:
              labels:
                type: array
                minItems: 1
                description: List of segment labels that the entity belongs to for the given segmentation entry. The list can be used to denote hierarchy, lowest indexed items are higher in hierarchy terms. At least one item is required.
                items:
                  type: string
              data:
                type: object
                description: A place to store arbitrary domain-specific data against the segmentation object.
              base:
                type: string
                description: An optional base of segmentation that is being applied.
                enum:
                  - DEM
              weight:
                type: integer
                description: The relative importance of the segmentation entry, lower numbers are lighter and more important, higher numbers are heavier and sink lower.
              confidence:
                type: number
                description: The score of how likely the segmentation is to be correct. Valid values are floats less than or equal to 1.
        segmentation:
          type: array
          description: It holds information about the result of Marketing Segmentation against a given entity.
          items:
            type: object
            required:
              - name
              - segments
            properties:
              name:
                type: string
                description: Customer defined name / category for the segment.
              segments:
                type: array
                description: It contains segment objects in the array.
                items:
                  type: object
                  required:
                    - labels
                  properties:
                    labels:
                      type: array
                      minItems: 1
                      description: List of segment labels that the entity belongs to for the given segmentation entry. The list can be used to denote hierarchy, lowest indexed items are higher in hierarchy terms. At least one item is required.
                      items:
                        type: string
                    data:
                      type: object
                      description: A place to store arbitrary domain-specific data against the segmentation object.
                    base:
                      type: string
                      description: An optional base of segmentation that is being applied.
                      enum:
                        - DEM
                    weight:
                      type: integer
                      description: The relative importance of the segmentation entry, lower numbers are lighter and more important, higher numbers are heavier and sink lower.
                    confidence:
                      type: number
                      description: The score of how likely the segmentation is to be correct. Valid values are floats less than or equal to 1.
        dimension:
          type: array
          description: Dimensions are a means for defining arbitrary facts against an entity. The Air system may define standard dimension names against entities.
          items:
            type: object
            required:
              - label
              - value
            properties:
              label:
                type: string
                description: Name of a dimension, standard supported names may exist in the main entity, refer to entity documentation for details.
              value:
                type: string
                description: The value for the dimension, must be a string.
        dateCreated:
          description: Date this Wallet Consumer was created
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        lastUpdated:
          description: Date this Wallet Consumer was last updated
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
    walletInvitesEntity:
      type: object
      properties:
        limit:
          type: integer
          description: Results per page
        total:
          type: integer
          description: Total Results
        offset:
          type: integer
          description: Offset
        orderBy:
          type: array
          description: Order by criteria.
          items:
            type: object
            properties:
              name:
                type: string
                description: The sorting key
              order:
                type: string
                description: The sorting direction.
        results:
          type: array
          items:
            $ref: '#/components/schemas/walletInviteEntity'
    walletIdentitiesEntity:
      type: object
      properties:
        limit:
          type: integer
          description: Results per page
        total:
          type: integer
          description: Total Results
        offset:
          type: integer
          description: Offset
        orderBy:
          type: array
          description: Order by criteria.
          items:
            type: object
            properties:
              name:
                type: string
                description: The sorting key
              order:
                type: string
                description: The sorting direction.
        results:
          type: array
          items:
            $ref: '#/components/schemas/walletIdentityEntity'
    datesEntity:
      type: object
      properties:
        start:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        end:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
    walletIdentityEntity:
      type: object
      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 sensible 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
            - INACTIVE
            - LOST
            - STOLEN
            - SUSPENDED
            - TERMINATED
        dateCreated:
          description: Date this identity was created
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        lastUpdated:
          description: Date this identity was last updated
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        mobileWallet:
          type: string
          description: >-
            A url that can be used to add this identity to a mobile wallet (like
            Apple Wallet and Google Pay)
    walletInviteEntity:
      type: object
      properties:
        walletInviteId:
          type: string
          description: Invite ID
        walletId:
          type: string
          description: The Wallet ID
        guid:
          type: string
          description: Invite GUID
        description:
          type: string
          description: Invite description
        reference:
          type: string
          description: Invite reference
        status:
          type: string
          description: Invite status
          enum:
            - ACTIVE
            - CANCELLED
            - EXPIRED
            - ACCEPTED
            - REJECTED
        state:
          type: string
          description: Invite state
        type:
          type: string
          description: Type of the Invite
        meta:
          $ref: '#/components/schemas/metaEntity'
        validFrom:
          description: Date this invite is valid from
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        validTo:
          description: Date this invite is valid to
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        dateCreated:
          description: Date this invite was created
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        lastUpdated:
          description: Date this invite was last updated
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
    walletEntity:
      type: object
      properties:
        walletId:
          type: string
          description: Wallet ID
        friendlyName:
          type: string
          description: Friendly Name of the Wallet
        status:
          type: string
          description: Status of the EE Wallet.
          enum:
            - ACTIVE
            - DELETED
            - INACTIVE
            - SUSPENDED
            - TERMINATED
            - MERGED
        type:
          type: string
          description: >-
            Wallet flag informing what is the type of that particular wallet.
            Could be defined per Client as part of the Onboarding process.
        state:
          type: string
          description: >-
            Additional flag, list of possible enum values could be defined per
            Client, as part of the Onboarding process.
        relationships:
          $ref: '#/components/schemas/walletRelationshipsEntity'
        meta:
          $ref: '#/components/schemas/metaEntity'
        dateCreated:
          description: Date-time (ATOM) this Wallet was created
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        lastUpdated:
          description: Date-time (ATOM) this wallet was last updated
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
      example:
        walletId: '10663859'
        friendlyName: John's Wallet
        status: ACTIVE
        type: CONSUMER
        state: EARNBURN
        relationships:
          parent: []
          child:
            - '10663858'
          associate: []
          donor: []
        meta:
          key1: Value1
          foo: bar
        dateCreated: '2017-01-03T16:25:58+00:00'
        lastUpdated: '2017-01-03T16:25:58+00:00'
    walletTransactionCreationPayload:
      type: object
      properties:
        parentWalletTransactionId:
          type: string
          description: Parent Wallet Transaction ID
        walletId:
          type: string
          format: string
          description: Wallet ID
        reference:
          type: string
          format: string
          description: Calling party's reference to this transaction
        identityId:
          type: string
          format: string
          description: Wallet Identity ID used for this transaction.
        transactionDateTime:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: Explicit Wallet Identity Date Time (for non real time transactions)
        type:
          type: string
          description: Wallet Transaction Type
        status:
          type: string
          description: Transaction status
          enum:
            - ACTIVE
            - SETTLED
            - EXPIRED
            - CANCELLED
            - DELETED
            - PURGED
        meta:
          $ref: '#/components/schemas/metaEntity'
        state:
          type: string
          description: Transaction state
        expiryDate:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: 'Transaction expiry date (date-time), when transaction should expire.'
        accounts:
          $ref: '#/components/schemas/walletTransactionAccountsEntity'
        basket:
          $ref: '#/components/schemas/walletTransactionBasketEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
    walletTransactionServicesSettlePayload:
      type: object
      properties:
        location:
          $ref: '#/components/schemas/locationEntity'
    walletTransactionServicesReleasePayload:
      type: object
      properties:
        location:
          $ref: '#/components/schemas/locationEntity'
    walletTransactionServicesCancelPayload:
      type: object
      properties:
        location:
          $ref: '#/components/schemas/locationEntity'
    walletTransactionPatchPayload:
      type: object
      properties:
        expiryDate:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: The date that the transaction will expire.
        parentWalletTransactionId:
          type: string
        accounts:
          $ref: '#/components/schemas/walletTransactionAccountsEntity'
        basket:
          $ref: '#/components/schemas/walletTransactionBasketEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
        meta:
          $ref: '#/components/schemas/metaEntity'
    walletTransactionEntity:
      type: object
      properties:
        walletTransactionId:
          type: string
          description: Wallet Transaction ID
        parentWalletTransactionId:
          type: string
          description: Parent Wallet Transaction ID
        walletId:
          type: string
          description: Wallet ID
        reference:
          type: string
          description: Calling party's reference to this transaction
        transactionDateTime:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: Calling party's Transaction Date Time
        identityId:
          type: string
          description: Wallet Identity ID used for this transaction.
        identity:
          type: string
          description: Wallet Identity used for this transaction.
        type:
          type: string
          description: Wallet Transaction Type
        status:
          type: string
          description: Wallet Transaction status
          enum:
            - ACTIVE
            - SETTLED
            - EXPIRED
            - CANCELLED
            - DELETED
            - PURGED
        meta:
          $ref: '#/components/schemas/metaEntity'
        state:
          type: string
          description: Wallet Transaction state
        expiryDate:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: >-
            Wallet Transaction Expiry Timestamp (date-time), when transaction
            should expiry and automatically be settled.
        accounts:
          type: array
          items:
            type: object
            properties:
              accountId:
                type: string
                description: Wallet Account ID
              accountTransactionId:
                type: string
                description: Wallet Account Transaction ID
        basket:
          $ref: '#/components/schemas/walletTransactionBasketEntity'
        channel:
          type: string
          description: Channel used for Transaction creation or update
        location:
          $ref: '#/components/schemas/locationEntity'
        dateCreated:
          description: Date this Wallet Transaction was created
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        lastUpdated:
          description: Date this Wallet Transaction was last updated
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"

    walletTransactionExpandedEntity:
      type: object
      properties:
        walletTransactionId:
          type: string
          description: Wallet Transaction ID
        parentWalletTransactionId:
          type: string
          description: Parent Wallet Transaction ID
        walletId:
          type: string
          description: Wallet ID
        reference:
          type: string
          description: Calling party's reference to this transaction
        transactionDateTime:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: Calling party's Transaction Date Time
        identityId:
          type: string
          description: Wallet Identity ID used for this transaction.
        type:
          type: string
          description: Wallet Transaction Type
        status:
          type: string
          description: Wallet Transaction status
          enum:
            - ACTIVE
            - SETTLED
            - EXPIRED
            - CANCELLED
            - DELETED
            - PURGED
        meta:
          $ref: '#/components/schemas/metaEntity'
        state:
          type: string
          description: Wallet Transaction state
        expiryDate:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: >-
            Wallet Transaction Expiry Timestamp (date-time), when transaction
            should expiry and automatically be settled.
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/walletAccountTransactionEntity'
        basket:
          $ref: '#/components/schemas/walletTransactionBasketEntity'
        channel:
          type: string
          description: Channel used for Transaction creation or update
        location:
          $ref: '#/components/schemas/locationEntity'
        dateCreated:
          description: Date this Wallet Transaction was created
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        lastUpdated:
          description: Date this Wallet Transaction was last updated
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
    walletTransactionHistoryEntity:
      type: object
      description: Details about the history of wallet transaction.
      properties:
        walletTransactionHistoryId:
          type: string
          description: Unique identifier for Wallet Transaction History
        walletTransactionId:
          type: string
          description: Unique identifier for Wallet Transaction
        identityId:
          type: string
          description: Unique identifier for Identity
        identity:
          type: string
          description: Identity Value
        type:
          type: string
          description: Wallet Transaction Type Value
        status:
          type: string
          description: Wallet Transaction Status Value
        state:
          type: string
          description: Wallet Transaction State Value
        expiryDate:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: Wallet Transaction Expiry Timestamp (date-time in ATOM format), when transaction should
            expiry and automatically be settled.
        basket:
          type: array
          items:
            type: object
            properties:
              contents:
                type: string
                description: Basket contents
              summary:
                type: string
                description: Basket summary
              payment:
                type: string
                description: Basket payment
        location:
          type: array
          items:
            $ref: '#/components/schemas/locationEntity'
        accounts:
          $ref: '#/components/schemas/walletTransactionAccountsEntity'
        meta:
          type: string
          description: Wallet Transaction expiry
        dateCreated:
          description: Date this Wallet Transaction History was created
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        lastUpdated:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: Wallet Transaction expiry
    walletTransactionBasketEntity:
      type: object
      description: Details about the basket related to the wallet transaction.
      properties:
        summary:
          $ref: '#/components/schemas/walletTransactionBasketSummaryEntity'
        contents:
          $ref: '#/components/schemas/walletTransactionBaskeContentstEntity'
        payment:
          type: object
          description: Payment Object - TBC

    walletTransactionBaskeContentstEntity:
      type: array
      items:
        $ref: '#/components/schemas/walletTransactionBaskeContentstItemEntity'

    walletTransactionBasketSummaryEntity:
      type: array
      items:
        type: object
        properties:
          pointsCredited:
            type: integer
            description: The number of points credited to the account by the transaction.
          pointsRedeemed:
            type: integer
            description: The number of points redeemed to the account by the transaction.
          pointsRefunded:
            type: integer
            description: The number of points refunded to the account by the transaction.

    walletTransactionAccountsEntity:
      type: array
      items:
        type: object
        properties:
          accountId:
            type: string
            description: Account ID
          accountTransactionId:
            type: string
            description: Account Transaction ID
    walletTransactionBaskeContentstItemEntity:
      type: object
      properties:
        upc:
          type: string
          description: Item UPC
        description:
          type: string
          description: Item Name / Description
        quantity:
          type: integer
          description: Quantity
        price:
          type: number
          format: double
          description: Item Price
    walletRelationshipsEntity:
      type: object
      properties:
        parent:
          type: array
          description: Array of Wallet IDs that current Wallet should be / is parent
          items:
            type: string
        child:
          type: array
          description: >-
            Array of existing Wallet IDs that current Wallet should be / is
            child
          items:
            type: string
        associate:
          type: array
          description: >-
            anArray of existing Wallet IDs that current Wallet should be / is
            associated to
          items:
            type: string
        donor:
          type: array
          description: >-
            an Array of existing Wallet IDs for which current Wallet is donating
            into
          items:
            type: string
    locationEntity:
      type: object
      properties:
        storeId:
          type: string
          format: string
          description:  >-
            Identifier of the store where this transaction has happened (Outlet Incoming Identifier).
        storeParentId:
          type: string
          format: string
          description:  >- 
            Identifier of the parent store where this transaction has happened (Outlet Parent Incoming Identifier).
            This can be used when the parent of the store is a child of the caller Unit.
    metaEntity:
      type: object
      properties:
        key1:
          type: string
          description: >-
            Meta 1 property, up to 255 characters; up to 255 characters for Key
            1 Value
        key2:
          type: string
          description: >-
            Meta 2 property, up to 255 characters; up to 255 characters for Key
            2 Value
    detailsEntity:
      type: object
      properties:
        key1:
          type: string
          description: >-
            Details 1 property, up to 255 characters; up to 255 characters for Key
            1 Value
        reasonDescription:
          type: string
          description: >-
            Reason Code description
    walletAccountRelationEntity:
      type: array
      items:
        type: object
        required:
          - accountId
          - dateCreated
        properties:
          accountId:
            type: string
            format: int64
            description: Account ID
          dateCreated:
            type: string
            pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
            example: "2017-01-17T13:20:48+00:00"
            description: Relation creation date-time
    walletAccountEntity:
      type: object
      required:
        - accountId
        - walletId
        - campaignId
        - type
        - clientType
        - status
        - state
        - dates
        - balances
        - dateCreated
        - lastUpdated
        - mobileWallet
      description: The account object.
      properties:
        accountId:
          type: string
          description: EES AIR Wallet Account ID
        walletId:
          type: string
          description: EES AIR Wallet ID
        campaignId:
          type: string
          description: The Campaign ID this account belongs to.
        type:
          type: string
          description: EES AIR Account Type.
          enum:
            - ECOUPON
            - VOUCHER
            - STAMP_CARD
            - PAPER
            - DEBIT
            - PLASTIC
            - POINTS
            - CONTINUITY
            - STANDARD_SUBSCRIPTION
            - QUEST
        clientType:
          type: string
          description: Account client type.
        status:
          $ref: '#/components/schemas/accountStatusEntity'
        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'
        relationships:
          type: object
          description: Wallet Accounts Relations
          properties:
            ENTITLEMENT:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
            ENTITLEMENT_OF:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
            OBJECTIVE:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
            OBJECTIVE_OF:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
            PROMOTION:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
            PROMOTION_OF:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
            BOUNCE_BACK_REWARD:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
            BOUNCE_BACK_REWARD_OF:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
            COUPON_STAMP_REWARD:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
            COUPON_STAMP_REWARD_OF:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
            LOYALTY_POINTS_REWARD_OF:
              type: object
              properties:
                accountType:
                  $ref: '#/components/schemas/walletAccountRelationEntity'
        overrides:
          $ref: '#/components/schemas/accountOverridesEntity'
        dateCreated:
          description: Date this Account was created
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        lastUpdated:
          description: Date this Account was last updated
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        mobileWallet:
          type: string
          description: The URL that returns a digital platform wallet.
    walletAccountEntityWithRelatedAccounts:
            type: object
            required:
              - accountId
              - walletId
              - campaignId
              - type
              - clientType
              - status
              - state
              - dates
              - balances
              - dateCreated
              - lastUpdated
              - mobileWallet
            description: The account object.
            properties:
              accountId:
                type: string
                description: EES AIR Wallet Account ID.
              walletId:
                type: string
                description: EES AIR Wallet ID.
              campaignId:
                type: string
                description: The Campaign ID this account belongs to.
              type:
                type: string
                description: EES AIR Account Type.
                enum:
                  - ECOUPON
                  - VOUCHER
                  - STAMP_CARD
                  - PAPER
                  - DEBIT
                  - PLASTIC
                  - POINTS
                  - CONTINUITY
                  - STANDARD_SUBSCRIPTION
                  - QUEST
              clientType:
                type: string
                description: Account client type.
              status:
                $ref: '#/components/schemas/accountStatusEntity'
              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'
              relationships:
                type: object
                description: Wallet Accounts Relations.
                properties:
                  ENTITLEMENT:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
                  ENTITLEMENT_OF:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
                  OBJECTIVE:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
                  OBJECTIVE_OF:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
                  PROMOTION:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
                  PROMOTION_OF:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
                  BOUNCE_BACK_REWARD:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
                  BOUNCE_BACK_REWARD_OF:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
                  COUPON_STAMP_REWARD:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
                  COUPON_STAMP_REWARD_OF:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
                  LOYALTY_POINTS_REWARD_OF:
                    type: object
                    properties:
                      accountType:
                        $ref: '#/components/schemas/walletAccountRelationEntity'
              relatedAccounts:
                type: array
                description: >-
                  A collection of related wallet accounts, categorised by objects such as ECOUPON and CONTINUITY.
                  It may also include relationships to other accounts, such as QUEST objects, and is used for multiple accounts.
                items:
                  $ref: '#/components/schemas/walletAccountEntity'
              overrides:
                $ref: '#/components/schemas/accountOverridesEntity'
              dateCreated:
                description: Date this Account was created.
                type: string
                pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
                example: "2017-01-17T13:20:48+00:00"
              lastUpdated:
                description: Date this Account was last updated.
                type: string
                pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
                example: "2017-01-17T13:20:48+00:00"
              mobileWallet:
                type: string
                description: The URL that returns a digital platform wallet.
    tokenEntity:
      type: object
      description: An object representing a token.
      required: ["tokenId", "accountId", "token", "validFrom", "validTo", "dateCreated", "lastUpdated", "status"]
      properties:
        tokenId:
          type: string
          description: The Token ID.
        accountId:
          type: string
          description: The Account ID.
        token:
          type: string
          description: The Token.
        passphrase:
          type: string
          description: In certain operations the passphrase may be included in the response
        validFrom:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: The date this token is valid from.
        validTo:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: The date this token is valid to.
        dateCreated:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: The date this token was created.
        lastUpdated:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: The date this token was last updated.
        status:
          type: string
          description: The status of the Token.
        tokenLock:
          type: object
          description: >-
            Token lock information. All values can be null if no token lock
            exists.
          properties:
            validFrom:
              type: string
              pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
              example: "2017-01-17T13:20:48+00:00"
              description: The date the token lock is valid from.
            validTo:
              type: string
              pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
              example: "2017-01-17T13:20:48+00:00"
              description: The date the token lock is valid to.
    accountOverridesEntity:
      type: object
      description: |
        The object of overrides. A campaign must allow overrides.
      properties:
        continuity:
          type: object
          description: |
            Overrides affecting the offer
          properties:
            qualification:
              type: object
              description: |
                Continuity qualification area of the offer
              properties:
                totalTransactionUnits:
                  type: integer
                  description: The number of units that are needed in the transaction to qualify for the reward.
                totalTransactionSpend:
                  type: integer
                  description: The transaction spend amount needed to qualify for the reward
                totalTransactionCount:
                  type: integer
                  description: The number of transactions needed to qualify for the reward
        offer:
          type: object
          description: |
            Overrides affecting the offer
          properties:
            qualification:
              type: object
              description: Qualification area of the offer
              properties:
                minimumProductSpend:
                  nullable: true
                  type: integer
                  description: The minimum amount that must be spent.
                minimumUnits:
                  nullable: true
                  type: integer
                  description: The minimum number of units that must be in the basket to qualify.
                minimumBasketSpend:
                  nullable: true
                  type: integer
                  description: The minimum amount that must be spent in the basket.
            reward:
              type: object
              description: |
                Reward area of the offer
              properties:
                creditAmount:
                  type: integer
                  description: |
                    The amount of points this account should earn when redeemed
                step:
                  type: integer
                  description: The value of the interval when the discount amount should be stepped up.
                floor:
                  type: integer
                  description: The interval value where the credit amount should start increasing from.
                ceiling:
                  type: integer
                  nullable: true
                  description: The interval value where the credit amount should stop increasing.
                multiplierValue:
                  type: integer
                  description: The multiplication value to apply to the base issuance of points that would normally be awarded for the transaction.
        campaign:
          type: object
          description: |
            Overrides affecting the offer
          properties:
            rules:
              type: object
              description: |
                The campaigns rules
              properties:
                couponLimit:
                  type: integer
                  description: |
                    The amount of times a coupon can be redeemed, 0 is unlimited, 1 is default. If this is not set it will revert to what the campaigns couponLimit is set to
        reward:
          type: object
          description: |
            Overrides affecting the reward
          properties:
            discountAmount:
              type: integer
              minimum: 1
              description: |
                The discount amount to apply to the basket total.
            finalAmount:
              type: integer
              minimum: 1
              description: |
                The final amount to set the basket total to.
            percentageAmount:
              type: number
              minimum: 1
              description: |
                A percentage amount to be discounted. This must be an integer unless `allowDecimal` is enabled in the Unit.
            discountValue:
              type: integer
              minimum: 1
              description: |
                The discount value to increase with every interval.
    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 CONTINUITY type
            Accounts. If totalSpend is not provided on creation, this will be
            set to 0.
        totalUnits:
          type: integer
          description: >-
            The total units balance. Applicable only to CONTINUITY type
            Accounts. If totalUnits is not provided on creation, this will be
            set to 0.
        transactionCount:
          type: integer
          description: >-
            The transaction counter. Applicable only to CONTINUITY type
            Accounts. If transactionCount is not provided on creation, this will
            be set to 0.
        current:
          type: integer
          description: >-
            The current balance. Applicable only to accounts of type POINTS and
            STAMP. If 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
            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
            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 not provided on creation, this will be set to 0.
        objectivesMet:
          type: integer
          description: >-
            The number of completed objectives. Applicable to only accounts of type QUEST.
    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.
    accountPointsAvailableEntity:
      type: object
      description: The object of available points and their expiry date.
      properties:
        points:
          type: integer
          description: This is a batch of points to be expired at a specific date.
        records:
          type: integer
          description: The number of records evaluated in order to calculate these results.
        validTo:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: This is the expiry date for this specific batch of points.
    accountStatusEntity:
      type: string
      description: Account Status
      default: ACTIVE
      enum:
        - ACTIVE
        - BLOCKED
        - CANCELLED
        - DELETED
        - EXPIRED
        - INACTIVE
        - INVALIDATED
        - LOCKED
        - STOLEN
        - USED
        - SUSPENDED
    walletProgrammeAccountCreationPayload:
      type: object
      properties:
        balances:
          $ref: '#/components/schemas/accountBalancesCreateEntity'
    walletAccountBaseCreationPayload:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/accountStatusEntity'
        state:
          type: string
          description: Account state
        currency:
          type: string
        dates:
          $ref: '#/components/schemas/datesEntity'
        meta:
          $ref: '#/components/schemas/metaEntity'
        details:
          $ref: '#/components/schemas/detailsEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
        balances:
          $ref: '#/components/schemas/accountBalancesCreateEntity'
        overrides:
          $ref: '#/components/schemas/accountOverridesEntity'
    walletCouponAccountCreationPayload:
      allOf:
        - $ref: '#/components/schemas/walletAccountBaseCreationPayload'
      type: object
    walletCouponAccountCreationPayloadOptionalCampaignTag:
      allOf:
        - $ref: '#/components/schemas/walletCouponAccountCreationPayload'
      type: object
      properties:
        campaignId:
          type: string
          format: string
          description: Campaign ID
        campaignTag:
          type: string
          format: string
          description: Campaign Tag
        tokenCode:
          type: string
          format: string
          description: Token Code (please note that this will not work if a value is
            provided for campaignTag, only campaignId)
    walletCouponAccountCreationPayloadOptionalCampaignReference:
      allOf:
        - $ref: '#/components/schemas/walletCouponAccountCreationPayload'
      type: object
      properties:
        campaignId:
          type: string
          format: string
          description: Campaign ID
        campaignReference:
          type: string
          format: string
          description: Campaign Reference
    walletRelatedAccountCreationPayloadOptionalCampaignReference:
      allOf:
        - $ref: '#/components/schemas/walletCouponAccountCreationPayloadOptionalCampaignReference'
      type: object
      properties:
        parentAccountId:
          type: string
          format: string
          description: Parent Account ID
    accountBalancesCreateEntity:
      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 STAMP, POINTS and CONTINUITY, which uses its own balance
            keys, and ECOUPON, which has no concept of a balance.
        totalSpend:
          type: integer
          description: >-
            The total spend balance. Applicable only to accounts of type
            Continuity. If totalSpend is not provided on creation, this will be
            set to 0.
        transactionCount:
          type: integer
          description: >-
            The transaction counter. Applicable only to accounts of type
            Continuity. If transactionCount is not provided on creation, this
            will be set to 0.
        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.
        objectivesMet:
          type: integer
          description: >-
            The number of completed objectives. Applicable to only accounts of type QUEST.
    walletAccountPatchPayload:
      type: object
      properties:
        dates:
          $ref: '#/components/schemas/datesEntity'
        meta:
          $ref: '#/components/schemas/metaEntity'
        state:
          type: string
    walletAccountTransactionEntity:
      type: object
      description: Object representing an account transaction.
      properties:
        accountTransactionId:
          type: string
          description: The account transaction id.
        accountId:
          type: string
          description: The account id related to this transaction.
        parentAccountTransactionId:
          type: string
          description: The parent account transaction.
        event:
          type: string
          description: The type of transaction.
          enum:
            - CREATE
            - REDEEM
            - 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
          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
          description: 'The source of this transaction e.g. from a client, or automated.'
        transactionDetails:
          type: object
          description: >-
            An simple object of key value pairs representing the transaction
            details. For Points and Continuity, this can contain a JSON encoded
            object with the details of the amounts applied to each balance.
        balancesBefore:
          $ref: '#/components/schemas/accountTransactionBalancesHistoryEntity'
        balancesAfter:
          $ref: '#/components/schemas/accountTransactionBalancesHistoryEntity'
        properties:
          type: object
          description: Properties related to the account transaction.
        dateCreated:
          description: Date this account transaction was created
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        lastUpdated:
          description: Date this account transaction was last updated
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        account:
          $ref: '#/components/schemas/walletAccountEntity'
        children:
          type: array
          description: >-
            List of Child Wallet Account Transactions - for operations on
            multiple and linked accounts this property will be populated.
          items:
            $ref: '#/components/schemas/walletAccountTransactionChildEntity'
        rewardAccounts:
          type: array
          nullable: true
          description: >-
            List of Reward Account Transactions or Accounts - for operations on
            multiple and linked accounts this property will be populated.
          items:
            oneOf:
              - $ref: '#/components/schemas/walletAccountEntity'
              - $ref: '#/components/schemas/walletAccountTransactionChildEntity'

    walletAccountTransactionChildEntity:
      type: object
      description: Object representing an account transaction.
      properties:
        accountTransactionId:
          type: string
          description: The account transaction id.
        accountId:
          type: string
          description: The account id related to this transaction.
        parentAccountTransactionId:
          type: string
          description: The parent account transaction.
        event:
          type: string
          description: The type of transaction.
          enum:
            - ACTIVATE
            - AUTOTOPUP
            - BALANCE
            - BLOCK
            - CANCEL
            - CREATE
            - CREDIT
            - DEBIT
            - INACTIVATE
            - INVALIDATE
            - LOAD
            - REACTIVATE
            - REDEEM
            - REFUND
            - REISSUE
            - RESEND
            - SPEND
            - STAMP
            - STOLEN
            - TOPUP
            - TRANSFER
            - TRANSFER_IN
            - UNBLOCK
            - UNLOCK
            - UNREDEEM
            - VERIFY
            - VOID
        value:
          type: integer
          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
          description: The source of this transaction e.g. from a client, or automated.
        transactionDetails:
          type: object
          description: >-
            An simple object of key value pairs representing the transaction
            details. For Points and Continuity, this can contain a JSON encoded
            object with the details of the amounts applied to each balance.
        balancesBefore:
          $ref: '#/components/schemas/accountTransactionBalancesHistoryEntity'
        balancesAfter:
          $ref: '#/components/schemas/accountTransactionBalancesHistoryEntity'
        properties:
          type: object
          description: Properties related to the account transaction.
        dateCreated:
          description: Date this account transaction was created
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        lastUpdated:
          description: Date this account transaction was last updated
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
        account:
          $ref: '#/components/schemas/walletAccountEntity'
        children:
          description: >-
            List of Child Wallet Account Transactions - for operations on
            multiple and linked accounts this property will be populated. 
            This is a recursive array of contents with the same schema as 
            this object.
        rewardAccounts:
          type: array
          items:
            $ref: '#/components/schemas/walletAccountEntity'
          nullable: true
          description: >-
            List of Reward Account Transactions or Accounts - for operations on
            multiple and linked accounts this property will be populated.

    accountCreditTransactionPayload:
      type: object
      required:
        - balances
      properties:
        ignorePendingPoints:
          type: boolean
          description: >-
            If set to true, Pending Points rules will be ignored,
            and the points being credited will be immediately usable.
          default: false
        balances:
          type: object
          description: >-
            The object of balances with the amounts to credit against each
            balance. See below for details on which balances apply to which
            account types.
          properties:
            totalSpend:
              type: integer
              description: >-
                Applicable only for CONTINUITY accounts, this is the amount to
                credit against the totalSpend balance.
            transactionCount:
              type: integer
              description: >-
                Applicable only for CONTINUITY accounts, this is the amount to
                credit against the transactionCount balance.
            current:
              type: integer
              description: >-
                Applicable only for POINTS accounts, this is the amount to
                credit against the current balance. This will also update
                lifetime and usable balances for points.
            available:
              type: integer
              description: The amount to credit against the available balance.
            refundable:
              type: integer
              description: >-
                If set, must be either 0 (for non-refundable) or match the
                available amount (100% refundable).
        location:
          $ref: '#/components/schemas/locationEntity'
        details:
          $ref: '#/components/schemas/detailsEntity'
        reasonCode:
          type: string
          format: string
          description: Reason Code
    accountEarnTransactionPayload:
      type: object
      properties:
        balances:
          type: object
          description: >-
            The object of balances with the amounts to earn (credit) against
            each balance. See below for details on which balances apply to which
            account types.
          properties:
            totalSpend:
              type: integer
              format: int64
              description: >-
                Applicable only for CONTINUITY accounts, this is the amount to
                credit against the totalSpend balance.
            transactionCount:
              type: integer
              format: int64
              description: >-
                Applicable only for CONTINUITY accounts, this is the amount to
                credit against the transactionCount balance.
            current:
              type: integer
              format: int64
              description: >-
                Applicable only for POINTS accounts, this is the amount to
                credit against the current balance. This will
                  also update lifetime and usable balances for points.
            available:
              type: integer
              format: int64
              description: The amount to credit against the available balance.
            refundable:
              type: integer
              format: int64
              description: >-
                If set, must be either 0 (for non-refundable) or match the
                available amount (100% refundable).
        totalTransactionValue:
          type: integer
          format: int64
          description: >-
            Monetary Value of a Transaction for which AIR should calculate and
            credit amount of points
        rateName:
          type: string
          format: string
          description: >-
            Optional rate name to be used for amount of points calculation, if
            not specified `default` will be used
        location:
          $ref: '#/components/schemas/locationEntity'
        details:
          $ref: '#/components/schemas/detailsEntity'
    accountVerifyTransactionPayload:
      type: object
      required:
        - balances
      properties:
        lock:
          type: boolean
          description: >-
            Optional property which will lock the account after verify if passed
            as true. Default false.
        balances:
          type: object
          properties:
            available:
              type: integer
              description: A positive value of zero or more
        details:
          $ref: '#/components/schemas/detailsEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
    accountDebitTransactionPayload:
      type: object
      required:
        - balances
      properties:
        balances:
          type: object
          description: >-
            The object of balances with the amounts to debit against each
            balance. See below for details on which balances are applicable to
            which account types.
          properties:
            totalSpend:
              type: integer
              description: >-
                Applicable only for CONTINUITY accounts, this is the amount to
                debit against the totalSpend balance.
            totalUnits:
              type: integer
              description: >-
                Applicable only for CONTINUITY accounts, this is the amount to
                debit against the totalUnits balance.
            transactionCount:
              type: integer
              description: >-
                Applicable only for CONTINUITY accounts, this is the amount to
                debit against the transactionCount balance.
            current:
              type: integer
              description: >-
                Applicable only for POINTS accounts, this is the amount to debit
                against the current balance. This will also update lifetime and
                usable balances for points.
            available:
              type: integer
              description: The amount to debit against the available balance.
        details:
          $ref: '#/components/schemas/detailsEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
    accountSpendTransactionPayload:
      type: object
      required:
        - balances
      properties:
        balances:
          type: object
          description: The object of balances with the amounts to be adjusted.
          properties:
            current:
              type: integer
              description: Amount to be debited against the current balance.
        details:
          $ref: '#/components/schemas/detailsEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
    accountLoadTransactionPayload:
      type: object
      required:
        - balances
      properties:
        autoActivateOnLoad:
          type: boolean
          description: >-
            Dictates whether to activate the account on load. If not passed, it
            will default to true.
        balances:
          type: object
          description: >-
            The object of balances with the amount to load against the available
            balance for stored value accounts.
          properties:
            available:
              type: integer
              description: >-
                Note, you can load onto an already active account, in which case
                the available will act like a credit.
        location:
          $ref: '#/components/schemas/locationEntity'
        details:
          $ref: '#/components/schemas/detailsEntity'
    accountRedeemTransactionPayload:
      type: object
      required:
        - balances
      properties:
        balances:
          type: object
          description: >-
            The object of balances with the amount to load against the available
            balance for stored value accounts.
          properties:
            available:
              type: integer
              description: >-
                Note, you can load onto an already active account, in which case
                the available will act like a credit.
        location:
          $ref: '#/components/schemas/locationEntity'
        details:
          $ref: '#/components/schemas/detailsEntity'
    accountBalancesTransactionPayload:
      type: object
      properties:
        balances:
          type: object
          description: >-
            The object of balances with the amount to load against the available
            balance for stored value accounts.
          properties:
            available:
              type: integer
              description: >-
                Note, you can load onto an already active account, in which case
                the available will act like a credit.
        location:
          $ref: '#/components/schemas/locationEntity'
        details:
          $ref: '#/components/schemas/detailsEntity'
    walletTransactionServicesUpdatePayload:
      type: object
      properties:
        parentWalletTransactionId:
          type: string
          description: Parent Wallet Transaction ID
        identityId:
          type: string
          description: The Identity ID responsible for this transaction.
        meta:
          $ref: '#/components/schemas/metaEntity'
        expiryDate:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: 'Transaction expiry date (date-time), when transaction should expire.'
        accountTransactions:
          type: array
          items:
            $ref: >-
              #/components/schemas/walletTransactionServicesAccountTransactionEntity
        basket:
          $ref: '#/components/schemas/walletTransactionBasketEntity'
        location:
          $ref: '#/components/schemas/locationEntity'
        transactionDateTime:
          type: string
          pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
          example: "2017-01-17T13:20:48+00:00"
          description: Explicit Wallet Transaction Date Time (for non real time transactions)
    walletServicesCreatePayload:
      allOf:
        - $ref: '#/components/schemas/walletCreatePayload'
        - properties:
            relationships:
              type: object
              properties:
                child:
                  type: array
                  items:
                    $ref: '#/components/schemas/walletCreatePayload'
                parent:
                  type: array
                  items:
                    $ref: '#/components/schemas/walletCreatePayload'
                associate:
                  type: array
                  items:
                    $ref: '#/components/schemas/walletCreatePayload'
            identities:
              type: array
              items:
                $ref: '#/components/schemas/walletIdentityCreatePayload'
      example:
        type: CONSUMER
        status: ACTIVE
        state: EARNBURN
        friendlyName: Susan's Wallet
        identities:
          - type: CARD
            status: ACTIVE
            value: '12344567890'
          - type: FOB
            status: ACTIVE
            value: 0987654321
        relationships:
          child:
            - type: PARENT_WALLET
              status: ACTIVE
          parent:
            - type: CHILD_WALLET
              status: ACTIVE
          associate:
            - type: ASSOCIATE_WALLET
              status: ACTIVE
        meta:
          key2: Value2
    walletServicesRedeemPayload:
      type: object
      required:
        - walletId
        - pointsValue
      properties:
        walletId:
          type: string
          description: Wallet ID
        identity-value:
          type: string
          description: Wallet Identity Value
        pointsValue:
          type: string
          description: Specifies the amount of points to give to the wallet (value can be negative)
        reasonCode:
          type: string
          description: A set of enumerations for awarding points against a scheme, used for down stream reporting
        location:
          $ref: '#/components/schemas/locationEntity'
        walletTransactionType:
          type: string
          default: ADJUSTMENT
          description: Designates the type of the transaction
        walletTransactionState:
          type: string
          description: Designates the state of the transaction
        walletTransactionDescription:
          type: string
          description: The description of the transaction
        walletTransactionReference:
          type: string
          description: The referenceId for the transaction.
        walletTransactionDate:
          type: string
          description: Designates the start date of the transaction
        meta:
          $ref: '#/components/schemas/metaEntity'
        accountTransactionMeta:
          $ref: '#/components/schemas/metaEntity'
      oneOf:
        - required:
          - campaignReference
          properties:
            campaignReference:
              type: string
              description: A reference for a campaign that can be set by an external system
        - required:
          - campaignId
          properties:
            campaignId:
              type: string
              description: The identifier of the campaign
        - required:
          - accountId
          properties:
            accountId:
              type: string
              description: The identifier for a single account

    walletServicesRefundPayload:
      type: object
      required:
        - walletId
        - pointsValue
        - schemeId
      properties:
        walletId:
          type: string
          description: Wallet ID
        identity-value:
          type: string
          description: Wallet Identity Value
        pointsValue:
          type: string
          description: Specifies the amount of points to refund
        monetaryValue:
          type: string
          description: Specifies the monetary value to refund
        reasonCode:
          type: string
          description: A set of enumerations for awarding points against a scheme, used for down stream reporting
        schemeReference:
          type: string
          description: A reference to the scheme used to find the points account to be refunded (to be used instead of `schemeId`)
        schemeId:
          type: string
          description: An ID of the scheme used to find the points account to be refunded  (can be either `schemeId` or `schemeReference`)
        location:
          $ref: '#/components/schemas/locationEntity'
        walletTransactionType:
          type: string
          default: ADJUSTMENT
          description: Designates the type of the transaction
        walletTransactionState:
          type: string
          description: Designates the state of the transaction
        walletTransactionDescription:
          type: string
          description: The description of the transaction
        walletTransactionReference:
          type: string
          description: The referenceId for the transaction.
        walletTransactionDate:
          type: string
          description: Designates the start date of the transaction
        meta:
          $ref: '#/components/schemas/metaEntity'
        accountTransactionMeta:
          $ref: '#/components/schemas/metaEntity'
    walletServicesAdjustPayload:
      type: object
      required:
        - walletId
        - pointsValue
        - schemeId
      properties:
        walletId:
          type: string
          description: Wallet ID
        identity-value:
          type: string
          description: Wallet Identity Value
        pointsValue:
          type: string
          description: Specifies the amount of points to give to the wallet (value can be negative)
        schemeId:
          type: string
          description: The scheme from which points are awarded from - Can be either schemeId or schemeReference
        schemeReference:
          type: string
          description: A reference the scheme from which points are awarded from
        location:
          $ref: '#/components/schemas/locationEntity'
        walletTransactionType:
          type: string
          default: ADJUSTMENT
          description: Designates the type of the transaction
        walletTransactionState:
          type: string
          description: Designates the state of the transaction
        walletTransactionDescription:
          type: string
          description: The description of the transaction
        walletTransactionReference:
          type: string
          description: The referenceId for the transaction.
        walletTransactionDate:
          type: string
          description: Designates the start date of the transaction
        meta:
          $ref: '#/components/schemas/metaEntity'
        accountTransactionMeta:
          $ref: '#/components/schemas/metaEntity'
    walletServicesEntity:
      allOf:
        - $ref: '#/components/schemas/walletEntity'
        - type: object
          properties:
            identities:
              type: array
              items:
                $ref: '#/components/schemas/walletIdentityEntity'
    walletAccountServicesEntity:
      allOf:
        - $ref: '#/components/schemas/walletEntity'
        - type: object
          properties:
            identities:
              type: array
              items:
                $ref: '#/components/schemas/walletIdentityEntity'
            accounts:
              type: object
              properties:
                campaign:
                  $ref: '#/components/schemas/multiStatus207AccountEntity'
                scheme:
                  $ref: '#/components/schemas/multiStatus207AccountEntity'
            consumer:
              $ref: '#/components/schemas/walletConsumerEntity'
    walletAccountRefreshPayload:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/accountStatusEntity'
        state:
          type: string
          description: >-
            Account state for new entitlements that will be created as a part of
            refresh. For existing entitlements state will not be updated. If not
            provided default wallet account state configuration is used.
        dates:
          $ref: '#/components/schemas/datesEntity'
    exchangePayload:
      type: object
      required:
        - accountId
        - pointsRewardBankId
        - pointsRewardBankRewardId
      properties:
        accountId:
          type: string
          format: string
          description: EES AIR Account ID
        pointsRewardBankId:
          type: string
          format: string
          description: EES AIR Reward Bank ID
        pointsRewardBankRewardId:
          type: string
          format: string
          description: EES AIR Reward Bank Reward ID
        walletTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set a Wallet Transaction
            attribute(s), if not provided defaults will be applied
          properties:
            state:
              type: string
              format: string
              description: >-
                Wallet Transaction State (please note enum values for this
                attribute are Client Specific and should be agreed during Client
                onboarding)
            reference:
              type: string
              format: string
              description: >-
                Client Transaction Reference (please note if provided, it has to
                be unique )
            meta:
              $ref: '#/components/schemas/metaEntity'
        exchangeAccountTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set an Exchange Account
            Transaction attribute(s)
          properties:
            details:
              $ref: '#/components/schemas/metaEntity'
            autotopupAccountTransaction:
              type: object
              properties:
                reasonCode:
                  type: string
                  format: string
                  description: Reason Code
                details:
                  $ref: '#/components/schemas/metaEntity'
        createAccountTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set a Created Account and
            Created Account Transaction attribute(s), if not provided defaults
            will be applied
          properties:
            state:
              type: string
              format: string
              description: >-
                Desired Reward Account State (please note enum values for this
                attribute are Client Specific and should be agreed during Client
                onboarding)
            meta:
              $ref: '#/components/schemas/metaEntity'
            details:
              $ref: '#/components/schemas/metaEntity'
        location:
          type: object
          description: >-
            This optional Request attribute allows to override a location arisen
            from a used API KEY to specify exactly in which Outlet this
            transaction has happened
      example:
        accountId: '1178'
        pointsRewardBankId: '55637'
        pointsRewardBankRewardId: '222333444'
        walletTransaction:
          state: A_STATE
          reference: An exchange Wallet Transaction reference
          meta:
            key: Value
        exchangeAccountTransaction:
          details:
            key1: Key 1 Value
        createAccountTransaction:
          state: BASIC
          meta:
            accountMeta1: foo-bar
          details:
            foo: bar
        location:
          storeId: '32432'
    accountLocationDetailsPatchPayload:
      type: object
      properties:
        location:
          $ref: '#/components/schemas/locationEntity'
        details:
          $ref: '#/components/schemas/detailsEntity'
    donatePayload:
      type: object
      required:
        - amount
        - accountId
        - toWalletId
        - toAccountId
      properties:
        amount:
          type: number
          format: int32
          description: Amount to be donated
        accountId:
          type: string
          format: string
          description: EES AIR Account ID
        walletTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set a Wallet Transaction
            attribute(s), if not provided defaults will be applied
          properties:
            state:
              type: string
              format: string
              description: >-
                Wallet Transaction State (please note enum values for this
                attribute are Client Specific and should be agreed during Client
                onboarding)
            reference:
              type: string
              format: string
              description: >-
                Client Transaction Reference (please note if provided, it has to
                be unique )
            meta:
              $ref: '#/components/schemas/metaEntity'
        childWalletTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set a Wallet Transaction
            attribute(s), if not provided defaults will be applied
          properties:
            state:
              type: string
              format: string
              description: >-
                Wallet Transaction State (please note enum values for this
                attribute are Client Specific and should be agreed during Client
                onboarding)
            reference:
              type: string
              format: string
              description: >-
                Client Transaction Reference (please note if provided, it has to
                be unique )
            meta:
              $ref: '#/components/schemas/metaEntity'
        donateAccountTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set an Exchange Account
            Transaction attribute(s)
          properties:
            details:
              $ref: '#/components/schemas/metaEntity'
        donateInAccountTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set a Create Account and
            Create Account Transaction attribute(s), if not provided defaults
            will be applied
          properties:
            state:
              type: string
              format: string
              description: >-
                dDesired Reward Account State (please note enum values for this
                attribute are Client Specific and should be agreed during Client
                onboarding)
            details:
              $ref: '#/components/schemas/metaEntity'
        location:
          type: object
          description: >-
            This optional Request attribute allows to override a location arisen
            from a used API KEY to specify exactly in which Outlet this
            transaction has happened
      example:
        amount: 1000
        accountId: '169440'
        toWalletId: '654334'
        toAccountId: '356354'
        walletTransaction:
          reference: some unique reference
          state: SOME_STATE
          meta:
            foo: bar
        childWalletTransaction:
          reference: some other unique reference
          state: SOME_STATE
          meta:
            foo: bar
        donateAccountTransaction:
          details:
            key1: foo
        donateInAccountTransaction:
          details:
            key2: bar
    giftPayload:
      type: object
      required:
        - amount
        - accountId
        - toWalletId
        - toAccountId
      properties:
        amount:
          type: number
          format: int32
          description: Amount to be gifted
        accountId:
          type: string
          format: string
          description: EES AIR Account ID the donation is being sent from
        toWalletId:
          type: string
          format: string
          description: ESS Wallet ID the donation is being sent to
        toAccountId:
          type: string
          format: string
          description: ESS AIR Account ID the donation is being sent to
        walletTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set a Wallet Transaction
            attribute(s), if not provided defaults will be applied
          properties:
            state:
              type: string
              format: string
              description: >-
                Wallet Transaction State (please note enum values for this
                attribute are Client Specific and should be agreed during Client
                onboarding)
            reference:
              type: string
              format: string
              description: >-
                Client Transaction Reference (please note if provided, it has to
                be unique )
            meta:
              $ref: '#/components/schemas/metaEntity'
        childWalletTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set a Wallet Transaction
            attribute(s), if not provided defaults will be applied
          properties:
            state:
              type: string
              format: string
              description: >-
                Wallet Transaction State (please note enum values for this
                attribute are Client Specific and should be agreed during Client
                onboarding)
            reference:
              type: string
              format: string
              description: >-
                Client Transaction Reference (please note if provided, it has to
                be unique )
            meta:
              $ref: '#/components/schemas/metaEntity'
        giftAccountTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set an Exchange Account
            Transaction attribute(s)
          properties:
            details:
              $ref: '#/components/schemas/metaEntity'
        giftInAccountTransaction:
          type: object
          description: >-
            This optional Request attribute allows to set a Create Account and
            Create Account Transaction attribute(s), if not provided defaults
            will be applied
          properties:
            state:
              type: string
              format: string
              description: >-
                Desired Reward Account State (please note enum values for this
                attribute are Client Specific and should be agreed during Client
                onboarding)
            details:
              $ref: '#/components/schemas/metaEntity'
        location:
          type: object
          description: >-
            This optional Request attribute allows to override a location arisen
            from a used API KEY to specify exactly in which Outlet this
            transaction has happened
      example:
        amount: 50
        accountId: '169440'
        toWalletId: '654334'
        toAccountId: '356354'
        walletTransaction:
          reference: some unique reference
          state: SOME_STATE
          meta:
            foo: bar
        childWalletTransaction:
          reference: some other unique reference
          state: SOME_STATE
          meta:
            foo: bar
        giftAccountTransaction:
          details:
            key1: foo
        giftInAccountTransaction:
          details:
            key2: bar
        location:
          storeId: '1234'
    recommendationEntity:
      type: object
      required:
        - guid
        - fileName
        - unitId
        - targetType
        - validTo
        - status
        - dateCreated
        - lastUpdated
      properties:
        guid:
          type: string
          format: string
          description: the unique reference for this file
        catalogue:
          type: string
          format: string
          description: the unique reference for this file
        subject:
          type: array
          items:
            type: string
            format: string
          description: the unique reference for this file
        target:
          type: array
          items:
            type: string
            format: string
        validFrom:
          type: string
          format: string
          description: ATOM formatted date time for the valid from
          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])$
        validTo:
          type: string
          format: string
          description: ATOM formatted date time for the valid from
          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])$
        channel:
          type: array
          items:
            type: string
        weight:
          type: number
          format: int32
          description: the weight of this recommendation
        status:
          type: string
          description: The Catalogue status
          enum:
            - ACTIVE
            - ACCEPTED
            - REJECTED
            - DELETED
        meta:
          $ref: '#/components/schemas/metaEntity'
        data:
          type: object
        dateCreated:
          type: string
          format: string
          description: the date the record was created
          pattern: >-
            ^((((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00))\-02\-29|((19\d{2}|[2-9]\d{3})\-((0[13578]|1[02])\-31))|((19\d{2}|[2-9]\d{3})\-(0[13-9]|1[0-2])\-(29|30))|((19\d{2}|[2-9]\d{3})\-(0[1-9]|1[0-2])\-(0[1-9]|1[0-9]|2[0-8])))\T([01][0-9]\:[0-5][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9]\:[0-5][0-9]))(\+|\-)([01][0-9]\:[0-5][0-9]|2[0-3]\:[0-5][0-9])$
        lastUpdated:
          type: string
          format: string
          description: the date the record was last updated
          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])$
    defaultErrorEntity:
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          type: string
          description: Internal Error Code
          enum:
            - AA
            - AF
            - ALR
            - AALR
            - AT
            - CE
            - CI
            - CLPPR
            - CILR
            - CORQ
            - CP
            - CR
            - CTNR
            - CU
            - CX
            - DSN
            - ELE
            - FES
            - IFU
            - IH
            - ILA
            - IOC
            - IP
            - IPR
            - IR
            - ITID
            - IW
            - LIR
            - LNA
            - LPR
            - MAC
            - MAR
            - MLV
            - MNA
            - MPA
            - MTLE
            - NF
            - OC
            - P
            - RF
            - RFL
            - RW
            - RWI
            - TBR
            - TBS
            - TEXP
            - TULR
            - U
            - UAS
            - UV
            - VA
            - VC
            - VI
            - VL
            - VNL
            - VPUF
            - VSM
            - VU
            - VUA
            - VURC
            - VURI
            - VXP
            - WLNF
            - WTF
            - WTNF
        errorMessage:
          type: string
          description: Human Friendly Error Message
      x-enum:
        - errorCode: AA
          errorMessage: Invalid Access to API Method
        - errorCode: AF
          errorMessage: Authorisation Failed
        - errorCode: ALR
          errorMessage: Account Limit Reached
        - errorCode: AT
          errorMessage: Account Type
        - errorCode: CE
          errorMessage: Configuration Error
        - errorCode: CI
          errorMessage: Campaign Inactive
        - errorCode: CILR
          errorMessage: Campaign Issuance Limit Reached
        - errorCode: CLPPR
          errorMessage: Campaign Limit Per Period Reached
        - errorCode: CORQ
          errorMessage: Consumer Required
        - errorCode: CP
          errorMessage: Campaign Pending
        - errorCode: CR
          errorMessage: Campaign Removed
        - errorCode: CTNR
          errorMessage: Consumer Type Not Recognized
        - errorCode: CU
          errorMessage: Campaign Unknown
        - errorCode: CX
          errorMessage: Campaign Expired
        - errorCode: DSN
          errorMessage: Duplicated Serial Number
        - errorCode: ELE
          errorMessage: Exchange Limit Exceeded
        - errorCode: FES
          errorMessage: Scheduling Format Incorrect
        - errorCode: IFU
          errorMessage: Insufficient Funds
        - errorCode: IH
          errorMessage: Invalid Header set
        - errorCode: ILA
          errorMessage: Invalid Load Amount
        - errorCode: IOC
          errorMessage: Improper Offer Configuration
        - errorCode: IP
          errorMessage: Invalid Parameter
        - errorCode: IPR
          errorMessage: IP Address Rejected
        - errorCode: IR
          errorMessage: Invalid Request
        - errorCode: ITID
          errorMessage: Invalid Transaction ID
        - errorCode: IW
          errorMessage: Voucher Can Not Be Created
        - 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: MAR
          errorMessage: Minimum Amount Required
        - errorCode: MLV
          errorMessage: Maximum Voucher Value Exceeded
        - errorCode: MNA
          errorMessage: Method Not Allowed
        - errorCode: MPA
          errorMessage: Missing Parameter
        - errorCode: MTLE
          errorMessage: Max Active Tokens Limit Exceeded
        - errorCode: NF
          errorMessage: Not Found
        - errorCode: NPP
          errorMessage: No Points Pending
        - errorCode: OC
          errorMessage: Campaign has no Offer
        - errorCode: P
          errorMessage: Privileges
        - errorCode: RF
          errorMessage: Rollback Failure
        - errorCode: RFL
          errorMessage: >-
            Redemption failed: Max redemption limit ... per period ... has been
            exceeded
        - errorCode: RW
          errorMessage: Voucher Can Not Be Redeemed
        - errorCode: RWI
          errorMessage: >-
            Token can not be Redeemed at this time. Blocked by redemption
            windows.
        - errorCode: TBR
          errorMessage: Minimum time since last redemption has not passed
        - errorCode: TBS
          errorMessage: Minimum time since last stamp has not passed
        - errorCode: TEXP
          errorMessage: Token Expired
        - errorCode: TULR
          errorMessage: Token Usage Limit Reached
        - errorCode: U
          errorMessage: Unknown Error
        - 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: 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: VU
          errorMessage: Voucher already redeemed
        - errorCode: VUA
          errorMessage: No vouchers available for this campaign
        - errorCode: VURC
          errorMessage: No Voucher Available to Redeem for Campaign
        - errorCode: VURI
          errorMessage: No Voucher Available to Redeem for this Identity
        - errorCode: VXP
          errorMessage: Voucher Expired
        - errorCode: WLNF
          errorMessage: Wallet Link Not Found
        - errorCode: WTF
          errorMessage: Wallet Transaction Failure
        - errorCode: WTNF
          errorMessage: Wallet Transaction Not Found
    multiStatus207Entity:
      type: object
      description: >-
        EES AIR was able to process partially this Request, due to some errors.
        Special Response structure will contain all available details
      properties:
        successful:
          type: object
          required:
            - total
            - items
          description: Successfully processed AIR atomic operations details
          properties:
            total:
              type: integer
              format: int32
              description: Successfully processed Entities count
            results:
              type: array
              items:
                type: object
        failed:
          type: object
          description: Failed AIR atomic operations details
          properties:
            total:
              type: integer
              format: int32
              description: Failures item count
            results:
              type: array
              items:
                $ref: '#/components/schemas/defaultErrorEntity'
        results:
          type: object
          properties:
            total:
              type: integer
              format: int32
              description: >-
                Combined `successful` and `failed` sections with operation
                order preserved
            results:
              type: array
              items:
                type: object
    multiStatus207AccountEntity:
      type: object
      description: 'EES AIR was able to process partially this Request, due to some errors. '
      properties:
        successful:
          type: object
          required:
            - total
            - results
          description: Successfully process accounts
          properties:
            total:
              type: integer
              format: int32
              description: Successfully processed Entities count
            results:
              type: array
              items:
                $ref: '#/components/schemas/walletAccountEntity'
        failed:
          type: object
          description: List of failures
          properties:
            total:
              type: integer
              format: int32
              description: Failures item count
            results:
              type: array
              items:
                $ref: '#/components/schemas/defaultErrorEntity'
        results:
          type: object
          properties:
            total:
              type: integer
              format: int32
              description: >-
                Combined `successful` and `failed` sections with operation
                order preserved
            results:
              type: array
              items:
                type: object
    include:
      type: object
      description: >-
        A collection of resources that have been requested using the `include`
        query parameter
      properties:
        included:
          type: array
          description: >-
            Array of `includeItem` entities, which contain resources as
            requested via the `include` query parameter.
          items:
            $ref: '#/components/schemas/includedItem'
    includedItem:
      type: object
      description: >-
        A container for a resource that has been requested using the `include`
        query parameter
      properties:
        type:
          type: string
          description: The name of the type of resource
        id:
          type: string
          description: 'The id of the resource, if applicable'
          nullable: true
        attributes:
          description: >-
            The attributes of the included resource. One of:
            campaignMaxRedemptionsPerPeriodRule, accountRedemptionStatistics
          type: object
      required:
        - type
        - attributes
    campaignMaxRedemptionsPerPeriodRule:
      type: object
      properties:
        active:
          type: boolean
        period:
          type: string
          enum:
            - ACCOUNT_REDEMPTION_LIFETIME
            - ACCOUNT_REDEMPTION_CALENDAR_DAY
            - ACCOUNT_REDEMPTION_CALENDAR_WEEK
            - ACCOUNT_REDEMPTION_CALENDAR_MONTH
            - ACCOUNT_REDEMPTION_CALENDAR_YEAR
        limit:
          type: integer
      description: Max redemptions per period definition
    accountRedemptionStatistics:
      description: Redemption Statistics for the given Account object
      type: array
      items:
        $ref: '#/components/schemas/periodStatistic'
    periodStatistic:
      type: object
      properties:
        period:
          type: string
          enum:
            - ACCOUNT_REDEMPTION_LIFETIME
            - ACCOUNT_REDEMPTION_CALENDAR_DAY
            - ACCOUNT_REDEMPTION_CALENDAR_WEEK
            - ACCOUNT_REDEMPTION_CALENDAR_MONTH
            - ACCOUNT_REDEMPTION_CALENDAR_YEAR
          description: The period this statistic relates to
        amount:
          type: integer
          description: The amount in the given period
      required:
        - period
        - amount
      description: An object that represents a period statistic
    accountTransactionInclude:
      type: object
      description: >-
        A collection of resources that have been requested using the `include`
        query parameter
      properties:
        included:
          type: array
          description: >-
            Array of `accountTransactionIncludeItem` entities, which contain resources as
            requested via the `include` query parameter.
          items:
            $ref: '#/components/schemas/accountTransactionIncludedItem'
    accountTransactionIncludedItem:
      type: object
      description: >-
        A container for a resource that has been requested using the `include`
        query parameter
      properties:
        type:
          type: string
          description: The name of the type of resource
        id:
          type: string
          description: 'The id of the resource, if applicable'
          nullable: true
        attributes:
          description: >-
            The attributes of the included resource. One of:
            pointsIncreaseLedger, pointsDecreaseLedger
          type: object
      required:
        - type
        - attributes
    pointsIncreaseLedger:
      type: object
      properties:
        expiryDate:
          type: string
          format: ees-date-time
          description: The Date-Time in ATOM format when the points will expire
        currentValue:
          type: integer
          description: Current value of points available
      required:
        - period
        - amount
      description: An object that represents a points increate ledger
    pointsDecreaseLedger:
      type: array
      items:
        $ref: '#/components/schemas/pointsDecreaseLedgerItem'
      description: An array that represents a points decrease ledger
    pointsDecreaseLedgerItem:
      type: object
      properties:
        increaseBalanceAccountTransactionId:
          type: string
          description: The ID of the account transaction that cause the balance to increase
        value:
          type: integer
          description: Value of the account transaction
        valueBefore:
          type: integer
          description: How many points were available before the transaction occured
        valueAfter:
          type: integer
          description: How many points were available after the transaction occured
      required:
        - period
        - amount
      description: An object that represents a points increate ledger item
    walletRecommendationsEntity:
      type: object
      description: Recommendations successfully accepted.
      properties:
        total:
          type: integer
          format: int32
          description: Successfully processed Entities count.
        failed:
          type: object
          description: Failed AIR atomic operations details.
          properties:
            total:
              type: integer
              format: int32
              description: Failures item count.
            results:
              type: array
              items:
                $ref: '#/components/schemas/defaultErrorEntity'
        results:
          type: array
          items:
            type: object
            properties:
              meta:
                $ref: '#/components/schemas/metaEntity'
              type:
                type: string
                description: >-
                  Wallet flag informing what is the type of that particular wallet.
                  Could be defined per Client as part of the Onboarding process.
              dates:
                $ref: '#/components/schemas/datesEntity'
              state:
                type: string
                description: >-
                  Additional flag, list of possible enum values could be defined per
                  Client, as part of the Onboarding process.
              status:
                type: string
                description: Status of the EE Wallet.
                enum:
                  - ACTIVE
                  - DELETED
                  - INACTIVE
                  - SUSPENDED
                  - TERMINATED
                  - MERGED
              balances:
                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.
                additionalProperties: false
              walletId:
                type: string
                description: Wallet ID.
              accountId:
                type: string
                description: The account id related to this transaction.
              overrides:
                $ref: '#/components/schemas/accountOverridesEntity'
              campaignId:
                type: string
                description: Campaign ID.
              clientType:
                type: string
                description: Account client type.
              dateCreated:
                type: string
                description: Date this Account was created.
                pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
                example: "2017-01-17T13:20:48+00:00"
              lastUpdated:
                type: string
                description: Date this Account was last updated.
                pattern: /\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T[0-2]\d:[0-5]\d:[0-5]\d[+-][0-2]\d:[0-5]\d/
                example: "2017-01-17T13:20:48+00:00"
              mobileWallet:
                type: string
                description: The URL that returns a digital platform wallet.
              relationships:
                $ref: '#/components/schemas/walletRelationshipsEntity'
        successful:
          type: object
          required:
            - total
            - results
          description: Successfully process accounts.
          properties:
            total:
              type: integer
              format: int32
              description: Successfully processed Entities count.
            results:
              type: array
              items:
                $ref: '#/components/schemas/walletAccountEntity'
