openapi: 3.0.1
info:
  title: Ozone Connect - Bank Data Sharing APIs
  contact:
    name: Ozone Financial Technology Limited
  description: >
    This document provides an API description in [OpenAPI](https://spec.openapis.org/oas/v3.0.1.html)

    for Bank Data Sharing APIs for Ozone Connect.


    These APIs should be implemented by an financial institution so that Ozone

    can expose these end-points to TPPs.


    #### Implementer Notes


    Implementers should note that this API prescribes a positive response for correctly executed

    operations including those where no data is returned. This is consistent with the general principles

    of REST.

    For example, if the operation 

    `get /accounts/{accountId}/products` is invoked and no product data is found for the account

    associated with the value of `accountId` then the correct response is to return a `200` and an empty

    array: `{ "data": [] }`.


    Please refer to the API Hub documentation for details of test cases that are 

    available for this API using the Ozone Connect test suite.


    ### Versioning


    The `version` property implements the following pattern
    `{standards-major}.{standards-minor}.{ozone-connect-version}`, where:


    * `standards-major` is the major version of the latest UAE standard that the API description implements.

    * `standards-minor` is the minor version of the latest UAE standard that the API description implements.

    * `ozone-connect-version` is the version of the Ozone Connect API description.


    So, for example, `v2.0.1` indicates the first version of the Ozone Connect API description that implements the UAE
    standard version 2.0.

    **Please adhere to the deprecated flags in your implementation. Do not implement deprecated properties when**
    **implementing new functionality.**


    ### v2.2.1

    * Added new version compatible with v2.2 of standards.

    * Changed `get /accounts/{accountId}/products` to return `ExpectedProfitRates`, providing one-or-more deposit
      rates for Sharia-compliant products. Each rate carries `RateType` (`FixedProfit` or `VariableProfit`),
      `DepositRateType` (`ExpectedProfitRate` or `IndicativeProfitRate`), `ProfitSharingRatio`,
      `ProfitDistributionMethod`, `ProfitDistributionFrequency`, an optional `Description`, and `RateDetails`.

    * Changed `get /accounts/{accountId}/products` to return `ShariaFinanceRates`, providing one-or-more finance
      rates for Sharia-compliant products. As with `FinanceRates`, this can be provided in cleartext or as a JWE
      based on the preference of the LFI for sharing this information. Each cleartext rate is discriminated on
      `RateType` as a fixed profit rate, a variable profit rate or a hybrid profit rate, and carries
      `ProfitCalculationMethod` with the values `PrincipalBalance`, `OutstandingBalance`,
      `InitialDrawdownAmount`, `UnusedCreditLine` or `UtilizedLimit`.

    * Changed `get /accounts/{accountId}/products` to return `TakafulRequired`, indicating whether Takaful
      coverage is required for the product, and `TakafulDescription`, describing the type and purpose of the
      required coverage.

    * Changed `get /accounts/{accountId}/products` to return `ProfitCalculationMethod` on charge components, for
      use in place of `InterestCalculationMethod` where the product uses Islamic calculation methods.

    * Changed `InterestCalculationMethod` on charge components returned by
      `get /accounts/{accountId}/products` to apply to interest only. Islamic calculation methods are now
      described by `ProfitCalculationMethod`.

    * Changed `RateDetails` on the deposit rates returned by `get /accounts/{accountId}/products` to reference a
      shared Schema Object, so that the same rate structure is used by both `DepositRates` and
      `ExpectedProfitRates`. No change to the properties returned.

    * Changed `get /accounts/{accountId}/balances`, `get /accounts/{accountId}/transactions` and
      `get /accounts/{accountId}/statements` to return `BalanceDescription`, allowing a description of the
      balance to be provided identifying the specific Shari'ah compliant charges, payments and rewards made
      which can affect the balance.

    * Changed `transactionInformation` on `CbuaeTransaction` to be required, so every transaction returned by
      `get /accounts/{accountId}/transactions` carries a narrative by which the customer can recognise the entry.
      The field also gains `minLength: 1` and `maxLength: 500`, matching the bounds the TPP-facing
      `TransactionInformation` schema has carried since v2.1. The same requirement is applied to `AETransaction` in
      the Standards Account Information API description, since the API Hub can only return a narrative the LFI
      supplied.

    * Changed the `post /customers/action/cop-query` request to carry the account IBAN only. `data.account.name` is
      removed, along with the `PersonName` and `BusinessName` Schema Objects it referenced. The LFI performs no
      matching, so the name submitted by the TPP is no longer sent to it.

    * Changed the `post /customers/action/cop-query` response to carry the account holder's name directly. Each
      entry in `data` is now an `id` and a `name`, which is either a `CbuaeCopPersonName` (`fullName` required) or a
      `CbuaeCopBusinessName` (`businessName` required). The `verifiedClaims` / `verification` identity-assurance
      envelope is removed from this operation, along with the `CbuaeVerifiedCopClaim` and
      `ConfirmationOfPayeePersonClaims` Schema Objects and the wider customer data the latter carried — none of it
      is needed to compare two names, and Confirmation of Payee runs without a consent. `number` is dropped for the
      same reason; `id` is retained as the handle for investigating a disputed result. Structured name fields
      (`firstName`, `middleName`, `lastName`, `fullNameAr`, `alsoKnownAs`, `businessNameAr`) are retained as
      optional members so the matching algorithm can be improved without a further change to this contract.
      `get /accounts/{accountId}/customer` is unaffected: it has its own `CbuaeCustomer` / `CbuaeVerifiedClaim`
      Schema Objects.

  version: v2.2.1
servers:
  - url: https://<your-ozone-connect-server>
tags:
  - name: accounts
    description: Operations to support returning accounts data to TPPs
  - name: balances
    description: Operations to support returning balances data to TPPs
  - name: transactions
    description: Operations to support returning transactions data to TPPs
  - name: customers
    description: Operations to support returning customer data to TPPs
  - name: beneficiaries
    description: Operations to support returning beneficiaries data to TPPs
  - name: direct-debits
    description: Operations to support returning direct debit data to TPPs
  - name: scheduled-payments
    description: Operations to support returning scheduled payment data to TPPs
  - name: standing-orders
    description: Operations to support returning standing order data to TPPs
  - name: products
    description: Operations to support returning product data to TPPs
  - name: statements
    description: Operations to support returning statement data to TPPs
security:
  - {}
  - OzoneConnectApiKey: []
  - OzoneConnectClientCredentials:
      - placeholder
  - OzoneConnectJwtAuth: []
paths:
  /accounts:
    get:
      tags:
        - accounts
      summary: Retrieve accounts
      description: Return the list of accounts that match the value of the `accountIds` parameter.
      operationId: findAccounts
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
        - name: accountIds
          in: query
          description: Comma separated ids of the accounts to be returned.
          schema:
            type: string
            minLength: 1
          required: true
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountsResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /accounts/{accountId}:
    get:
      tags:
        - accounts
      summary: Retrieve an account
      description: Return the account details for the account indicated by the value of the `accountId` parameter.
      operationId: findByAccountId
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
        - name: accountId
          in: path
          description: Id of the account to be queried
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /accounts/{accountId}/balances:
    get:
      tags:
        - balances
      summary: Fetch the balances for the account specified by the account id.
      operationId: findBalancesByAccountId
      description: >-
        The financial institution may return more than one balance record for each account. Each array element
        represents a balance of a different type, mapped to a specific ISO 20022 code.
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
        - name: accountId
          in: path
          description: Id of the account to be queried
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalancesResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /accounts/{accountId}/transactions:
    get:
      tags:
        - transactions
      summary: Fetch transactions for the account specified by the accountId
      description: Return all transactions for the account, filtered on date range parameters as required.
      operationId: findTransactionsByAccountId
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
        - name: accountId
          in: path
          description: Id of the account to be queried
          required: true
          schema:
            type: string
          example: abc-123
        - $ref: '#/components/parameters/transaction-fromBookingDateTime'
        - $ref: '#/components/parameters/transaction-toBookingDateTime'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
        - name: o3-fx-transactions
          in: header
          description: >-
            Indicates that only FX-related transactions should be returned, based on permissions set in the related
            consent
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /accounts/{accountId}/direct-debits:
    get:
      tags:
        - direct-debits
      summary: Fetch the direct debits specified by the account id
      description: Return the direct debits for the account specified by the accountId
      operationId: findDirectDebitByAccountId
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
        - name: accountId
          in: path
          description: Id of the account to be queried
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectDebitsResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /accounts/{accountId}/scheduled-payments:
    get:
      tags:
        - scheduled-payments
      summary: Fetch the scheduled payments specified by the account id
      description: Return the scheduled payments for the account specified by the accountId
      operationId: findScheduledPaymentByAccountId
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
        - name: accountId
          in: path
          description: Id of the account to be queried
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledPaymentsResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /accounts/{accountId}/standing-orders:
    get:
      tags:
        - standing-orders
      summary: Fetch the standing orders specified by the account id
      description: Return the standing orders for the account specified by the accountId
      operationId: findStandingOrderByAccountId
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
        - name: accountId
          in: path
          description: Id of the account to be queried
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandingOrdersResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /customer:
    get:
      tags:
        - customers
      summary: Fetch customer
      description: Return the customer details for the User identified by the `o3-psu-identifier` header.
      operationId: findCustomer
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /customers/action/cop-query:
    post:
      tags:
        - customers
      summary: Fetches customer data based on a confirmation of payee query
      description: >
        Used by the API Hub to find the name(s) held against an account, so that the Hub can answer a Confirmation of
        Payee query.


        The API Hub sends an IBAN, and nothing else. The LFI returns the name(s) it holds against that account. **The
        LFI performs no matching** — the name the TPP submitted is not sent to it, and it MUST NOT filter, rank, or omit
        holders on any basis. The API Hub owns the matching rules and applies them to what is returned.


        A joint account MUST return **one entry per holder**. The API Hub evaluates every entry in `data`; it does not
        stop at the first.


        **Not found is `200` with an empty `data` array** — never `204`, `404`, `201`, or `202`. Return it where the
        account does not exist, is under a bar, or the customer has opted out of Confirmation of Payee. The three cases
        are deliberately indistinguishable to the TPP, so that a CoP query cannot be used to probe for the existence of
        an account.


        From v2.2 the request carries the IBAN only, and the response is **flattened**: each entry in `data` carries
        `name` directly. The v2.1 `verifiedClaims` / `verification` identity-assurance envelope is removed from this
        operation — the API Hub never read it.


        This operation is not carried out under a consent, and the call will not have an `o3-consent-id` header. The
        response MUST therefore carry only the name data this question requires, and no wider customer data.
      operationId: findCustomerForCop
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmationRequest'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmationResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /accounts/{accountId}/customer:
    get:
      tags:
        - customers
      summary: Fetch the customers specified by the account id
      description: Return the customer details for the account specified by the accountId
      operationId: findCustomerByAccountId
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - name: o3-psu-identifier
          in: header
          schema:
            type: string
          required: true
          description: A Base64 encoded representation of the psuIdentifier JSON object.
        - name: accountId
          in: path
          description: Id of the account to be queried
          required: true
          schema:
            type: string
          example: abc-123
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomersResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /accounts/{accountId}/beneficiaries:
    get:
      tags:
        - beneficiaries
      summary: Fetch the beneficiaries specified by the account id
      description: Return the beneficiaries for the account specified by the accountId
      operationId: findBeneficiariesByAccountId
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
        - name: accountId
          in: path
          description: Id of the account to be queried
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BeneficiariesResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'
  /accounts/{accountId}/products:
    get:
      tags:
        - products
      summary: Fetch products.
      description: |

        The API must return the products linked to the account identified by the `accountId` path parameter.

        If no products are found for the account, the call must return a success status code `200` with an empty `data`
        array.
      operationId: findProducts
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
        - name: accountId
          in: path
          description: Id of the account to be queried
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductsResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'

  # Extended Product Data Enhancement

  /accounts/{accountId}/statements:
    get:
      tags:
        - statements
      summary: Get statements for a given account
      operationId: getStatementsByAccountId
      parameters:
        - $ref: '#/components/parameters/providerId'
        - $ref: '#/components/parameters/aspspId'
        - $ref: '#/components/parameters/callerOrgId'
        - $ref: '#/components/parameters/callerClientId'
        - $ref: '#/components/parameters/callerSoftwareStatementId'
        - $ref: '#/components/parameters/apiUri'
        - $ref: '#/components/parameters/apiOperation'
        - $ref: '#/components/parameters/consentId'
        - $ref: '#/components/parameters/callerInteractionId'
        - $ref: '#/components/parameters/ozoneInteractionId'
        - $ref: '#/components/parameters/psuIdentifier'
        - name: accountId
          in: path
          description: Id of the account to be queried
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page-size'
        - in: query
          name: fromStatementDate
          description: Start date for filtering of the Statements on the OpeningDate field. If this is not populated, 
            the start date will be open ended
          schema:
            type: string
            format: date
        - in: query
          name: toStatementDate
          description: End date for filtering of the Statements on the OpeningDate.  If this is not populated, the end 
            date will be open ended
          schema:
            type: string
            format: date
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AEStatements'
                  meta:
                    allOf:
                    - $ref: '#/components/schemas/Meta'
                    - type: object
                      properties:
                        firstAvailableDateTime:
                          description: The first date and time for which statement data is available for the account
                          type: string
                          format: date-time
                        lastAvailableDateTime:
                          description: The last date and time for which statement data is available for the account
                          type: string
                          format: date-time
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/Error'

components:
  responses:
    BadRequestError:
      description: Operation failed due to a invalid request parameter
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error400'
    UnauthorizedError:
      description: Operation failed due to an invalid credential or missing token
      content:
        application/json:
          schema:
            type: object
            properties:
              errorCode:
                description: >-
                  Error code identifying the problem that occurred. Should be implemented based on guidance in standards
                  and API Hub documentation, but custom error code lists maintained for backwards compatibility with
                  v1.2.
                type: string
              errorMessage:
                $ref: '#/components/schemas/ErrorMessage'
    ForbiddenError:
      description: Operation failed as access to the requested resource is forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error403'
    InternalServerError:
      description: Operation failed due to an internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error500'
    Error:
      description: Default error response
      content:
        application/json:
          schema:
            type: object
            properties:
              errorCode:
                description: >-
                  Error code identifying the problem that occurred. Should be implemented based on guidance in standards
                  and API Hub documentation, but custom error code lists maintained for backwards compatibility with
                  v1.2.
                type: string
              errorMessage:
                $ref: '#/components/schemas/ErrorMessage'
  schemas:
    AccountsResponse:
      type: object
      description: |
        A descriptor for an account.
        This is a composite object that may be expanded in the future to support
        additional account types for new API standards and account types.
      example:
        data:
          - id: string
            accountType: Retail
            accountSubType: CurrentAccount
            currency: GBP
            status: Active
            accountHolderName: string
            servicer:
              schemeName: BICFI
              identification: string
            accountNumbers:
              - name: string
                schemeName: IBAN
                identification: string
            product:
              id: string
              productName: string
              bundleName: string
        meta: {}
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeAccount'
          description: Primary data for the resource
        meta:
          $ref: '#/components/schemas/Meta'
    AccountResponse:
      type: object
      description: |
        A descriptor for an account.
        This is a composite object that may be expanded in the future to support
        additional account types for new API standards and account types.
      properties:
        data:
          $ref: '#/components/schemas/CbuaeAccount'
        meta:
          $ref: '#/components/schemas/Meta'
    CbuaeAccount:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the account resource
        product:
          $ref: '#/components/schemas/ProductIdentifier'
        multiAuth:
          type: boolean
          description: Indicator that labels the account as requiring multiple authorizers
        businessCustomer:
          type: array
          items:
            $ref: '#/components/schemas/CustomerIdentifier'
          description: Provides the customer identifiers for an account when the account is a business account
        customers:
          type: array
          items:
            $ref: '#/components/schemas/CustomerIdentifier'
          minItems: 1
          description: Provides the customer identifiers for an account when the account is a non-business account
        accountHolderName:
          $ref: '#/components/schemas/AccountHolderName'
        accountHolderShortName:
          $ref: '#/components/schemas/AccountHolderShortName'
        status:
          description: >
            Specifies the status of account resource in code form.


            * Active: The account exist and is in an active state.


            * Inactive: The account is deemed not active by the LFI. Please refer to the
              [CBUAE Website](https://rulebook.centralbank.ae/en/rulebook/dormant-accounts-regulation)
              for qualification of Inactive status.

            * Dormant: Please refer to the [CBUAE
            Website](https://rulebook.centralbank.ae/en/rulebook/dormant-accounts-regulation)
              for the definition of Dormant status.

            * Unclaimed: Please refer to the [CBUAE
            Website](https://rulebook.centralbank.ae/en/rulebook/dormant-accounts-regulation)
              for the definition of Unclaimed status.

            * Deceased: The account holder has passed away.


            * Suspended: The account has been temporarily deactivated by the LFI for reasons such as
              suspicious activities or non-compliance with regulations. The account holder might
              be unable to access funds or perform transactions until the bank's requirements
              are met, and the suspension is lifted.

            * Closed: The account is closed
          type: string
          enum:
            - Active
            - Inactive
            - Dormant
            - Unclaimed
            - Deceased
            - Suspended
            - Closed
        statusUpdateDateTime:
          description: Date and time at which the resource status was updated.
          type: string
          format: date-time
        currency:
          $ref: '#/components/schemas/TCurrency'
        accountType:
          description: Specifies the type of account (Retail, SME or Corporate).
          type: string
          enum:
            - Retail
            - SME
            - Corporate
        accountSubType:
          $ref: '#/components/schemas/AEExternalAccountSubTypeCode'
        description:
          description: Specifies the description of the account sub-type.
          type: string
        nickName:
          description: >-
            The nickname of the account, assigned by User 1 to provide an additional and easier means of identification
            of the account at the financial instituation
          type: string
        openingDate:
          description: >-
            Date on which the account and its related basic services by financial institution started to be operational
            for User 1
          type: string
          format: date-time
        maturityDate:
          description: |

            * Fixed Term Savings Account
              MaturityDate is the date on which the savings mature and the balance can be withdrawn by the User without penalty
          type: string
          format: date-time
        accountNumbers:
          type: array
          items:
            $ref: '#/components/schemas/AccountIdentifiers'
          minItems: 1
          description: >-
            Provides the account numbers that identity the account. This is separate to the `accountId`, which uniquely
            identifies the account resource.
        servicer:
          $ref: '#/components/schemas/AEBranchAndFinancialInstitutionIdentification5_0'

        # Extended Product Data Enhancement

        isShariaCompliant:
          $ref: '#/components/schemas/AEShariaFlag'

      required:
        - id
      additionalProperties: false
      description: The properties of an account
    AccountIdentifiers:
      type: object
      description: Provides the details to identify an account.
      required:
        - schemeName
        - identification
      properties:
        schemeName:
          $ref: '#/components/schemas/AEExternalAccountIdentificationCode'
        identification:
          $ref: '#/components/schemas/Identification_0'
        name:
          $ref: '#/components/schemas/Name_0'
      additionalProperties: false
    AEExternalAccountIdentificationCode:
      description: Name of the identification scheme for the account. Encoded with allowable values published in an external list.
      type: string
      enum:
        - IBAN
        - AccountNumber
        - MaskedPAN
        - MortgageReference
        - FinanceReference
    AEExternalAccountIdentificationCode1:
      description: Name of the identification scheme for the account. Encoded with allowable values published in an external list.
      type: string
      enum:
        - IBAN
        - AccountNumber
        - MaskedPAN
        - MobileNumber
        - UtilityName
        - EWallet
    Identification_0:
      description: >
        Identification for the account assigned by the financial institution based on the Account Scheme Name. This
        identification is known by the User 1 account owner. For IBAN, refer to the ISO Standard 13616.
      type: string
      minLength: 1
      maxLength: 400
    Name_0:
      description: >-
        The account name is the name or names of the User 1 account owner(s) represented at an account level, as
        displayed by the financial institution's online channels. Note: The account name is not the product name or the
        nickname of the account.
      type: string
      minLength: 1
      maxLength: 70
    AEBranchAndFinancialInstitutionIdentification5_0:
      type: object
      required:
        - schemeName
        - identification
      description: >-
        Party that manages the account on behalf of the account owner, that is manages the registration and booking of
        entries on the account, calculates balances on the account and provides information about the account.
      properties:
        schemeName:
          $ref: '#/components/schemas/AEExternalFinancialInstitutionIdentificationCode'
        identification:
          $ref: '#/components/schemas/Identification_1'
      additionalProperties: false
    Identification_1:
      description: >
        * /accounts resource

        Unique and unambiguous identification of the financial institution as the account servicing institution for the
        Open Finance services.


        * /beneficiaries resource

        Unique and unambiguous identification of the Creditor Agency as the servicing institution of the Beneficiary.


        * /scheduled-payments resource

        Unique and unambiguous identification of the financial institution as the account servicing institution for the
        Open Finance services.


        * /standing-orders resource

        Unique and unambiguous identification of the financial institution as the account servicing institution for the
        Open Finance services.


        * /transactions resource
         Unique and unambiguous identification of the financial institution as the account servicing institution for the Open Finance services.

        *  Notes:

        Based on the value of the field **IdentificationType**, this entry may be :

        * BICFI: The BIC/SWIFT Code

        * Other: Identification code that is not a BIC/SWIFT code and allows a financial institution to be identified.
      type: string
      minLength: 1
      maxLength: 35
    AEExternalFinancialInstitutionIdentificationCode:
      description: >
        * /accounts resource

        The name of the identification scheme for the financial institution as the account services provider. Encoded
        with allowable value as published in an external list.


        * /beneficiaries resource

        Refers to the Financial Institution that manages the account on behalf of the Beneficiary party, managing
        registration, booking of entries on the account, calculating balances on the account and providing information
        about the account. This is the servicing Financial Institution of the Beneficiary account.


        * /scheduled-payments resource

        Refers to the identification scheme for uniquely identifying the Creditor Agent.


        * /standing-orders resource

        Refers to the identification scheme for uniquely identifying the Creditor Agent.


        * /transactions resource

        Refers to the identification scheme for uniquely identifying the Creditor Agent.
      anyOf:
        - type: string
          enum:
            - BICFI
            - Other
        - deprecated: true
          type: string
          enum:
            - BICFI
            - OTHER
    CustomersResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeCustomerById'
          description: Primary data for the resource
        meta:
          $ref: '#/components/schemas/Meta'
      description: The properties of customers associated with a given account
    ConfirmationResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeCopCustomer'
          description: Primary data for the resource
        meta:
          $ref: '#/components/schemas/Meta'
      description: The properties of a Confirmation of Payee query response
    CustomerResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CbuaeCustomer'
        meta:
          $ref: '#/components/schemas/Meta'
      description: The properties of a customer associated with a given account
    CbuaeCustomerById:
      type: object
      required:
        - id
        - verifiedClaims
        - customerType
        - customerCategory
        - accountRole
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 40
          description: >-
            A unique and immutable identifier used to identify the customer resource. This identifier has no meaning to
            the account owner.
        number:
          type: string
          minLength: 1
          maxLength: 35
          description: Number assigned by an agent to identify its customer.
        customerType:
          type: string
          enum:
            - Delegate
            - Joint
            - Sole
          description: >
            Specifies the party type. Encoded with allowable values: "Delegate" - Used for business accounts when user
            has delegated authority to access the account , "Joint" - Customer is a joint owner of the account "Sole" -
            Customer is the sole owner of the account
        customerCategory:
          description: Category of Party
          type: string
          enum:
            - Retail
            - SME
            - Corporate
        accountRole:
          description: |
            Specifies the Party's role with respect to the related account. Allowed values 
            are defined based on ISO 20022 definitions as follows:

              - Administrator: The party that administers the account and is not the 
                account owner.
              - Beneficiary: Ultimate party that is entitled to receive the benefits 
                of the ownership of the account.
              - CustodianForMinor: Entity that holds the account on behalf of a legal 
                minor. Although the account is registered under the name of the minor, 
                the custodian retains control of the account.
              - Granter: Granter role in the hedge funds industry.
              - LegalGuardian: Party that has been appointed by a legal authority to act on 
                behalf of a person judged to be incapacitated.
              - OtherParty: An other type of party. Used when a given account role cannot 
                be mapped to the role defined at the LFI.
              - PowerOfAttorney: Power of attorney which is held by the party.
              - Principal: Party acts as principal for the account for trading purposes.
              - Protector: Person appointed under a trust instrument to direct or 
                restrain the trustees in relation to their administration of an account 
                held in trust. 
              - RegisteredShareholderName: Party for which shares are to be registered,
                for share holding accounts only.
              - SecondaryOwner: Entity that is not the primary owner when the ownership of 
                an account is split among several owners.
              - SeniorManagingOfficial: Party that makes, or participates in the making of, 
                decisions that affect the whole, or a substantial part, of the business of 
                a customer of a reporting entity or that has the capacity to affect 
                significantly the financial standing of a customer of a reporting entity.
              - Settlor: Entity that creates a trust or contributes assets to the trust.
              - SuccessorOnDeath: Deceased's estate, or successor, to whom account 
                ownership will be transferred upon the death of one of the 
                owners.
          type: string
          enum:
            - Administrator
            - Beneficiary
            - CustodianForMinor
            - Granter
            - LegalGuardian
            - OtherParty
            - PowerOfAttorney
            - Principal
            - Protector
            - RegisteredShareholderName
            - SecondaryOwner
            - SeniorManagingOfficial
            - Settlor
            - SuccessorOnDeath
        verifiedClaims:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeVerifiedClaim'
          description: Container object containing entries for the trust framework and the evidence used to verify the claims
      description: >
        Party Identity Assurance (Response) Schema

        Based on the [OpenID Connect for Identity Assurance 1.0
        Specification](https://openid.net/specs/openid-connect-4-identity-assurance-1_0.html)
    CbuaeCustomer:
      type: object
      required:
        - id
        - customerCategory
        - verifiedClaims
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 40
          description: >-
            A unique and immutable identifier used to identify the customer resource. This identifier has no meaning to
            the account owner.
        number:
          type: string
          minLength: 1
          maxLength: 35
          description: Number assigned by an agent to identify its customer.
        customerCategory:
          description: Category of Party
          type: string
          enum:
            - Retail
            - SME
            - Corporate
        verifiedClaims:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeVerifiedClaim'
          description: Container object containing entries for the trust framework and the evidence used to verify the claims
      description: >
        Party Identity Assurance (Response) Schema

        Based on the [OpenID Connect for Identity Assurance 1.0
        Specification](https://openid.net/specs/openid-connect-4-identity-assurance-1_0.html)
    CbuaeCopCustomer:
      description: >
        One account holder returned for a Confirmation of Payee query.

        A joint account returns one entry per holder. The API Hub evaluates EVERY entry in `data` — returning the
        holders in any order is safe, and the LFI MUST NOT attempt to order them by likelihood of match.
      type: object
      required:
        - id
        - name
      additionalProperties: false
      properties:
        id:
          description: >-
            A unique and immutable identifier used to identify the customer resource. This identifier has no meaning to
            the account owner.
          type: string
          minLength: 1
          maxLength: 40
        name:
          description: The name held against the account for this holder — a personal name or a business name.
          oneOf:
            - $ref: '#/components/schemas/CbuaeCopPersonName'
            - $ref: '#/components/schemas/CbuaeCopBusinessName'
    CbuaeCopPersonName:
      description: >
        The name of a personal account holder, as held by the LFI.

        `fullName` is the only required field and is what the API Hub matches on today. The remaining fields are
        OPTIONAL and are not required for a match to succeed — supply them where your systems hold them separately, so
        that improvements to the matching algorithm can use them without a further change to this contract.
      type: object
      required:
        - fullName
      additionalProperties: false
      properties:
        fullName:
          description: The full name of the account holder, as it appears on the account, as a single string.
          type: string
          minLength: 1
          maxLength: 140
        firstName:
          description: >-
            Given name of the account holder. Optional. Named `firstName` rather than the v2.1 `givenName`, which the
            v2.1 schema already recorded as withdrawn.
          type: string
          minLength: 1
          maxLength: 70
        middleName:
          description: Middle name(s) of the account holder. Optional.
          type: string
          minLength: 1
          maxLength: 70
        lastName:
          description: >-
            Family name of the account holder. Optional. Named `lastName` rather than the v2.1 `familyName`, which the
            v2.1 schema already recorded as withdrawn.
          type: string
          minLength: 1
          maxLength: 70
        fullNameAr:
          description: >-
            The full name of the account holder in Arabic script, where the LFI holds one. Optional. Not matched today.
          type: string
          minLength: 1
          maxLength: 140
        alsoKnownAs:
          description: >-
            Other names the account is legitimately known by — for example a maiden name, or a transliteration variant
            the LFI holds. Optional. Not matched today.
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 140
    CbuaeCopBusinessName:
      description: >
        The name of a business account holder, as held by the LFI.

        `businessName` is the only required field and is what the API Hub matches on today. The remaining fields are
        OPTIONAL inputs to future matching.
      type: object
      required:
        - businessName
      additionalProperties: false
      properties:
        businessName:
          description: The registered business name on the account.
          type: string
          minLength: 1
          maxLength: 140
        businessNameAr:
          description: >-
            The registered business name in Arabic script, where the LFI holds one. Optional. Not matched today.
          type: string
          minLength: 1
          maxLength: 140
        alsoKnownAs:
          description: >-
            Other names the business is legitimately known by — for example a trading name distinct from the registered
            name. Optional. Not matched today.
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 140
    CustomerCorporateClaims:
      type: object
      description: Standard claims for corporate or SME entities.
      required:
        - identityType
        - businessName
        - tradeLicenceNumber
      properties:
        identityType:
          type: string
          enum:
            - Business
        businessName:
          type: string
          minLength: 1
          maxLength: 140
          description: The name of the business.
        tradeLicenceNumber:
          type: string
          description: Trade License Number of the business.
        taxIdentificationNumber:
          type: string
          description: The tax identification number or VAT number for the company.
        dateOfIncorporation:
          type: string
          format: date
          description: The date the company was legally incorporated.
        countryOfIncorporation:
          type: string
          description: The country where the company is incorporated.
        corporateAddress:
          $ref: '#/components/schemas/AEPostalAddress'
        corporateContactEmail:
          type: string
          format: email
          description: The primary email address for corporate communications.
        corporateContactPhoneNumber:
          type: string
          description: The primary phone number for corporate communications.
        industry:
          type: string
          description: The industry or sector in which the company operates.
        companyWebsite:
          type: string
          format: uri
          description: The official website of the company.
    CustomerPersonClaims:
      type: object
      required:
        - identityType
        - fullName
        - givenName
        - familyName
        - emiratesId
        - emiratesIdExpiryDate
        - residentialAddress
      properties:
        identityType:
          type: string
          enum:
            - Person
        fullName:
          description: >-
            The full name of the account holder, as it appears on the account, as a single string. Used where LFIs hold
            the account name as a single value.
          type: string
        givenName:
          type: string
          description: >-
            Given name of the Party. Given name (also called forename) is used to differentiate from the surname or
            family name.
        familyName:
          type: string
          description: Surname of the Party
        middleName:
          type: string
          description: Middle name of the Party
        nickname:
          type: string
          description: Nickname of the Party
        emiratesId:
          type: string
          description: Emirates ID number of the Party
        emiratesIdExpiryDate:
          type: string
          format: date
          description: Emirates ID card expiry date
        birthDate:
          type: string
          format: date
          description: Date of birth of the Party
        sourceOfIncome:
          type: string
          description: The customer source of income
        salary:
          type: string
          description: The customer salary
        nationality:
          type: string
          description: >-
            The customer nationality, standardised where possible using a recognised three-character code set such as
            ISO 3166
        residentialAddress:
          $ref: '#/components/schemas/AEPartyIdentityResidentialAddressClaim'
        mobileNumber:
          type: string
          description: The customer mobile number
        email:
          type: string
          description: The customer email
        maritalStatus:
          type: string
          description: The customer marital status
        salutation:
          type: string
          description: The customer salutation
        language:
          type: string
          description: >-
            The primary language of the customer, standardised where possible using a recognised three-character code
            set such as ISO 639
        employerName:
          type: string
          description: The employer name of the customer
        employmentSinceDate:
          type: string
          format: date
          description: The date from which the customer was employed by their employer
        powerofAttorney:
          type: boolean
          description: Indicator that labels whether the customer is subject to a power of attorney arrangement
        salaryTransfer:
          type: boolean
          description: Indicator that labels whether the customer receives their salary in the associated account
        profession:
          type: string
          description: The customer profession
        updatedAt:
          type: string
          format: date-time
          description: The date at which the customer data was last updated
      description: >
        Standard Claims:

        [https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims)

        IdentityAssurance Claims:

        [https://openid.net/specs/openid-connect-4-identity-assurance-1_0.html#name-claims](https://openid.net/specs/openid-connect-4-identity-assurance-1_0.html#name-claims)

        An LFI MUST provide both givenName and familyName for a Retail customer, together with all mandatory properties.
      additionalProperties: false
    CbuaeVerifiedClaim:
      description: |
        Verified Claims :This is Required field for Cbuae
        Container object containing entries for the trust framework and the evidence used to verify the customer claims
      type: object
      required:
        - claims
      properties:
        verification:
          description: |
            Verification
          type: object
          required:
            - trustFramework
          properties:
            trustFramework:
              type: string
              enum:
                - FI
              description: >-
                Identifies the trust framework used for customer verification. For UAE the value "FI" is used, to
                indicate the FI has carried out verification of the customer details based on their processes that
                adhere to legislation for KYC and AML.
            assuranceLevel:
              type: string
              description: |
                Determines the assurance level associated with the customer in the respective VerifiedClaims.
            assuranceProcess:
              type: object
              description: >
                Determines the assurance process that was followed. This reflects how the evidence meets the
                requirements of the TrustFramework and AssuranceLevel.
              required:
                - policy
                - procedure
                - assuranceDetails
              properties:
                policy:
                  type: string
                  description: Representing the standard or policy that was followed.
                procedure:
                  type: string
                  description: Representing a specific procedure from the policy that was followed.
                assuranceDetails:
                  type: array
                  description: Denoting the details about how the evidence complies with the policy
                  items:
                    type: object
                    required:
                      - assuranceType
                      - assuranceClassification
                      - evidenceRef
                    properties:
                      assuranceType:
                        description: String denoting which part of the assurance_process the evidence fulfils
                        type: string
                      assuranceClassification:
                        description: >-
                          String reflecting how the evidence has been classified or measured as required by the
                          TrustFramework
                        type: string
                      evidenceRef:
                        description: Evidence being referred to
                        type: array
                        items:
                          type: object
                          required:
                            - txn
                            - evidenceMetadata
                          properties:
                            txn:
                              description: Identifier referring to the txn used in the CheckDetails.
                              type: string
                            evidenceMetadata:
                              description: >-
                                Object indicating any meta data about the evidence that is required by the
                                AssuranceProcess in order to demonstrate compliance with the TrustFramework. It has the
                                following sub-elements
                              type: object
                              required:
                                - evidenceClassification
                              properties:
                                evidenceClassification:
                                  type: string
                                  description: The classification of the evidence metadata used in verifying a given customer
                          description: The properties of each piece of evidence used in verifying a given customer
                    description: >-
                      The properties of each assurance process implemented by the LFI to verify the details of a given
                      customer
            time:
              type: string
              format: date-time
              description: >
                Representing the date and time when the identity verification process took place. All dates in the JSON
                payloads are represented in ISO 8601 date-time format. All date-time fields in responses must include
                the timezone. An example is below: 2017-04-05T10:43:07+00:00
            verificationProcess:
              type: string
              description: |
                Unique reference to the identity verification process as performed by the OP.
            evidence:
              description: The type of evidence allowed for providing verification.
              anyOf:
                - $ref: '#/components/schemas/AEPartyIdentityEvidenceTypeDocument'
                - $ref: '#/components/schemas/AEPartyIdentityEvidenceTypeElectronicRecord'
        claims:
          description: |
            Claims related to a person or a business.
            * When `customerCategory` is provided in the response and the value is set to `Retail` then `identityType` 
              must be set to  `Person`.

            * When `customerCategory` is provided in the response and the value is set to `SME` or `Corporate` then 
              `identityType` must be set to `Business`.
          oneOf:
            - $ref: '#/components/schemas/CustomerPersonClaims'
            - $ref: '#/components/schemas/CustomerCorporateClaims'
          discriminator:
            propertyName: identityType
            mapping:
              Person: '#/components/schemas/CustomerPersonClaims'
              Business: '#/components/schemas/CustomerCorporateClaims'
    AEPartyIdentityEvidenceTypeDocument:
      type: object
      properties:
        type:
          type: string
          enum:
            - document
          description: The type of evidence allowed for providing verification.
        checkDetails:
          type: array
          items:
            $ref: '#/components/schemas/AEPartyIdentityCheckDetail'
          description: Details of one-or-more methods used to verify a physical document that asserts the identity of the customer
        verifier:
          $ref: '#/components/schemas/DocumentEvidenceVerifier'
        time:
          $ref: '#/components/schemas/ISODateTime'
        documentDetails:
          $ref: '#/components/schemas/DocumentEvidenceDetails'
        attachments:
          type: object
          required:
            - AEPartyIdentityEvidenceAttachments
          properties:
            AEPartyIdentityEvidenceAttachments:
              type: array
              items:
                $ref: '#/components/schemas/AEPartyIdentityEvidenceAttachment'
              description: |
                Attachment
          additionalProperties: false
          description: Attachments that provide evidence of the physical documents used to verify the identity of the customer
      description: >
        Document Evidence

        [https://openid.net/specs/openid-connect-4-identity-assurance-1_0.html#name-evidence-type-document](https://openid.net/specs/openid-connect-4-identity-assurance-1_0.html#name-evidence-type-document)
    AEPartyIdentityEvidenceTypeElectronicRecord:
      type: object
      properties:
        type:
          type: string
          enum:
            - electronic_record
          description: The type of evidence allowed for providing verification.
        checkDetails:
          type: array
          items:
            $ref: '#/components/schemas/AEPartyIdentityCheckDetail'
          description: Details of one-or-more methods used to verify an electronic record that asserts the identity of the customer
        time:
          $ref: '#/components/schemas/ISODateTime'
        record:
          $ref: '#/components/schemas/ElectronicRecordProperties'
        attachments:
          type: object
          required:
            - AEPartyIdentityEvidenceAttachments
          properties:
            AEPartyIdentityEvidenceAttachments:
              type: array
              items:
                $ref: '#/components/schemas/AEPartyIdentityEvidenceAttachment'
              description: |
                Attachments
          description: Attachments that provide evidence of the electronic records used to verify the identity of the customer
      description: |
        Electronic Record Evidence
      additionalProperties: false
    AEPartyIdentityCheckDetail:
      type: object
      properties:
        checkMethod:
          type: string
          description: >
            Identifes the method used by PASP for checking the evidence for verification

            String representing the check done, this includes processes such as checking the authenticity of the
            document, or verifying the user's biometric against an identity document.
        organization:
          type: string
          description: >
            String denoting the legal entity that performed the check. This SHOULD be included if the OP did not perform
            the check itself
        txn:
          type: string
          description: >
            Identifier referring to the identity verification transaction. The OP MUST ensure that this is present when
            EvidenceRef element is used. The OP MUST ensure that the transaction identifier can be resolved into
            transaction details during an audit
        time:
          $ref: '#/components/schemas/ISODateTime'
      description: |
        Identifes the method used by PASP for checking the evidence for verification.
        Representing the checks done in relation to the evidence
      additionalProperties: false
    DocumentEvidenceVerifier:
      type: object
      required:
        - organization
      properties:
        organization:
          type: string
          description: String denoting the organization which performed the verification on behalf of the OP.
        txn:
          type: string
          description: Identifier referring to the identity verification transaction.
      description: Denoting the legal entity that performed the identity verification.
      additionalProperties: false
    DocumentEvidenceDetails:
      type: object
      properties:
        type:
          type: string
          enum:
            - passport
            - driving_permit
            - idcard
            - residence_permit
            - emirates_id
          description: |
            The type of document used for evidence checking
        documentNumber:
          type: string
          description: The unique id number in the evidence used for verification checking
        personalNumber:
          type: string
          description: >
            An identifier that is assigned to the End-User and is not limited to being used in one document, for example
            a national identification number, personal identity number, citizen number, social security number, driver
            number, account number, customer number, licensee number, etc
        serialNumber:
          type: string
          description: >
            An identifier/number that identifies the document irrespective of any personalization information (this
            usually only applies to physical artifacts and is present before personalization).
        calendarType:
          type: string
          enum:
            - IslamicCalendar
            - GregorianCalendar
          description: |
            The type of calendar used for the date of issuance and date of expiry in the document evidence
            Allowable values:
            "Islamic Calendar"
            "Gregorian Calendar"
            Both calendars must follow YYYY-MM-DD
        dateOfIssuance:
          $ref: '#/components/schemas/ISODateTime'
        dateOfExpiry:
          $ref: '#/components/schemas/ISODateTime'
        issuer:
          $ref: '#/components/schemas/DocumentEvidenceDetailsIssuer'
      description: 'Representing the document used to perform the identity verification. '
      additionalProperties: false
    DocumentEvidenceDetailsIssuer:
      type: object
      required:
        - name
        - address
        - countryCode
        - jurisdiction
      properties:
        name:
          type: string
          description: |
            Designation of the issuer of the document.
        address:
          $ref: '#/components/schemas/AEPostalAddress'
        countryCode:
          type: object
          required:
            - CountryCode
          properties:
            CountryCode:
              type: string
              pattern: ^[A-Z]{2,2}$
              description: Nation with its own government, occupying a particular territory.
          additionalProperties: false
          description: >
            String containing the name of the region(s)/state(s)/province(s)/municipality(ies) that issuer has
            jurisdiction over (if this information is not common knowledge or derivable from the address)
        jurisdiction:
          type: string
          description: >
            String containing the name of the region(s)/state(s)/province(s)/municipality(ies) that issuer has
            jurisdiction over (if this information is not common knowledge or derivable from the address)
      description: Containing information about the issuer of this document.
      additionalProperties: false
    AEPartyIdentityEvidenceAttachment:
      type: object
      required:
        - desc
        - contentType
        - content
        - txn
      properties:
        desc:
          type: string
          description: |
            Description of the document. This can be the filename or just an explanation of the content.
        contentType:
          type: string
          description: |
            Content (MIME) type of the document
        content:
          type: string
          description: |
            Base64 encoded representation of the document content
        txn:
          type: string
          description: |
            Identifier referring to the transaction
      additionalProperties: false
      description: |
        Identifier referring to the transaction
    ElectronicRecordProperties:
      type: object
      required:
        - type
        - personalNumber
        - calendarType
        - createdAt
        - dateOfExpiry
        - source
      properties:
        type:
          type: string
          enum:
            - bank_account
            - mortgage_account
            - finance_account
          description: |
            String denoting the type of electronic record
        personalNumber:
          type: string
          description: >
            String representing an identifier that is assigned to the customer and is not limited to being used in one
            record, for example a national identification number, personal identity number, citizen number, social
            security number, driver number, account number, customer number, licensee number, etc.
        calendarType:
          type: string
          enum:
            - IslamicCalendar
            - GregorianCalendar
          description: |
            The type of calendar used for the date of issuance and date of expiry in the document evidence
            Allowable values:
            "Islamic Calendar"
            "Gregorian Calendar"
            Both calendars must follow YYYY-MM-DD
        createdAt:
          $ref: '#/components/schemas/ISODateTime'
        dateOfExpiry:
          $ref: '#/components/schemas/ISODateTime'
        source:
          $ref: '#/components/schemas/ElectronicRecordSourceProperties'
      description: |
        Representing the record used to perform the identity verification.
      additionalProperties: false
    ElectronicRecordSourceProperties:
      type: object
      required:
        - name
        - address
        - countryCode
        - jurisdiction
      properties:
        name:
          type: string
          description: |
            Designation of the source of the electronic_record
        address:
          $ref: '#/components/schemas/AEPostalAddress'
        countryCode:
          type: object
          properties:
            CountryCode:
              type: string
              pattern: ^[A-Z]{2,2}$
              description: Nation with its own government, occupying a particular territory.
          additionalProperties: false
          description: >
            String containing the name of the region(s) / state(s) / province(s) / municipality(ies) that source has
            jurisdiction over (if it's not common knowledge or derivable from the address)
        jurisdiction:
          type: string
          description: >
            String containing the name of the region(s) / state(s) / province(s) / municipality(ies) that source has
            jurisdiction over (if it's not common knowledge or derivable from the address)
      description: |
        Information about the source of this record
      additionalProperties: false
    ISODateTime:
      title: ISODateTime
      description: >-
        All dates in the JSON payloads are represented in ISO 8601 date-time format.All date-time fields in responses
        must include the timezone. An example is below:

        2017-04-05T10:43:07+00:00
      type: string
      format: date-time
    ProductIdentifier:
      type: object
      properties:
        id:
          type: string
          description: Identifier within the LFI for the product. Must be unique in the organisation.
        productName:
          type: string
          description: Descriptive name for the product.
        bundleName:
          description: >-
            Optional field to indicate if this account is part of a bundle that is providing additional benefit for to
            the customer
          type: string
      description: Provides the details of a given product at the LFI
    CustomerIdentifier:
      type: object
      properties:
        id:
          type: string
          description: Identifier within the LFI for the customer.
        customerName:
          type: string
          description: Name of the customer.
      required:
        - id
        - customerName
      description: Provides the unique identifier and name for a given customer at the LFI
    BalancesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeBalance'
          description: Primary data for the resource
        meta:
          $ref: '#/components/schemas/Meta'
      description: List of Balances for an Account.
    CbuaeBalanceType:
      type: string
      enum:
        - ClosingAvailable
        - ClosingBooked
        - ClosingCleared
        - Expected
        - ForwardAvailable
        - Information
        - InterimAvailable
        - InterimBooked
        - InterimCleared
        - OpeningAvailable
        - OpeningBooked
        - OpeningCleared
        - PreviouslyClosedBooked
      description: >
        The type of balance for the account.

        Encoded with allowable values of:

        * 'ClosingAvailable' - end of day balance specifying the amount available to User 1 to withdraw or use.

        * 'ClosingBooked' - end of day balance including value of payments for cheques or payments which have not been
        cleared yet.

        * 'ClosingCleared' - end of day balance including value of payments for cheques or payments which have been
        cleared.

        * 'Expected' - intra day balance including value of payments for cheques or payments which have been cleared.

        * 'ForwardAvailable' - intraday balance specifying the amount available to User 1 to withdraw or use considering
        forward dated payments or other intraday payments or cheques that will be clearing to the account.

        * 'Information' - TBC.

        * 'InterimAvailable' - intraday balance specifying the amount available to User 1 to withdraw or use (most
        probably real-time.'InterimBooked' - intraday balance including value of payments for cheques or payments which
        have not been cleared yet.

        * 'InterimCleared' - intraday balance including value of payments for cheques or payments which have been
        cleared (probably real-time).

        * 'OpeningAvailable' - start of day balance specifying the amount available to User 1 to withdraw or use.

        * 'OpeningBooked' - start of day balance including value of payments for cheques or payments which have not been
        cleared yet.

        * 'OpeningCleared' - start of day balance including value of payments for cheques or payments which have been
        cleared.

        * 'PreviouslyClosedBooked' -TBC.


        Note: LFIs support different types for presenting account balance, so this list is used to support different LFI
        systems in UAE.
    CbuaeBalance:
      type: object
      properties:
        accountId:
          description: >-
            A unique and immutable identifier produced by the financial institution to identify the account
            resource.This identifier has no meaning to the account owner (User 1).
          type: string
        creditDebitIndicator:
          $ref: '#/components/schemas/AECreditDebitIndicator'
        balanceType:
          $ref: '#/components/schemas/CbuaeBalanceType'
        timestamp:
          $ref: '#/components/schemas/AEBalanceCheckDateTime'
        amount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
        creditLines:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeCreditLine'
          description: Set of elements used to provide details of credit lines available for the account.

        # Extended Product Data Enhancement

        components:
          type: array
          items:
            $ref: '#/components/schemas/AEAmountWithCategorization'

      required:
        - accountId
        - balanceType
        - amount
        - creditDebitIndicator
        - timestamp
      description: The properties of a given balance.
    CbuaeCreditLine:
      description: Set of elements used to provide details on the credit line.
      type: object
      required:
        - included
        - creditType
        - amount
      properties:
        included:
          description: Boolean flag to Indicate whether or not a credit line is included in the balance of the account.
          type: boolean
        creditType:
          description: >
            Type of credit line provided to the account. The enumerations values are defined as follows.


            - Available: The amount of credit limit available to the account holder

            - Credit: The amount of a credit limit that has been agreed with the account holder

            - Emergency: The amount of an arranged lending limit that can be borrowed on top of pre-agreed lending, that
            has been agreed with the account holder

            - Pre-Agreed: The amount of an arranged lending limit that has been agreed with the account holder

            - Temporary: The amount of a temporary lending limit that has been agreed with the account holder
          type: string
          enum:
            - Available
            - Credit
            - Emergency
            - Pre-Agreed
            - Temporary
        amount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
    TransactionsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeTransaction'
          description: Primary data for the resource.
        meta:
          $ref: '#/components/schemas/PaginatedMeta'
      description: List of Transactions for an Account.
    CbuaeTransaction:
      type: object
      required:
        - accountId
        - transactionId
        - transactionDateTime
        - transactionType
        - subTransactionType
        - creditDebitIndicator
        - status
        - bookingDateTime
        - amount
        - transactionInformation
      properties:
        accountId:
          description: A unique and immutable identifier produced by the financial institution to identify the account resource
          type: string
        transactionId:
          description: Unique identifier for the transaction within an servicing institution.
          type: string
        transactionDateTime:
          $ref: '#/components/schemas/TransactionDateTime'
        localTimeZone:
          $ref: '#/components/schemas/LocalTimeZone'
        statementReference:
          description: Unique reference for the statement.
          type: array
          items:
            type: string
            description: Unique reference for the statement. This reference may be optionally populated if available.
        transactionReference:
          description: Unique reference for the transaction.
          type: string
        transactionType:
          description: The type of transaction
          type: string
          enum:
            - POS
            - ECommerce
            - ATM
            - BillPayments
            - LocalBankTransfer
            - SameBankTransfer
            - InternationalTransfer
            - Teller
            - Cheque
            - Other
        subTransactionType:

          # Extended Product Data Enhancement

          $ref: '#/components/schemas/AESubTransactionType'
        terminalId:
          $ref: '#/components/schemas/TerminalId'
        flags:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeFlags'
          description: One-or-more flags applied to the transaction.
        paymentModes:
          description: The mode of payment
          type: string
          enum:
            - Online
            - Offline
            - Batch
        creditDebitIndicator:
          $ref: '#/components/schemas/AECreditDebitIndicator'
        status:
          description: Status of a transaction entry on the books of the account servicer.
          type: string
          enum:
            - Booked
            - Pending
            - Rejected
        transactionMutability:
          description: Specifies the Mutability of the Transaction record.
          type: string
          enum:
            - Mutable
            - Immutable
        bookingDateTime:
          description: Date and time when a transaction entry is posted to an account on the account servicer's books.
          type: string
          format: date-time
        valueDateTime:
          description: >-
            Date and time at which assets become available to the account owner in case of a credit entry, or cease to
            be available to the account owner in case of a debit transaction entry.
          type: string
          format: date-time
        transactionInformation:
          description: >
            Further details of the transaction. This is the transaction narrative, which is unstructured text.

            REQUIRED from v2.2. The API Hub returns this value to the TPP as `TransactionInformation`, where it is also
            required, so a transaction record that omits it cannot be served.

            Where the LFI holds no stored narrative for a transaction, it MUST derive one from the data it does hold —
            the merchant name, the counterparty, or the transaction type. Whitespace-only values and non-informative
            placeholders such as `N/A`, `-`, or `Unknown` do not satisfy this requirement.

            The length bounds match the TPP-facing `TransactionInformation` schema, so a narrative that validates here
            also validates when the API Hub returns it.
          type: string
          minLength: 1
          maxLength: 500
        amount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
        chargeAmount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_6'
        chargeAmountVat:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
        currencyExchange:
          $ref: '#/components/schemas/CurrencyExchange'
        bankTransactionCode:
          $ref: '#/components/schemas/AEBankTransactionCodeStructure'
        proprietaryBankTransactionCode:
          $ref: '#/components/schemas/ProprietaryBankTransactionCode'
        balance:
          type: object
          required:
            - creditDebitIndicator
            - balanceType
            - amount
          properties:
            creditDebitIndicator:
              $ref: '#/components/schemas/AECreditDebitIndicator'
            balanceType:
              $ref: '#/components/schemas/CbuaeBalanceType'
            amount:
              $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
          description: >-
            The balance of the account at the time of the transaction. The balance amount is qualified by the balance
            type value.
        merchantDetails:
          $ref: '#/components/schemas/MerchantDetails'
        creditorAgent:
          $ref: '#/components/schemas/AEBranchAndFinancialInstitutionIdentification6_1'
        creditorAccount:
          type: array
          items:
            $ref: '#/components/schemas/AECashAccount6_0'
          description: The creditor account for the transaction, when the transaction is a debit.
        debtorAgent:
          $ref: '#/components/schemas/AEBranchAndFinancialInstitutionIdentification6_1'
        debtorAccount:
          $ref: '#/components/schemas/AECashAccount6_0'
        cardInstrument:
          $ref: '#/components/schemas/AETransactionCardInstrument'
        supplementaryData:
          type: object
          description: Any additional data stored with the transaction that is displayed to the user or available in the statement.
        geoLocation:
          $ref: '#/components/schemas/AEGeoLocation'
        billDetails:
          $ref: '#/components/schemas/BillDetails'
        paymentPurposeCode:
          $ref: '#/components/schemas/AEPaymentPurposeCode'
        isPrimaryInstrument:
          type: boolean
          description: Indicates if the transaction is made with primary instrument.

        # Extended Product Data Enhancement

        allocations:
          $ref: '#/components/schemas/AEAmountWithCategorization'

      description: Provides further details on an entry in the report.
    CbuaeFlags:
      title: Flags
      description: The flag of a transaction
      type: string
      enum:
        - Cashback
        - Payroll
        - DirectDebit
        - StandingOrder
        - Finance
        - Dividend
        - OpenFinance
    AEBankTransactionCodeStructure:
      type: object
      description: >
        BankTransactionCode is mandatory (with code specifying the Domain, Family and SubFamily as per External Codes
        ISO20022) when the ProprietaryBankTransactionCode is absent.
      properties:
        domain:
          description: Specifies the Domain
          type: string
        domainCode:
          description: Specifies the Domain Code.
          type: string
        family:
          description: Specifies the Family
          type: string
        familyCode:
          description: Specifies the Family Code
          type: string
        subFamily:
          description: Specifies the Sub-Family
          type: string
        subFamilyCode:
          description: Specifies the Sub-family Code
          type: string
      additionalProperties: false
    AEBranchAndFinancialInstitutionIdentification6_1:
      type: object
      required:
        - schemeName
        - identification
      description: >
        Financial institution servicing an account for the creditor in case the transaction is a Debit transaction or
        Financial institution servicing an account for the Debtor in case the transaction is a Credit transaction.
      properties:
        schemeName:
          $ref: '#/components/schemas/AEExternalFinancialInstitutionIdentificationCode'
        identification:
          $ref: '#/components/schemas/Identification_1'
        name:
          $ref: '#/components/schemas/Name_1'
        postalAddress:
          $ref: '#/components/schemas/AEPostalAddress'
      additionalProperties: false
    Name_1:
      description: >
        * Beneficiary

        Name by which an agent is known and which is usually used to identify that agent


        * Creditor agent

        Name by which the Financial institution(FI) which is the creditor is known and which is usually used to identify
        that FI.


        * DebtorAgent

        Name by which an financial institution of the debtor is known and which is usually used to identify that
        financial institution.
      type: string
      minLength: 1
      maxLength: 140
    AEPostalAddress:
      description: Address properties based on ISO 20022 `PostalAddress27` definition
      type: object
      required:
        - addressLine
        - country
      properties:
        addressType:
          description: The type of address. Omitted if type not held.
          type: string
          enum:
            - Billing
            - Business
            - Correspondence
            - DeliveryTo
            - MailTo
            - POBox
            - Postal
            - Permanent
            - Residential
            - Statement
            - Other
        addressLine:
          description: >-
            Information that locates and identifies a specific address for a transaction entry, that is presented in
            free format text.
          type: array
          minItems: 1
          maxItems: 7
          items:
            type: string
            minLength: 1
            maxLength: 70
        buildingNumber:
          description: The unit, apartment, or villa number within a building or community
          type: string
          minLength: 1
          maxLength: 16
        buildingName:
          description: Name of the building or house.
          type: string
          minLength: 1
          maxLength: 140
        floor:
          description: Floor or storey within a building.
          type: string
          minLength: 1
          maxLength: 70
        streetName:
          description: The name of the street or road where the property is located.
          type: string
          minLength: 1
          maxLength: 140
        districtName:
          description: The district, community, or neighbourhood where the property is located.
          type: string
          minLength: 1
          maxLength: 140
        postBox:
          description: The P.O. Box number assigned to the recipient for mail delivery.
          type: string
          minLength: 1
          maxLength: 16
        townName:
          description: Name of a built-up area, such as a town or city.
          type: string
          minLength: 1
          maxLength: 140
        countrySubDivision:
          description: Country subdivision, such as state or province. This is the Emirate where the address is registered.
          type: string
          enum:
            - AbuDhabi
            - Ajman
            - Dubai
            - Fujairah
            - RasAlKhaimah
            - Sharjah
            - UmmAlQuwain
        country:
          description: The country associated with the address, represented using the ISO 3166-1 alpha-2 country code.
          type: string
          pattern: ^[A-Z]{2}$
      additionalProperties: false
    AEPartyIdentityResidentialAddressClaim:
      allOf:
        - $ref: '#/components/schemas/AEPostalAddress'
        - type: object
          properties:
            addressType:
              type: string
              enum:
                - Residential
    AECashAccount6_0:
      type: object
      description: |
        Creditor account details available in case the transaction is a Debit transaction.
      properties:
        schemeName:
          $ref: '#/components/schemas/AEExternalAccountIdentificationCode'
        identification:
          $ref: '#/components/schemas/Identification_0'
        name:
          $ref: '#/components/schemas/Name_0'
      additionalProperties: false
    AETransactionCardInstrument:
      type: object
      required:
        - cardSchemeName
        - instrumentType
      description: Set of elements to describe the card instrument used in the transaction.
      properties:
        cardSchemeName:
          description: Name of the card scheme.
          type: string
          enum:
            - AmericanExpress
            - Diners
            - Discover
            - GCC
            - MasterCard
            - UPI
            - VISA
        instrumentType:
          description: The card instrument type.
          type: string
          enum:
            - ApplePay
            - Contactless
            - MagStripe
            - Chip
            - Other
        name:
          description: Name of the cardholder using the card instrument.
          type: string
          minLength: 1
          maxLength: 70
        identification:
          description: >-
            Identification assigned by an institution to identify the card instrument used in the transaction. This
            identification is known by the account owner, and MUST be masked.
          type: string
          minLength: 1
          maxLength: 16
          example: 1234********4321
      additionalProperties: false
    AEGeoLocation:
      description: Estimated latitude and longitude coordinates, in degrees. Contains one latitude and one longitude subfield.
      type: object
      required:
        - latitude
        - longitude
      properties:
        latitude:
          description: Latitude in degrees
          type: string
        longitude:
          description: Longitude in degrees
          type: string
      additionalProperties: false
    MerchantDetails:
      type: object
      properties:
        merchantId:
          description: Merchant Id
          type: string
        merchantName:
          description: Name by which the merchant is known.
          type: string
        merchantCategoryCode:
          description: >-
            Category code values are used to enable the classification of merchants into specific categories based on
            the type of business, trade or services supplied.
          type: string
      description: >
        Details of the Merchant involved in the transaction.

        Merchant Details are specified only for those merchant categories that are generally expected to originate
        retail financial transactions
    ProprietaryBankTransactionCode:
      type: object
      properties:
        code:
          description: Proprietary bank transaction code to identify the underlying transaction.
          type: string
        issuer:
          description: Identification of the issuer of the proprietary bank transaction code.
          type: string
      required:
        - code
      description: >
        ProprietaryBankTransactionCode is mandatory when the BankTransactionCode (with code specifying the Domain,
        Family and SubFamily as per External Codes ISO20022) is absent.

        Set of elements to fully identify a proprietary bank transaction code
    CurrencyExchange:
      type: object
      properties:
        sourceCurrency:
          $ref: '#/components/schemas/TCurrency'
        targetCurrency:
          $ref: '#/components/schemas/TCurrency'
        unitCurrency:
          $ref: '#/components/schemas/TCurrency'
        exchangeRate:
          type: string
          description: >-
            Factor used to convert an amount from one currency into another. This reflects the price at which one
            currency was bought with another currency.

            Usage: ExchangeRate expresses the ratio between UnitCurrency and QuotedCurrency (ExchangeRate =
            UnitCurrency/QuotedCurrency).
        contractIdentification:
          type: string
          description: Unique identification to unambiguously identify the foreign exchange contract.
        quotationDate:
          type: string
          format: date-time
          description: >-
            Date and time at which an exchange rate is quoted.All dates in the JSON payloads are represented in ISO 8601
            date-time format.

            All date-time fields in responses must include the timezone. An example is below:

            2017-04-05T10:43:07+00:00
        instructedAmount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
      required:
        - sourceCurrency
        - targetCurrency
        - unitCurrency
        - exchangeRate
        - instructedAmount
      description: Set of elements used to provide details on the currency exchange.
    OBActiveOrHistoricCurrencyAndAmount_6:
      type: object
      description: Transaction charges to be paid by the charge bearer.
      required:
        - amount
        - currency
      properties:
        amount:
          $ref: '#/components/schemas/AEActiveCurrencyAndAmount_SimpleType'
        currency:
          $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
        chargeIncluded:
          description: |
            If true then the value in the Amount has the ChargeAmount deducted from it
          type: boolean
    OBActiveOrHistoricCurrencyAndAmount_8:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          $ref: '#/components/schemas/AEActiveCurrencyAndAmount_SimpleType'
        currency:
          $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
      description: The amount and currency code for a given payment or transaction.
    ActiveOrHistoricCurrencyCode_1:
      description: >-
        A 3 character alphabetic code allocated to a currency under an international currency identification scheme, as
        described in the latest edition of the international standard ISO 4217 'Codes for the representation of
        currencies and funds'.
      type: string
      pattern: ^[A-Z]{3,3}$
      example: SAR
    AEActiveCurrencyAndAmount_SimpleType:
      description: >-
        A number of monetary units specified in an active currency where the unit of currency is explicit and compliant
        with ISO 4217.
      type: string
      pattern: ^\d{1,13}$|^\d{1,13}\.\d{1,5}$
    DirectDebitsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeDirectDebit'
          description: Primary data for the resource.
        meta:
          $ref: '#/components/schemas/Meta'
      description: The properties of a direct debit.
    DirectDebitStatusEnum:
      description: Specifies the status of the direct debit.
      type: string
      enum:
        - Active
        - Inactive
    CbuaeDirectDebit:
      type: object
      properties:
        accountId:
          description: >-
            A unique and immutable identifier produced by the financial institution to identify the account
            resource.This identifier has no meaning to the account owner (User 1).
          type: string
        directDebitId:
          description: >-
            A unique and immutable identifier used to identify the direct debit resource. This identifier has no meaning
            to the account owner.
          type: string
        mandateIdentification:
          description: This is the unique and immutable reference to the User 1 for the Direct Debit mandate.
          type: string
        directDebitStatusCode:
          $ref: '#/components/schemas/DirectDebitStatusEnum'
        name:
          description: This is the name of the regulated beneficiary entity that initiates the Direct Debit collection.
          type: string
        frequency:
          description: Specifies the frequency of the Direct Debit collections to the User 1 account.
          type: string
          enum:
            - Annual
            - Daily
            - Fortnightly
            - HalfYearly
            - Monthly
            - NotKnown
            - Quarterly
            - Weekly
        previousPaymentDateTime:
          type: string
          format: date-time
          description: >-
            The date of most recent direct debit collection to the User account. All dates in the JSON payloads are
            represented in ISO 8601 date-time format.

            All date-time fields in responses must include the timezone. An example is below:

            2017-04-05T10:43:07+00:00
        previousPaymentAmount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
      required:
        - accountId
        - directDebitId
        - directDebitStatusCode
        - mandateIdentification
        - name
        - frequency
      description: Account to or from which a cash entry is made.
    ScheduledPaymentsResponse:
      type: object
      description: |
        A descriptor for scheduled payments.
        This is a composite object that may be expanded in the future to support
        additional scheduled payment types for new API standards and account types.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeScheduledPayment'
          description: Primary data for the resource
        meta:
          $ref: '#/components/schemas/Meta'
    CbuaeScheduledPayment:
      type: object
      required:
        - accountId
        - scheduledPaymentId
        - scheduledType
        - scheduledPaymentDateTime
        - instructedAmount
      properties:
        accountId:
          type: string
          description: The account identifer for the account from which the scheduled payment is made.
        scheduledPaymentId:
          type: string
          description: Unique identifier for the scheduled payment.
        accountHolderName:
          $ref: '#/components/schemas/AccountHolderName'
        accountHolderShortName:
          $ref: '#/components/schemas/AccountHolderShortName'
        scheduledType:
          description: |
            Specifies the type of scheduled payment date provided under ScheduledPaymentDateTime.
              Encoded with allowable values of:
              "Arrival" - User1 specifies the date for the arrival of funds in the beneficiary (Creditor) account
              "Execution" - User1 specifies the date which the payment needs to be executed from the User 1 (Debtor) account.
          type: string
          enum:
            - Arrival
            - Execution
        scheduledPaymentDateTime:
          type: string
          format: date-time
          description: >-
            The date and time of the scheduled payment. All dates in the JSON payloads are represented in ISO 8601
            date-time format.

            All date-time fields in responses must include the timezone. An example is below:

            2017-04-05T10:43:07+00:00
        creditorReference:
          type: string
          description: The creditor reference for the scheduled payment.
        debtorReference:
          type: string
          description: The debitor reference for the scheduled payment.
        instructedAmount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
        creditorAgent:
          $ref: '#/components/schemas/AEBranchAndFinancialInstitutionIdentification5_1'
        creditorAccount:
          type: array
          items:
            $ref: '#/components/schemas/AECashAccount5_0'
          description: Provides the list of details to identify the beneficiary account.
      description: Scheduled Payments for a specific AccountId
    AEBranchAndFinancialInstitutionIdentification5_1:
      type: object
      required:
        - schemeName
        - identification
      description: >
        Creditor Agent refers to the Financial Institution that manages the account on behalf of the scheduled payment
        beneficiary party, managing registration, booking of entries on the account, calculating balances on the account
        and providing information about the account. This is the servicing Financial Institution of the Beneficiary
        account.
      properties:
        schemeName:
          $ref: '#/components/schemas/AEExternalFinancialInstitutionIdentificationCode'
        identification:
          $ref: '#/components/schemas/Identification_1'
      additionalProperties: false
    AECashAccount5_0:
      type: object
      required:
        - schemeName
        - identification
      description: Provides the details to identify the beneficiary account.
      properties:
        schemeName:
          $ref: '#/components/schemas/AEExternalAccountIdentificationCode1'
        identification:
          $ref: '#/components/schemas/Identification_0'
      additionalProperties: false
    StandingOrdersResponse:
      type: object
      description: |
        A descriptor for StandingOrder.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeStandingOrder'
          description: Primary data for the resource.
        meta:
          $ref: '#/components/schemas/Meta'
    CbuaeStandingOrder:
      type: object
      required:
        - accountId
        - standingOrderId
        - frequency
        - firstPaymentDateTime
        - standingOrderStatusCode
        - firstPaymentAmount
      properties:
        accountId:
          type: string
          description: The account identifer for the account from which the standing order is instructed.
        standingOrderId:
          type: string
          description: Unique identifier for the standing order.
        accountHolderName:
          $ref: '#/components/schemas/AccountHolderName'
        accountHolderShortName:
          $ref: '#/components/schemas/AccountHolderShortName'
        standingOrderType:
          description: The type of Standing Order.
          type: string
          enum:
            - BetweenMyAccounts
            - SameBankTransfer
            - LocalBankTransfer
            - InternationalTransfer
            - Charity
        frequency:
          type: string
          description: "The frequency that the Standing Order payments are executed from the account. Encoded with allowable values as follows:\n\n####\_Individual Definitions:\n\n* NotKnown - SO frequency is not known (i.e. not provided)\n\n* EveryDay - SO frequency is Every day\n\n* EveryWorkingDay - SO frequency is every working day\n\n* IntervalDay - SO frequency is an interval specified in number of calendar days (2 to 31)\n\n* IntervalWeekDay - SO frequency is an interval specified in weeks (1 to 51), and the day within the week (1 to 7)\n\n* WeekInMonthDay - SO frequency is a monthly interval, specifying the week of the month (1 to 5) and day within the week (1 to 7)\n\n* IntervalMonthDay - SO frequency is an interval specified in months (between 1 to 6, 12, 24), specifying the day within the month (-5 to -1, 1 to 31)\n\n* QuarterDay - SO frequency is quarterly RECEIVED\n\n* BiAnnual - SO frequency is every 6 months\n\n* Annual - SO frequency is every year\n\n* RECEIVED = Paid on the 20th March, 19th June, 24th September and 20th December.\n\n#### Individual Patterns:\n\n* NotKnown (ScheduleCode)\n\n* EveryDay (ScheduleCode)\n\n* EveryWorkingDay (ScheduleCode)\n\n* IntervalDay:NoOfDay (ScheduleCode + NoOfDay)\n\n* IntervalWeekDay:IntervalInWeeks:DayInWeek (ScheduleCode + IntervalInWeeks + DayInWeek)\n\n* WeekInMonthDay:WeekInMonth:DayInWeek (ScheduleCode + WeekInMonth + DayInWeek)\n\n* IntervalMonthDay:IntervalInMonths:DayInMonth (ScheduleCode + IntervalInMonths + DayInMonth)\n\n* QuarterDay: + either (RECEIVED) ScheduleCode + QuarterDay\n\nThe regular expression for this element combines five smaller versions for each permitted pattern. To aid legibility - the components are presented individually here:\n\n* NotKnown\n\n* EveryDay\n\n* EveryWorkingDay\n\n* IntervalDay:(([2-9])|([1-2][0-9])|3[0-1])\n\n* IntervalWeekDay:[1-51]:[1-7]\n\n* WeekInMonthDay:[1-5]:[1-7]\n\n* IntervalMonthDay:([1-6]|12|24):(-[1-5]|[1-9]|[12][0-9]|3[01])\n\n* QuarterDay:(RECEIVED)\n\n#### Full Regular Expression:\n\n* ^(NotKnown)$|^(EveryDay)$|^(EveryWorkingDay)$|^(IntervalDay:(([2-9])|([1-2][0-9])|3[0-1]))$|^(IntervalWeekDay:[1-51]:[1-7])$|^(WeekInMonthDay:[1-5]:[1-7])$|^(IntervalMonthDay:([1-6]|12|24):(-[1-5]|[1-9]|[12][0-9]|3[01]))$|^(QuarterDay:(RECEIVED))$\"\n"
        creditorReference:
          type: string
          description: >-
            Unique reference in the context of the creditor, provided by the creditor to the User (Debtor), to
            unambiguously refer to the payment transaction. Usage: If available, the initiating party (i.e. Debtor)
            provides this reference in the structured remittance information, to enable reconciliation by the Creditor
            upon receipt of the amount of money. This field is populated by the User 1 (who is the initiating party of
            the payment e.g. the Debtor). Field is free format text.
        purpose:
          $ref: '#/components/schemas/PurposeSO'
        firstPaymentDateTime:
          type: string
          format: date-time
          description: The date on which the first payment for a Standing Order schedule will be made.
        nextPaymentDateTime:
          type: string
          format: date-time
          description: The date on which the next payment for a Standing Order schedule will be made.
        lastPaymentDateTime:
          type: string
          format: date-time
          description: The date on which the last (most recent) payment for a Standing Order schedule was made.
        finalPaymentDateTime:
          type: string
          format: date-time
          description: The date on which the final payment for a Standing Order schedule will be made.
        numberOfPayments:
          type: string
          description: >-
            Number of the payments that will be made in completing this frequency sequence including any executed since
            the sequence start date.
        standingOrderStatusCode:
          description: Specifies the status of the standing order in code form.
          type: string
          enum:
            - Active
            - Inactive
        firstPaymentAmount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
        nextPaymentAmount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
        lastPaymentAmount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
        finalPaymentAmount:
          $ref: '#/components/schemas/OBActiveOrHistoricCurrencyAndAmount_8'
        creditorAgent:
          $ref: '#/components/schemas/AEBranchAndFinancialInstitutionIdentification5_1'
        creditorAccount:
          type: array
          items:
            $ref: '#/components/schemas/AECashAccount5_0'
          description: List of Creditor Accounts for the standing order instruction.
        supplementaryData:
          type: object
          description: >-
            Any additional data stored with the standing order that is displayed to the user or available in the
            statement.
      description: Standing Orders for a specific AccountId
    ProductsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeProduct'
          description: Primary data for the resource
        meta:
          $ref: '#/components/schemas/Meta'
      description: Product data for a given account

    # Extended Product Data Enhancement

    AEProductFinancialCalculationMeasure:
      type: object
      properties:
        Amount:
          $ref: '#/components/schemas/AEActiveOrHistoricCurrencyAndAmount_0'
        Rate:
          description: Specifies the percentage rate applied when the charge is calculated as a percentage rather than 
            as a fixed monetary amount.
          type: number
          minimum: 0
          maximum: 100
        ApplicationFrequency:
          description: >- 
            Frequency at which reward, interest, or profit is applied, such as monthly or quarterly, 
            including Islamic profit distribution
          type: string
          enum:
            - Monthly
            - Daily
        InterestCalculationMethod:
          description: >-
            Method used to calculate interest such as based on principal or drawdown.
          type: string
          enum:
            - PrincipalBalance
            - OutstandingBalance
            - InitialDrawdownAmount
        ProfitCalculationMethod:
          description: >-
            Method used to calculate profit, such as based on principal or drawdown, for Islamic calculation
            methods.
          type: string
          enum:
            - PrincipalBalance
            - OutstandingBalance
            - InitialDrawdownAmount
        MaximumChargeAmount:
          description: Defines the maximum monetary amount that can be applied when a percentage-based charge 
            calculation would otherwise exceed this limit.
          type: object
          required:
            - Amount
            - Currency
          properties:
            Amount:
              $ref: '#/components/schemas/AEActiveCurrencyAndAmount_SimpleType'
            Currency:
              $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
          additionalProperties: false
        Basis:
          description: Confirmation of what the charge is based on and calculated against.
          type: string
      additionalProperties: false


    AEProductConditions:
      type: object
      required:
        - Description
      properties:
        Field:
          description: Field in the product spec that the condition applies to
          type: string 
        Operator:
          description: Logical operator used in the condition (e.g., ==, >, <=, !=)
          type: string           
        Value:
          description: Value used in the condition
          type: string
        Description:
          description: Description of the fee, including purpose and applicability
          type: string

    AEJwe:
      title: Encrypted Data
      description: >-
        Encrypted bank data, provided as a JWE by the LFI. Please refer to the business rules for a description of the 
        approach to decrypting this data.
      type: string
      example: eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00ifQ....

    CbuaeProduct:
      type: object
      description: |
        A descriptor for an product.
        This is a composite object that may be expanded in the future to support
        additional account types for new API standards and product types.
      required:
        - AccountId
      properties:
        AccountId:
          description: >-
            A unique and immutable identifier produced by the financial institution to identify the account
            resource.
          type: string

        # Extended Product Data Enhancement

        ShariaStructure:
          description: Provides the Islamic finance contract or structure type applied to a product when it has been 
            confirmed as Sharia-compliant.
          type: string
          enum:
          - Ijara
          - ServiceIjara
          - Murabaha
          - Musharaka
          - Tawarruq
        Charges:
          $ref: '#/components/schemas/AEProductCharges'
        FinanceRates:
          anyOf:
            - $ref: '#/components/schemas/AEProductFinanceRates'
            - $ref: '#/components/schemas/AEJwe'
        ShariaFinanceRates:
          description: Finance rates for Sharia-compliant products. Can be provide in cleartext or as a JWE based on
            preference of LFI for sharing this information.
          anyOf:
            - description: List of one-or-more finance rates for Sharia-compliant products
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/AEProductShariaFinanceRate1Types'
            - $ref: '#/components/schemas/AEJwe'
        DepositRates:
          $ref: '#/components/schemas/AEProductDepositRates'
        ExpectedProfitRates:
          description: List of one-or-more deposit rates for Sharia-compliant products
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/AEProductExpectedProfitRate1Properties'
        IsSecured:
          type: boolean
          description: Indicates if the product is secured by collateral.

        # Extended Product Data Enhancement

        IsSalaryTransferRequired:
          description: >- 
            Indicates whether salary transfer is required as part of the product eligibility or approval conditions.
            Common for salary-assigned lending products.
        Tenor:
          description: Product tenor
          type: object
          minProperties: 1
          properties:
            OriginalTenor:
              description: Original product tenor
              allOf:
                - $ref: '#/components/schemas/AEDuration'
            RemainingTenor:
              description: Original product tenor
              allOf:
                - $ref: '#/components/schemas/AEDuration'
        AssetBacked:
          $ref: '#/components/schemas/AEProductAssetBackedProducts'
        RewardsBenefits:
          $ref: '#/components/schemas/AEProductRewardsBenefitsProperties'
        TakafulRequired:
          description: Indicates whether Takaful coverage is required for the product.
          type: boolean
        TakafulDescription:
          description: Provides information on the type and purpose of the required Takaful coverage. 
          type: string
          minLength: 1
          maxLength: 500

    AEProductCharges:

      description: Fees and charges applicable to the account or product
      type: array
      minItems: 1
      items:
        description: Properties of the charges applied
        type: object
        required:
          - Name
          - Description
          - Charge
        properties:
          Type:
            description: Type of charge.
            type: string
            enum:
            - MonthlyFees
            - AnnualFees
            - BalanceFallBelow
            - Overdraft
            - DomesticTransaction
            - ForeignTransaction
            - ATMWithdrawal
            - ChequeBook
            - ReplacementChequeBook
            - ReturnCheque
            - CardReplacement
            - AccountStatement
            - LetterIssued
            - AccountClosure
            - CashAdvance
            - LatePayment
            - BalanceTransfer
            - OverLimit
            - SalesVoucherCopy
            - Processing
            - FinanceCancellation
            - PartialPayment
            - EarlySettlement
            - FinalSettlement
            - Other
          Name:
            type: string
            description: Name of the charge
            minLength: 1
            maxLength: 40
          Description:
            description: Description of the fee, including purpose and applicability
            type: string
          Charge:
            description: Array of charge components including amount, currency, and applicable rate
            type: array
            items:
              $ref: '#/components/schemas/AEProductFinancialCalculationMeasure'
          Conditions:
            description: Array of conditions that trigger the fee
            type: array
            items:
              $ref: '#/components/schemas/AEProductConditions'
          Justification:
            description: Reasoning or business logic behind the imposition of the fee
            type: string
          Frequency:
            description: >-
              Frequency or trigger logic for the reward or fee, such as monthly if balance < 1000, or periodic 
              Hibah distribution
            type: string
          DonatedToCharity:
            description: Confirmation if the charge will be donated to charity when the product is Sharia compliant
            type: boolean
          Notes:
            type: string
            description: Additional notes or clarifications about the rate structure
            minLength: 1
            maxLength: 500
          SupplementaryInformation:
            description: >-
              Optional object for supplementary metadata, such as Sharia compliance notes or reward history
            type: object
        additionalProperties: false
  
    AEActiveOrHistoricCurrencyAndAmount_0:
      type: object
      required:
        - Amount
        - Currency
      description: A given amount value and currency
      properties:
        Amount:
          description: >-
            A number of monetary units specified in an active currency where the unit of currency is explicit and
            compliant with ISO 4217.
          type: string
        Currency:
          $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
      additionalProperties: false

    BeneficiariesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CbuaeBeneficiary'
          description: Primary data for the resource.
        meta:
          $ref: '#/components/schemas/Meta'
      description: Beneficiaries for a specific AccountId
    CbuaeBeneficiary:
      type: object
      properties:
        accountId:
          type: string
          description: The account identifer for the account that the beneficiary is associated with.
        beneficiaryId:
          type: string
          description: Unique identifier for the beneficiary resource
        beneficiaryType:
          description: >-
            Specifies the Beneficiary Type. Encoded with allowable values of: 'Activated' - Beneficiary has been added
            to the beneficiary list using SCA. 'NotActivated' - Beneficiary has been added to the beneficiary list
            without SCA
          type: string
          enum:
            - Activated
            - NotActivated
        addedViaOF:
          description: Indicates whether the Beneficiary record was created as part of an Open Finance (OF) payment. If 
            false, the Beneficiary was created through an existing LFI channel.
          type: boolean
        accountHolderName:
          $ref: '#/components/schemas/AccountHolderName'
        accountHolderShortName:
          $ref: '#/components/schemas/AccountHolderShortName'
        reference:
          type: string
          description: >-
            A unique and immutable identifier used to identify the beneficiary resource. This identifier has no meaning
            to the account owner.
        supplementaryData:
          type: object
          description: Any additional data stored with the beneficiary that is displayed to the User.
        servicer:
          $ref: '#/components/schemas/AEBranchAndFinancialInstitutionIdentification6_1'
        creditorAccount:
          type: array
          items:
            $ref: '#/components/schemas/AECashAccount5_0'
          description: List of Creditor Accounts for the beneficiary.
      required:
        - accountId
        - beneficiaryId
        - beneficiaryType
        - addedViaOF
      description: The properties of a given beneficiary.
    TCurrency:
      type: string
      pattern: ^[A-Z]{3,3}$
      description: Currency code for the account.
    AccountHolderName:
      type: string
      description: >
        The Account Holder Name is the name or names of the Beneficiary account owner(s) represented at the account
        level, as displayed by the Creditor Agent's online channels and as provided by the Beneficiary to the customer
        when adding the Beneficiary in the Beneficiary list.

        Note, the Account Holder Name is not the product name or the nickname of the account.d
    AccountHolderShortName:
      type: string
      description: |
        The Beneficiary account holder nick name
    TransactionDateTime:
      title: TransactionDateTime
      description: |
        The Date Time of when the transaction occurred.
        All dates in the JSON payloads are represented in ISO 8601 date-time format.
        All date-time fields in responses must include the timezone.
        An example is below: 2017-04-05T10:43:07+00:00
      type: string
      format: date-time
    LocalTimeZone:
      anyOf:
        - title: LocalTimeZone
          description: |
            Timezone as date-time format date - now deprecated as incorrect
          type: "string"
          format: "date-time"
          deprecated: true
        - description: >
            The UTC offset of the local date and time of where the transaction occurred.

            E.g. UTC+03:00
          type: string
          example: UTC+03:00
          pattern: ^UTC[+-]([01]\d|2[0-4])(:?[0-5]\d)?$
    TerminalId:
      description: ID of the Terminal if the transaction was initiated from a retail POS
      type: string
      minLength: 8
      maxLength: 20
    BillDetails:
      description: Bill Details
      type: object
      properties:
        BillerID:
          description: |
            This should be 'BillerCode' as per SP-SADAD specifications. It is a
            unique biller identifier within SADAD that could be used by the
            end-user to refer to a specific SADAD biller (e.g. STC biller code
            is 001, water services biller code is 015, etc.)
          type: string
        BillNumber:
          description: Unique bill identifier within the account.
          type: string
        BillPaymentType:
          description: |
            Indicates whether the bill could be a One-off payment, Recurring
            payment, Postpaid, Pre-paid, etc
          type: string
          enum:
            - Post-Paid
            - AdvancePaymentForRoaming
            - Recharge
            - Renewal
            - RoamingDeposit
            - One-Off
            - RecurringPayment
    AEPaymentPurposeCode:
      description: Aani purpose code that relates to the type of services or goods that corresponds to the underlying 
        purpose of the payment. The code must conform to the published Aani payment purpose code list
      type: string
      minLength: 1
      maxLength: 3
      pattern: ^[A-Z]{3}$
    PurposeSO:
      description: |
        The purpose of the Standing Order payment.
        A free format string in the form of transaction categorisation.
        Example: "Bills and expenses", "Government payment", "Personal Expenses".
      type: string
      minLength: 1
      maxLength: 50
    ConfirmationRequest:
      type: object
      properties:
        data:
          type: object
          properties:
            account:
              type: object
              required:
                - schemeName
                - identification
              properties:
                schemeName:
                  type: string
                  enum:
                    - IBAN
                  description: >-
                    Name of the identification scheme for the account. Encoded with allowable values published in an
                    external list.
                identification:
                  type: string
                  description: >-
                    Identification for the account assigned by the LFI based on the Account Scheme Name. This
                    identification is known by the User account owner. For IBAN, refer to the ISO Standard 13616.
              description: >-
                The account the Confirmation of Payee query is about, identified by IBAN. From v2.2 the name the TPP
                submitted is NOT sent to the LFI — the LFI returns the name(s) it holds against this account, and the
                API Hub compares them.
          description: Primary data for the resource.
      description: Properties of a Confirmation of Payee request
    Meta:
      type: object
      properties:
        totalPages:
          type: number
          description: |
            The number of expected pages for the query.
        totalRecords:
          type: number
          description: |
            The total number of records in the full set.
      description: Metadata relevant to the resource.
    PaginatedMeta:
      type: object
      properties:
        paginated:
          type: boolean
          description: |
            `true` if the response is paginated.

            `false` if the response returns all matching data elements.

            If not specified, a non-paginated response is assumed.
        totalPages:
          type: number
          description: |
            The number of expected pages for the query.
        totalRecords:
          type: number
          description: |
            The total number of records in the full set.
      description: Pagination metadata relevant to the resource.
    ErrorMessage:
      description: Message describing the problem that has occurred.
      type: string
    Error400:
      description: Default error response payload structure for Ozone Connect
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          description: >-
            Error code identifying the problem that occurred. This may either be one of the prescribed Error Code(s) or
            a namespaced Error Code where the namespace is the system or organisation that has responded with the error,
            and the code is the code specific to the system or organisation. organisation or system.

            LFIs should implement error codes based on the prescribed codes or guidance in the standards, with
            non-specific codes maintained for backward compatibility with version 1.2.
          anyOf:
            - type: string
              enum:
                - Consent.Invalid
                - Consent.BusinessRuleViolation
                - Consent.FailsControlParameters
                - Consent.InvalidUserIdentifier
                - JWS.InvalidSignature
                - JWS.Malformed
                - JWS.InvalidClaim
                - JWS.InvalidHeader
                - JWE.DecryptionError
                - JWE.InvalidHeader
                - GenericRecoverableError
                - GenericError
                - Event.UnexpectedEvent
                - Body.InvalidFormat
                - Resource.InvalidFormat
            - type: string
              pattern: ^[A-Za-z]+\.[A-Za-z0-9]+$
            - type: string
        errorMessage:
          $ref: '#/components/schemas/ErrorMessage'
    transactionFilterDateTime:
      anyOf:
        - description: >-
            Filter-based on date. Deprecated as not supported by standards. Date and time should be supported by TPPs,
            but TPPs can support date only if time component is not available.
          type: string
          format: date
          deprecated: true
          x-deprecated-in-version: v1.2.1
        - description: Filter-based on date and time
          type: string
          format: date-time
    Error403:
      description: >-
        Error code identifying the problem that occurred. The first part of the code is the namespace, which is the name
        of the organisation or system that is rejecting the payment, and the second part is the specific rejection
        reason code for the originating organisation or system.

        LFIs should implement error codes based on the prescribed codes or guidance in the standards, with non-specific
        codes maintained for backward compatibility with version 1.2.
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          description: >-
            Error code identifying the problem that occurred. This may either be one of the prescribed Error Code(s) or
            a namespaced Error Code where the namespace is the system or organisation that has responded with the error,
            and the code is the code specific to the system or organisation.
          anyOf:
            - type: string
              enum:
                - AccessToken.InvalidScope
                - Consent.TransientAccountAccessFailure
                - Consent.AccountTemporarilyBlocked
                - Consent.PermanentAccountAccessFailure
                - GenericRecoverableError
                - GenericError
            - type: string
              pattern: ^[A-Za-z]+\.[A-Za-z0-9]+$
            - type: string
        errorMessage:
          $ref: '#/components/schemas/ErrorMessage'
    Error500:
      description: >-
        Error code identifying the problem that occurred. The first part of the code is the namespace, which is the name
        of the organisation or system that is rejecting the payment, and the second part is the specific rejection
        reason code for the originating organisation or system.

        LFIs should implement error codes based on the prescribed codes or guidance in the standards, with non-specific
        codes maintained for backward compatibility with version 1.2.
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          description: >-
            Error code identifying the problem that occurred. This may either be one of the prescribed Error Code(s) or
            a namespaced Error Code where the namespace is the system or organisation that has responded with the error,
            and the code is the code specific to the system or organisation.
          anyOf:
            - type: string
              enum:
                - GenericRecoverableError
                - GenericError
            - type: string
              pattern: ^[A-Za-z]+\.[A-Za-z0-9]+$
            - type: string
        errorMessage:
          $ref: '#/components/schemas/ErrorMessage'

    # Extended Product Data Enhancement

    AESubTransactionType:
      type: string
      enum:
        - Purchase
        - Reversal
        - Refund
        - Withdrawal
        - WithdrawalReversal
        - Deposit
        - DepositReversal
        - MoneyTransfer
        - Repayments
        - Interest
        - Fee
        - Charges
        - Profit
        - Disbursement
        - Adjustment
        - Tax
        - Rewards
        - NotApplicable
        - LeaseRepayment
    AEBalanceCategory:
      type: string
      enum:
        - Principal
        - Interest
        - FeesAndCharges
        - PastDue
        - Profit
        - Rental
    AEShariaFlag:
      description: A flag to denote if the Product is Sharia Compliant
      type: boolean
      default: false
    AEAmountWithCategorization:
      type: object
      required:
        - BalanceCategory
        - Amount
      properties:
        BalanceCategory:
          $ref: '#/components/schemas/AEBalanceCategory'
        BalanceDescription:
          description: Allows a description to provided of the balance to identify the specific Shari’ah compliant 
            charges, payments, and rewards made which can affect the balance.
          type: string
          minLength: 1
          maxLength: 500
        Amount:
          description: The value of the categorized balance, incorporating `Amount` and `Currency`.
          type: object
          required:
          - Amount
          - Currency
          properties:
            Amount:
              $ref: '#/components/schemas/AEActiveCurrencyAndAmount_SimpleType'
            Currency:
              $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
    AEBalanceWithCategorization:
      type: object
      required:
      - Amount
      properties:
        Amount:
          description: The value of the balance on account, incorporating `Amount` and `Currency`.
          type: object
          required:
          - Amount
          - Currency
          properties:
            Amount:
              $ref: '#/components/schemas/AEActiveCurrencyAndAmount_SimpleType'
            Currency:
              $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
        Components:
          description: Components of the stated balance, defined by the value of `BalanceCategory`, that reflects a
            portion of the stated balance.
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/AEAmountWithCategorization'
    AEStatements:
      type: object
      required:
        - AccountId
        - AccountSubType
        - Statements
      properties:
        AccountId:
          description: "\r\nA unique and immutable identifier produced by the LFI to identify the account resource.This identifier has no meaning to the account owner."
          type: string
        AccountSubType:
          $ref: '#/components/schemas/AEExternalAccountSubTypeCode'
        Statements:
          description: >-
            Array containing details of periodic statements. Each statement includes key financial metrics, balances,
            summaries, and payment details for a specific statement cycle
          type: array
          items:
            type: object
            required:
              - StatementId
              - StatementDate
              - OpeningDate
              - ClosingDate
              - OpeningBalance
              - ClosingBalance
              - Summary
            properties:
              StatementId:
                description: Unique identifier/reference for the statement
                type: string
              StatementDate:
                description: Date the statement was issued/generated
                type: string
                format: date
              OpeningDate:
                description: Start date of the statement period
                type: string
                format: date
              ClosingDate:
                description: End date of the statement period
                type: string
                format: date
              CreditLine:
                $ref: '#/components/schemas/AEActiveOrHistoricCurrencyAndAmount_0'
              OpeningBalance:
                allOf:
                  - description: Object containing opening balance details
                    type: object
                    required:
                      - CreditDebitIndicator
                    properties:
                      CreditDebitIndicator:
                        $ref: '#/components/schemas/AECreditDebitIndicator'                    
                  - $ref: '#/components/schemas/AEBalanceWithCategorization'
              ClosingBalance:
                allOf:
                  - description: Object containing closing balance details
                    type: object
                    required:
                      - CreditDebitIndicator
                    properties:
                      CreditDebitIndicator:
                        $ref: '#/components/schemas/AECreditDebitIndicator'                    
                  - $ref: '#/components/schemas/AEBalanceWithCategorization'
              Summary:
                description: Array providing an aggregated summary of financial activities within the statement period, 
                  such as Purchase, Repayments, Fee, and Interest/Profit. Each object contains the total aggregated 
                  amount, currency, and the count of transactions for the corresponding SubTransactionType.
                type: array
                items:
                  type: object
                  required:
                    - CreditDebitIndicator
                    - SubTransactionType
                    - Amount
                    - Count
                  properties:
                    CreditDebitIndicator:
                      $ref: '#/components/schemas/AECreditDebitIndicator'
                    TransactionType:
                      description: Type of transaction activity.
                      type: string
                      enum:
                        - POS
                        - ECommerce
                        - ATM
                        - BillPayments
                        - LocalBankTransfer
                        - SameBankTransfer
                        - InternationalTransfer
                        - Teller
                        - Cheque
                        - Other
                    SubTransactionType:
                      $ref: '#/components/schemas/AESubTransactionType'
                    Amount:
                      $ref: '#/components/schemas/AEActiveOrHistoricCurrencyAndAmount_0'
                    Count:
                      description: Number of transactions or occurrences for the transaction type
                      type: number
              ExpectedNextStatement:
                description: Object containing projected finance charges or fees expected in the next statement cycle.
                type: array
                minItems: 1
                items:
                  type: object
                  minProperties: 1
                  properties:
                    Type:
                      description: Statement type.
                      type: string
                      enum:
                      - Purchase
                      - Reversal
                      - Refund
                      - Withdrawal
                      - WithdrawalReversal
                      - Deposit
                      - DepositReversal
                      - MoneyTransfer
                      - Repayments
                      - Interest
                      - Fee
                      - Charges
                      - Profit
                      - Disbursement
                      - Adjustment
                      - Tax
                      - Rewards
                      - NotApplicable
                    Amount:
                      description: Statement amount, according to `Type` value.
                      type: object
                      required:
                      - Amount
                      - Currency
                      properties:
                        Amount:
                          $ref: '#/components/schemas/AEActiveCurrencyAndAmount_SimpleType'
                        Currency:
                          $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
              NextPayment:
                description: Object containing details related to the next payment due
                type: array
                items:
                  type: object
                  required:
                    - Date
                    - Amount
                  properties:
                    Date:
                      description: Payment due date
                      type: string
                      format: date
                    Amount:
                      $ref: '#/components/schemas/AEActiveOrHistoricCurrencyAndAmount_0'
                    Type:
                      description: Type of payment - minimum, scheduled, estimated, or other
                      type: string
                      enum:
                        - Minimum
                        - Scheduled
                        - Estimated
                        - Other
    AEExternalAccountSubTypeCode:
      description: Specifies the sub type of account (product family group).
      type: string
      enum:
        - CurrentAccount
        - Savings
        - CreditCard
        - Mortgage
        - Finance

    AEDuration:
      type: string
      pattern: ^P(\d+Y)?(\d+M)?$
      format: duration
      description: A period of time implemented using ISO 8601 compatible duration format
      example: P2Y3M

    AEProductAssetBackedProducts:
      description: Array containing details of collateral required or pledged for the product
      type: array
      items:
        type: object
        required:
          - Type
          - AssetType
          - Description
        properties:
          Type:
            description: Defines how the financed asset is treated as security. Use `Collateral`` when the asset is 
              owned by the customer and pledged as security. Use `OwnershipTransfer`` when the asset is owned by the 
              bank and will be transferred to the customer under Islamic finance structures at the end of the 
              finance.
            type: string
            enum:
            - Collateral
            - OwnershipTransfer
          AssetType:
            description: Defines the specific category of collateral pledged to secure a financial product, 
              applicable across both conventional and Islamic finance structures. This field classifies the nature 
              of the asset or guarantee—such as real estate, salary assignment, or vehicle lien—used to mitigate 
              credit risk and support underwriting decisions.
            type: string
            enum:
            - Property
            - SalaryAssignment
            - EndOfServiceGratuity
            - SalaryAndGratuityAssignment
            - FixedDepositLien
            - Vehicle
            - TakafulPolicy
            - Rahn
            - PostDatedCheque
            - Other
          Description:
            description: >-
              Provides a free-text explanation or contextual detail about the collateral pledged to secure a 
              financial product. This may include asset characteristics, legal references, or contractual notes 
              relevant to underwriting and risk assessment.
            type: string
          Valuation:
            type: array
            items:
              type: object
              properties:
                Date:
                  description: Date of the valuation.
                  type: string
                  format: date
                Amount:
                  $ref: '#/components/schemas/AEActiveOrHistoricCurrencyAndAmount_0'
          SupplementaryInformation:
            description: Additional data or metadata not captured in the main fields, to provide further context.
            type: object
          OwnershipTransfer:
            description: Details on how the asset will be transferred from the LFI to the customer.
            type: object
            required:
            - Type
            properties:
              TransferOfOwnershipDate:
                description: Expected date when ownership will be transferred to the customer
                type: string
                format: date
              Type:
                description: Method of ownership transfer.
                type: string
                enum:
                - Gift
                - TokenPurchase
                - Gradual
                - SeparateSaleContract
              Method:
                description: The event that triggers the ownership transfer event.
                type: string
                enum:
                - EndOfLease
                - Buyouts
              TokenPurchaseAmount:
                description: The amount and currency to be paid by the customer to the LFI at token purchase.
                  Required when `Type` is `TokenPurchase`.
                type: object
                required:
                - Amount
                - Currency
                properties:
                  Amount:
                    $ref: '#/components/schemas/AEActiveCurrencyAndAmount_SimpleType'
                  Currency:
                    $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
              BuyoutSchedule:
                description: Amount and currency to be paid each period by the customer to buy out the bank's share.
                  Applies to Diminishing Musharaka Islamic finance products. Required when `Type` is `Gradual`.
                type: object
                required:
                - Frequency
                - BuyoutAmount
                properties:
                  Frequency:
                    description: The frequency of the payments made by the customer to buy out the bank's share.
                    type: string
                    enum:
                    - Weekly
                    - Fortnightly
                    - Monthly
                    - Quarterly
                    - HalfYearly
                    - Annual
                    - Other
                  BuyoutAmount:
                    description: The buyout amount the customer must pay during each period.
                    type: object
                    required:
                    - Amount
                    - Currency
                    properties:
                      Amount:
                        $ref: '#/components/schemas/AEActiveCurrencyAndAmount_SimpleType'
                      Currency:
                        $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
              SaleAgreement:
                description: Confirm the details of the sale contract to be executed after lease completion.
                  Required when `Type` is `SeparateSaleContract`.
                type: object
                required:
                  - Required
                properties:
                  Required:
                    description: Boolean indicator to confirm whether a formal sale agreement is required for 
                      ownership transfer.
                    type: boolean
                  Execution:
                    description: Specifies when the sale contract is executed.
                    type: string
                    enum:
                    - AtLeaseCompletion
                    - CustomerRequestPostLease
                  Price:
                    description: Represents the nominal or token purchase price agreed for the final transfer of the property.
                    type: object
                    required:
                    - Amount
                    - Currency
                    properties:
                      Amount:
                        $ref: '#/components/schemas/AEActiveCurrencyAndAmount_SimpleType'
                      Currency:
                        $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
              TransferConditions:
                description: |
                  Conditions that must be met before ownership can be transferred to the customer. The following
                  values are allowed:

                  * `AllLeasePaymentsCompleted``:  All lease obligations must be fulfilled before the sale contract 
                    is executed.

                  * `CustomerRequestRequired`: The customer must formally request the transfer of ownership via a 
                    gift after completing all lease payments.  Applicable when the `Type` is `Gift`.

                  * `SaleAgreementExecuted`: A separate sale agreement must be formally executed between the bank 
                    and the customer to transfer ownership at the end of the lease term.  Applicable when the 
                    `Type` is `TokenPurchase`.

                  * `AllBuyoutsCompleted`:  Included when the customer has purchased all the banks shares in the 
                    property.  Applicable when the `Type` is `Gradual`.

                  * `IndependentSaleContractSigned`: A separate sale agreement must be signed before the legal 
                    transfer of ownership can be completed.  Applicable when the `Type` is `SeparateSaleContract`.
                type: array
                minItems: 1
                items:
                  type: string
                  enum:
                  - AllLeasePaymentsCompleted
                  - CustomerRequestRequired
                  - SaleAgreementExecuted
                  - AllBuyoutsCompleted
                  - IndependentSaleContractSigned
        additionalProperties: false

    AEProductRewardsBenefitsBaseProperties:
      description: Rewards applicable to the banking product with confirmation of the current balance when applicable.
      type: object
      required:
      - Name
      properties:
        Name:
          description: Name of the reward or benefit program.
          type: string
        Description:
          description: Description of the reward or benefit program.
          type: string

    AEProductRewardsBenefitsCashbackProperties:
      allOf:
      - $ref: '#/components/schemas/AEProductRewardsBenefitsBaseProperties'
      - description: Cashback benefit or reward.
        type: object
        required:
        - Type
        properties:
          Type:
            type: string
            enum:
            - Cashback
          Balance:
            description: The current Cashback balance available or to be paid to the customer.
            allOf:
              - $ref: '#/components/schemas/AEActiveOrHistoricCurrencyAndAmount_0'
          RewardBasis:
            description: Details how cashback can be earned by the customer.
            type: array
            minItems: 1
            items:
              type: string
          FrequencyPaid:
            description: When the Cashback is paid to the customer.
            type: string
            enum:
            - Daily
            - Weekly
            - Monthly
            - Quarterly
            - HalfYearly
            - Annually
            - UponRequest
            - Other

    AEProductRewardsBenefitsPointsProperties:
      allOf:
      - $ref: '#/components/schemas/AEProductRewardsBenefitsBaseProperties'
      - description: Points benefit or reward.
        type: object
        required:
        - Type
        - PointsType
        properties:
          Type:
            type: string
            enum:
            - Points
          PointsType:
            description: The type of Points awarded to the customer.
            type: string
          Balance:
            description: The current Points balance available to the customer.
            type: string
          ExpiryDate:
            description: The date the Points will expire if not used.
            type: string
            format: date
          RewardBasis:
            description: Details how Points can be earned by the customer.
            type: array
            minItems: 1
            items:
              type: string

    AEProductRewardsBenefitsComplimentaryServicesProperties:
      allOf:
      - $ref: '#/components/schemas/AEProductRewardsBenefitsBaseProperties'
      - description: Complimentary services benefit or reward.
        type: object
        required:
        - Type
        - RewardBasis
        properties:
          Type:
            type: string
            enum:
            - ComplimentaryServices
          RewardBasis:
            description: Information on the reward or benefit available to the customer.
            type: array
            minItems: 1
            items:
              type: string

    AEProductRewardsBenefitsDiscountsProperties:
      allOf:
      - $ref: '#/components/schemas/AEProductRewardsBenefitsBaseProperties'
      - description: Discounts benefit or reward.
        type: object
        required:
        - Type
        - RewardBasis
        properties:
          Type:
            type: string
            enum:
            - Discounts
          RewardBasis:
            description: Information on the reward or benefit available to the customer.
            type: array
            minItems: 1
            items:
              type: string

    AEProductRewardsBenefitsLifestyleProperties:
      allOf:
      - $ref: '#/components/schemas/AEProductRewardsBenefitsBaseProperties'
      - description: Lifestyle benefit or reward.
        type: object
        required:
        - Type
        - RewardBasis
        properties:
          Type:
            type: string
            enum:
            - Lifestyle
          RewardBasis:
            description: Information on the reward or benefit available to the customer.
            type: array
            minItems: 1
            items:
              type: string

    AEProductRewardsBenefitsProtectionProperties:
      allOf:
      - $ref: '#/components/schemas/AEProductRewardsBenefitsBaseProperties'
      - description: Protection benefit or reward.
        type: object
        required:
        - Type
        - RewardBasis
        properties:
          Type:
            type: string
            enum:
            - Protection
          RewardBasis:
            description: Information on the reward or benefit available to the customer.
            type: array
            minItems: 1
            items:
              type: string

    AEProductRewardsBenefitsOtherProperties:
      allOf:
      - $ref: '#/components/schemas/AEProductRewardsBenefitsBaseProperties'
      - description: Other benefit or reward.
        type: object
        required:
        - Type
        - RewardBasis
        properties:
          Type:
            type: string
            enum:
            - Other
          RewardBasis:
            description: Information on the reward or benefit available to the customer.
            type: array
            minItems: 1
            items:
              type: string

    AEProductBenefitRewardsTypes:
      oneOf:
      - $ref: '#/components/schemas/AEProductRewardsBenefitsCashbackProperties'
      - $ref: '#/components/schemas/AEProductRewardsBenefitsPointsProperties'
      - $ref: '#/components/schemas/AEProductRewardsBenefitsComplimentaryServicesProperties'
      - $ref: '#/components/schemas/AEProductRewardsBenefitsDiscountsProperties'
      - $ref: '#/components/schemas/AEProductRewardsBenefitsLifestyleProperties'
      - $ref: '#/components/schemas/AEProductRewardsBenefitsProtectionProperties'
      - $ref: '#/components/schemas/AEProductRewardsBenefitsOtherProperties'
      discriminator:
        propertyName: Type
        mapping:
          Cashback: '#/components/schemas/AEProductRewardsBenefitsCashbackProperties'
          Points: '#/components/schemas/AEProductRewardsBenefitsPointsProperties'
          ComplimentaryServices: '#/components/schemas/AEProductRewardsBenefitsComplimentaryServicesProperties'
          Discounts: '#/components/schemas/AEProductRewardsBenefitsDiscountsProperties'
          Lifestyle: '#/components/schemas/AEProductRewardsBenefitsLifestyleProperties'
          Protection: '#/components/schemas/AEProductRewardsBenefitsProtectionProperties'
          Other: '#/components/schemas/AEProductRewardsBenefitsOtherProperties'

    AEProductRewardsBenefitsProperties:
      description: List of benefits and rewards associated with a product.
      type: array
      minItems: 1
      items:
        $ref: '#/components/schemas/AEProductBenefitRewardsTypes'

    AEProductInterestCalculationMethod:
      description: Method used to calculate interest or profit, depending on the product type
      type: string
      enum:
        - PrincipalBalance
        - OutstandingBalance
        - InitialDrawdownAmount

    AEProductRateFrequencyCodes:
      type: string
      enum:
        - Monthly
        - Daily
        - Quarterly
        - Annually

    AEProductCalculationFrequency:
      allOf:
        - description: Describes how often the interest rate is calculated
        - $ref: '#/components/schemas/AEProductRateFrequencyCodes'

    AEProductApplicationFrequency:
      allOf:
        - description: Describes how often the rate is charged, especially in relation to the conditions or triggers 
            (e.g., monthly, one-off, or on each trigger)
        - $ref: '#/components/schemas/AEProductRateFrequencyCodes'

    AEProductInterestCalculationMethodProperties:
      type: object
      properties:
        InterestCalculationMethod:
          $ref: '#/components/schemas/AEProductInterestCalculationMethod'

    AEProductProfitCalculationMethodProperties:
      type: object
      properties:
        ProfitCalculationMethod:
          $ref: '#/components/schemas/AEProductInterestCalculationMethod'

    AEProductFinanceRateProperties:
      description: Details of the annual percentage rate
      type: object
      minProperties: 1
      properties:
        AnnualPercentageRate:
          description: The annual percentage rate for the product.
          type: object
          minProperties: 1
          properties:
            StartingFrom:
              description: The starting annual percentage rate.
            UpTo:
              description: The maximum annual percentage rate.
              type: number
            AdditionalInformation:
              description: Additional notes or clarifications about the annual percentage rate.
              type: string
        Tiers:
          description: The tiers of the finance profit rate product.
          type: array
          minItems: 1
          items:
            type: object
            description: The tier of the finance profit rate product.
            required:
            - Name
            - Unit
            properties:
              Name:
                type: string
                description: The name of the tier.
              Unit:
                type: string
                enum:
                  - Balance
                  - LTV
                  - Rate
                description: The unit of the tier.
              ApplicationMethod:
                description: Specifies whether the tier rate is applied only to the balance within the defined balance
                  band or to the customers entire balance once that tier level is reached.
                type: string
                enum:
                - PerTier
                - WholeBalance
              BalanceTierDetails:
                description: Required when `Unit` is set to `Balance`. Describes balance tier range values.
                type: array
                minItems: 1
                items:
                  type: object
                  properties:
                    MinimumTierValue:
                      $ref: "#/components/schemas/AEActiveOrHistoricCurrencyAndAmount_0"
                    MaximumTierValue:
                      $ref: "#/components/schemas/AEActiveOrHistoricCurrencyAndAmount_0"
                    TierRate:
                      description: The tier rate.
                      type: number
              LTVTierDetails:
                description: Required when `Unit` is set to `LTV`. Defines the interest rate or profit rate applicable 
                  to each Loan-to-Value (LTV) range where different rates apply.
                type: array
                minItems: 1
                items:
                  type: object
                  minProperties: 1
                  properties:
                    LTVStart:
                      description: Start rate for LTV Tier
                      type: number
                    LTVEnd:
                      description: End rate for LTV Tier
                      type: number
                    TierRate:
                      description: The tier rate.
                      type: number
              RateRange:
                description: Required when `Unit` is set to `Rate`. Defines the minimum and maximum interest rate or 
                  profit rate range that a customer may be eligibility for, depending on factors such as their credit 
                  score, income, etc.
                type: object
                properties:
                  MinimumRate:
                    description: Minimum rate range
                    type: number
                  MaximumRate:
                    description: Maximum rate range
                    type: number
                  AdditionalInformation:
                    description: Additional information on rate range
                    type: string
        Conditions:
          description: A set of conditions under which the finance rate applies.
          type: array
          items:
            $ref: '#/components/schemas/AEProductConditions'
        Notes:
          type: string
          description: Additional notes or clarifications about the rate structure/charge
          minLength: 1
          maxLength: 500
        AdditionalInformation:
          type: array
          description: The additional information of the finance profit rate product.
          items:
            type: object
            properties:
              Type:
                type: string
                enum:
                  - Other
                description: The type of additional information.
              Description:
                type: string
                description: The description of the additional information.

    AEProductVariableRateProperties:
      description: Properties of a variable rate associated with all or part of a product.
      type: object
      properties:
        Description:
          description: Description of the rate.
          type: string
        Rate:
          description: Value of the rate.
          type: number
        BenchMark:
          description: Rate benchmark.
          type: string
        BenchMarkRate:
          description: Benchmark rate value.
          type: number
        Margin:
          description: Margin added to the base rate to determine the effective rate
          type: number
        RateReviewFrequency:
          $ref: '#/components/schemas/AEDuration'
        RateReviewNextDate:
          description: Date for next review of the rate.
          type: string
          format: date
        CalculationFrequency:
          $ref: '#/components/schemas/AEProductCalculationFrequency'
        ApplicationFrequency:
          $ref: '#/components/schemas/AEProductApplicationFrequency'

    AEProductFixedRateProperties:
      description: Properties of a fixed rate associated with all or part of a product.
      type: object
      properties:
        Description:
          description: Description of the rate.
          type: string
        Rate:
          description: Value of the rate.
          type: number
        FixedRateEndDate:
          description: End date for the fixed rate period.
          type: string
          format: date
        CalculationFrequency:
          $ref: '#/components/schemas/AEProductCalculationFrequency'
        ApplicationFrequency:
          $ref: '#/components/schemas/AEProductApplicationFrequency'

    AEProductVariableInterestRateProperties:
      description: Properties of a variable interest rate
      type: object
      required:
      - RateType
      properties:
        RateType:
          description: A product that carries a variable interest rate
          type: string
          enum:
            - VariableInterest
      allOf:
        - $ref: '#/components/schemas/AEProductVariableRateProperties'
        - $ref: '#/components/schemas/AEProductInterestCalculationMethodProperties'
        - $ref: '#/components/schemas/AEProductFinanceRateProperties'

    AEProductVariableProfitRateProperties:
      description: Properties of a variable profit rate
      type: object
      required:
      - RateType
      properties:
        RateType:
          description: A product that carries a variable profit rate
          type: string
          enum:
            - VariableProfit
      allOf:
        - $ref: '#/components/schemas/AEProductVariableRateProperties'
        - $ref: '#/components/schemas/AEProductProfitCalculationMethodProperties'
        - $ref: '#/components/schemas/AEProductFinanceRateProperties'

    AEProductFixedInterestRateProperties:
      description: Properties of a fixed interest rate
      type: object
      required:
      - RateType
      properties:
        RateType:
          description: A product that carries a fixed interest rate
          type: string
          enum:
            - FixedInterest
      allOf:
        - $ref: '#/components/schemas/AEProductFixedRateProperties'
        - $ref: '#/components/schemas/AEProductInterestCalculationMethodProperties'
        - $ref: '#/components/schemas/AEProductFinanceRateProperties'

    AEProductFixedProfitRateProperties:
      description: Properties of a fixed profit rate
      type: object
      required:
      - RateType
      properties:
        RateType:
          description: A product that carries a fixed profit rate
          type: string
          enum:
            - FixedProfit
      allOf:
        - $ref: '#/components/schemas/AEProductFixedRateProperties'
        - $ref: '#/components/schemas/AEProductProfitCalculationMethodProperties'
        - $ref: '#/components/schemas/AEProductFinanceRateProperties'

    AEProductFixedRateEndProperties:
      type: object
      properties:
        FixedRateEnd:
          description: Information on actions by LFI at end of fixed term period.
          type: string

    AEProductVariableTermProperties:
      type: object
      properties:
        VariableTerm:
          description: The variable term period
          allOf:
          - $ref: '#/components/schemas/AEDuration'

    AEProductHybridInterestRateProperties:
      description: Properties of an interest rates with a fixed and variable element
      type: object
      required:
      - RateType
      properties:
        RateType:
          description: A product that carries an interest rate and has both fixed and variable elements
          type: string
          enum:
            - HybridInterest
        FixedRate:
          allOf:
            - $ref: '#/components/schemas/AEProductFixedRateProperties'
            - $ref: '#/components/schemas/AEProductInterestCalculationMethodProperties'
            - $ref: '#/components/schemas/AEProductFinanceRateProperties'
            - $ref: '#/components/schemas/AEProductFixedRateEndProperties'
        VariableRate:
          allOf:
            - $ref: '#/components/schemas/AEProductVariableRateProperties'
            - $ref: '#/components/schemas/AEProductInterestCalculationMethodProperties'
            - $ref: '#/components/schemas/AEProductFinanceRateProperties'
            - $ref: '#/components/schemas/AEProductVariableTermProperties'
      allOf:
        - $ref: '#/components/schemas/AEProductFinanceRateProperties'

    AEProductHybridProfitRateProperties:
      description: Properties of a profit rates with a fixed and variable element
      type: object
      required:
      - RateType
      properties:
        RateType:
          description: A product that carries a profit rate and has both fixed and variable elements
          type: string
          enum:
            - HybridProfit
        FixedRate:
          allOf:
            - $ref: '#/components/schemas/AEProductFixedRateProperties'
            - $ref: '#/components/schemas/AEProductProfitCalculationMethodProperties'
            - $ref: '#/components/schemas/AEProductFinanceRateProperties'
            - $ref: '#/components/schemas/AEProductFixedRateEndProperties'
        VariableRate:
          allOf:
            - $ref: '#/components/schemas/AEProductVariableRateProperties'
            - $ref: '#/components/schemas/AEProductProfitCalculationMethodProperties'
            - $ref: '#/components/schemas/AEProductFinanceRateProperties'
            - $ref: '#/components/schemas/AEProductVariableTermProperties'
      allOf:
        - $ref: '#/components/schemas/AEProductFinanceRateProperties'

    AEProductFinanceRates:
      title: Cleartext Product Data
      oneOf:
        - $ref: '#/components/schemas/AEProductFixedInterestRateProperties'
        - $ref: '#/components/schemas/AEProductFixedProfitRateProperties'
        - $ref: '#/components/schemas/AEProductVariableInterestRateProperties'
        - $ref: '#/components/schemas/AEProductVariableProfitRateProperties'
        - $ref: '#/components/schemas/AEProductHybridInterestRateProperties'
        - $ref: '#/components/schemas/AEProductHybridProfitRateProperties'
      discriminator:
        propertyName: RateType
        mapping:
          FixedInterest: '#/components/schemas/AEProductFixedInterestRateProperties'
          FixedProfit: '#/components/schemas/AEProductFixedProfitRateProperties'
          VariableInterest: '#/components/schemas/AEProductVariableInterestRateProperties'
          VariableProfit: '#/components/schemas/AEProductVariableProfitRateProperties'
          HybridInterest: '#/components/schemas/AEProductHybridInterestRateProperties'
          HybridProfit: '#/components/schemas/AEProductHybridProfitRateProperties'

    AEProductDepositRates:
      type: object
      required:
      - RateType
      - RateDetails
      properties:
        RateType:
          description: The deposit rate type
          type: string
          enum:
            - FixedInterest
            - FixedProfit
            - VariableInterest
            - VariableProfit
        RateDetails:
          $ref: '#/components/schemas/AEProductRateDetails1Properties'

    AEProductRateDetails1Properties:
      description: Details of the deposit rates
      type: array
      minItems: 1
      items:
        description: Details of the fixed or variable rates that are available to the customer or is applicable to 
          the customers product.
        type: object
        minProperties: 1
        properties:
          RateCategory:
            description: Confirmation what the rate relates to.
            type: string
            enum:
            - Applied 
            - Standard 
            - Bonus 
            - Introductory 
            - Other 
          AnnualRate:
            description: The annual rate applied when a single rate is applicable.
            type: number
          AnnualRateRange:
            description: When a rate range applies
            type: object
            minProperties: 1
            properties:
              MinRate:
                description: The minimum rate that could apply
                type: number
              MaxRate:
                description: The maximum rate that could apply
                type: number
          Tier:
            description: Applicable when a rate applies to a balance tier or band.
            type: object
            minProperties: 1
            properties:
              MinBalance:
                description: The minimum tier or band balance.
                type: string
              MaxBalance:
                description: The maximum tier or band balance.
                type: string
              Currency:
                $ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
          Term:
            description: ISO 8601 duration of the fixed rate or the introductory/bonus rate.
            allOf:
            - $ref: '#/components/schemas/AEDuration'
          EffectiveDate:
            description: When applicable, the date when the bonus or introductory rate will be expire.
            type: string
            format: date
          ExpiryDate:
            description: When applicable, the date when the bonus or introductory rate is effective from.
            type: string
            format: date
          CalculationMethod:
            description: The balance used to calculate the interest or profit.
            type: string
            enum:
            - DailyClosingBalance
            - MinimumMonthlyBalance
            - AverageDailyBalance 
            - AverageMonthlyBalance 
            - AccountOpeningBalance
            - NotApplicable 
            - Other
          CalculationFrequency:
            description: The frequency the interest or profit is calculated.
            type: string
            enum: 
            - Monthly
            - Daily
            - Quarterly
            - HalfYearly
            - Annually
            - NotApplicable
          ApplicationFrequency:
            description: When the interest or profit is applied to the account.
            type: string
            enum:
            - Monthly
            - Daily
            - Quarterly
            - HalfYearly
            - Annually
            - NotApplicable
          Notes:
            description: Additional free-text notes.
            type: string

    AECreditDebitIndicator:
      description: Indicates whether a given balance, transaction, or summarized amount is a credit or a debit.
      type: string
      enum:
        - Credit
        - Debit

    AEBalanceCheckDateTime:
      description: Indicates the date (and time) that the account balance was checked
      type: string
      format: date-time


    AEProductExpectedProfitRate1Properties:
      description: Properties of a deposit rate for a given Sharia product
      type: object
      required:
        - RateType
        - RateDetails
        - DepositRateType
      properties:
        RateType:
          description: The deposit rate type
          type: string
          enum:
            - FixedProfit
            - VariableProfit
        Description:
          description: Describes the available deposit rate
          type: string
          minLength: 1
          maxLength: 500
        DepositRateType:
          type: string
          enum:
            - ExpectedProfitRate
            - IndicativeProfitRate
        ProfitSharingRatio:
          description: Provides the profit sharing ratio for the deposit rate 
          type: string
          minLength: 1
          maxLength: 35
        ProfitDistributionMethod:
          description: Provides the profit distribution method defined for the deposit rate
          type: string
          minLength: 1
          maxLength: 500
        ProfitDistributionFrequency:
          description: Provides the product distribution frequency for the deposit rate
          type: string
          minLength: 1
          maxLength: 70
        RateDetails:
          $ref: '#/components/schemas/AEProductRateDetails1Properties'

    AEProductShariaProfitCalculationMethod1Properties:
      type: object
      properties:
        ProfitCalculationMethod:
          description: Method used to calculate profit, depending on the product type
          type: string
          enum:
            - PrincipalBalance
            - OutstandingBalance
            - InitialDrawdownAmount
            - UnusedCreditLine
            - UtilizedLimit

    AEProductShariaVariableProfitRate1Properties:
      description: Properties of a variable profit rate
      type: object
      required:
      - RateType
      properties:
        RateType:
          description: A product that carries a variable profit rate
          type: string
          enum:
            - VariableProfit
      allOf:
        - $ref: '#/components/schemas/AEProductVariableRateProperties'
        - $ref: '#/components/schemas/AEProductShariaProfitCalculationMethod1Properties'
        - $ref: '#/components/schemas/AEProductFinanceRateProperties'

    AEProductShariaFixedProfitRate1Properties:
      description: Properties of a fixed profit rate
      type: object
      required:
      - RateType
      properties:
        RateType:
          description: A product that carries a fixed profit rate
          type: string
          enum:
            - FixedProfit
      allOf:
        - $ref: '#/components/schemas/AEProductFixedRateProperties'
        - $ref: '#/components/schemas/AEProductShariaProfitCalculationMethod1Properties'
        - $ref: '#/components/schemas/AEProductFinanceRateProperties'

    AEProductShariaFinanceRate1Types:
      title: Cleartext Sharia Finance Rate Data
      oneOf:
        - $ref: '#/components/schemas/AEProductShariaFixedProfitRate1Properties'
        - $ref: '#/components/schemas/AEProductShariaVariableProfitRate1Properties'
        - $ref: '#/components/schemas/AEProductHybridProfitRateProperties'
      discriminator:
        propertyName: RateType
        mapping:
          FixedProfit: '#/components/schemas/AEProductShariaFixedProfitRate1Properties'
          VariableProfit: '#/components/schemas/AEProductShariaVariableProfitRate1Properties'
          HybridProfit: '#/components/schemas/AEProductHybridProfitRateProperties'
  parameters:
    aspspId:
      name: o3-aspsp-id
      in: header
      schema:
        type: string
      required: true
      deprecated: true
      description: >-
        Identifier for the financial institution that the request is targetted to. This header is deprecated and will be
        removed in a future version of Ozone Connect. Use `o3-provider-id` instead.
    providerId:
      name: o3-provider-id
      in: header
      schema:
        type: string
      required: true
      description: Identifier for the financial institution that the request is targetted to
    callerOrgId:
      name: o3-caller-org-id
      in: header
      schema:
        type: string
      required: true
      description: An identifier for the organization calling the API
    callerClientId:
      name: o3-caller-client-id
      in: header
      schema:
        type: string
      required: true
      description: An identifier for the OIDC clientId calling the API
    callerSoftwareStatementId:
      name: o3-caller-software-statement-id
      in: header
      schema:
        type: string
      required: true
      description: An identifier for the software statement calling the API
    apiUri:
      name: o3-api-uri
      in: header
      schema:
        type: string
      required: true
      description: The parameterised URL of the API being called by the caller
    apiOperation:
      name: o3-api-operation
      in: header
      schema:
        type: string
      required: true
      description: The API operation carried out by the caller (e.g. GET, POST, PUT, DELETE, PATCH)
    consentId:
      name: o3-consent-id
      in: header
      schema:
        type: string
      required: true
      description: The consentId for which this call is being made
    callerInteractionId:
      name: o3-caller-interaction-id
      in: header
      schema:
        type: string
      required: false
      description: The interaction ID passed in by the caller, if any
    ozoneInteractionId:
      name: o3-ozone-interaction-id
      in: header
      schema:
        type: string
      required: true
      description: >-
        An interaction ID generated by Ozone if the caller did not send in one. If the callerInteractionId is specified,
        this takes the same value.
    psuIdentifier:
      name: o3-psu-identifier
      in: header
      schema:
        type: string
      required: true
      description: A Base64 encoded representation of the psuIdentifier JSON object.
    transaction-fromBookingDateTime:
      name: fromBookingDateTime
      in: query
      description: >-
        If specified, the API should only return transactions which have a `bookingDateTime` that occurs on or after the
        specified date-time.
      schema:
        $ref: '#/components/schemas/transactionFilterDateTime'
    transaction-toBookingDateTime:
      name: toBookingDateTime
      in: query
      description: >-
        If specified, the API should only return transactions which have a `bookingDateTime` that occurs on or before
        the specified date-time.
      schema:
        $ref: '#/components/schemas/transactionFilterDateTime'
    page:
      name: page
      in: query
      description: Page of results to request (standard pagination)
      required: true
      schema:
        default: 1
        type: integer
      style: form
    page-size:
      name: page-size
      in: query
      description: Page size to request. Default is 100 to comply with the Operating Guidelines for the Open Finance Framework.
      required: true
      schema:
        default: 100
        type: integer
      style: form
  securitySchemes:
    OzoneConnectApiKey:
      description: >-
        Communications between the API Hub and the LFI Ozone Connect implementation are secured using an API Key, which
        is a secret shared between the API Hub and the LFI.
      type: apiKey
      in: header
      name: Authorization
    OzoneConnectClientCredentials:
      type: oauth2
      description: >
        Communications between the API Hub and the LFI Ozone Connect implementation are secured using a Client
        Credentials grant type.


        LFIs must host an OAuth 2.0 Authorization Server to utilise this security pattern. Scope values are set during
        the onboarding process, and represented by a placeholder in this API description.
      flows:
        clientCredentials:
          tokenUrl: https://example.lfi.ae/token
          scopes:
            placeholder: Placeholder for scopes, which are set by the LFI during onboarding
    OzoneConnectJwtAuth:
      description: >
        Communications between the API Hub and the LFI Ozone Connect implementation are secured using the "JWT Auth"
        mechanism, where the Client presents a signed JSON Web Token as a credential.


        The Server MUST verify the signature in order to authenticate the Client.


        Please note that the value of the `scheme` parameter is not a registered HTTP Authentication Scheme, to indicate
        it is specific to Ozone Connect. Please refer to API Hub documentation for further details.
      type: http
      scheme: Ozone-Connect-JWT-Auth
