openapi: 3.0.1
servers:
  - url: https://<your-ozone-cm-server>
info:
  title: Consent Manager API
  description: >
    This document provides an API description in [OpenAPI](https://spec.openapis.org/oas/v3.0.1.html)

    for the Consent Manager API.


    These APIs are implemented by Ozone and should be called by the financial institution to find, modify and delete
    consents.


    ### 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, `.1` indicates the first version of the Ozone Connect API description that implements the UAE
    standard version 2.0.

    ### v2.2.1

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

    * Changed `patch /insurance-quote-log/{logId}` to add `InsurancePolicyId` when `QuoteStatus` is `PolicyIssued`.

    * Changed `DebtorReference` and `CreditorReferences` to implement Aani-compatible pattern.

    * Changed the `status` query parameter on `get /psu/{userId}/consents` to a comma-separated list of
      `AEConsentStatus` values (`style: form`, `explode: false`), evaluated as a union — for example
      `?status=Authorized,Suspended`. The parameter is now typed, so an unrecognised value is rejected with `400`
      rather than returning an empty array. The operation no longer references the shared
      `#/components/parameters/status` component, which is deliberately unchanged: `get /consents`,
      `get /consent-groups/{consentGroupId}/consents` and `get /accounts/{accountId}/consents` continue to take a
      single untyped value.

    * Added `paymentResponse.paymentRail` to `patch /payment-log/{id}` and `get /payment-log`, recording the rail
      over which the LFI settled the payment — `AANI`, `FTS`, or `LFI` for a payment settled internally. The LFI
      MUST populate it when patching the status to a terminal success status, and the value MUST agree with the
      namespace of any `paymentResponse.rejectReasonCode` entry.

    * Changed `get /payment-log` to be paginated, taking the shared `page` and `pageSize` parameters already used by
      the consent list operations and returning `paginationMetadata` in place of the empty `meta` object. Callers
      written against v2.1 received every payment for the consent in one response and MUST now follow `page` to
      retrieve the rest.

  version: v2.2.1
tags:
  - name: consents
  - name: consent-groups
  - name: consents-by-psu
  - name: consents-by-account
  - name: payments
  - name: resource-log
  - name: actions
  - name: health-check
security:
  - {}
  - OzoneConnectJwtAuth: []
paths:
  /consents:
    post:
      tags:
        - consents
      summary: Creates a new consent
      description: |
        Used by Ozone to create a new consent using a Heimdall interaction.
      operationId: addConsent
      requestBody:
        description: >
          Creates a new consent in the consent Manager.


          The API is primarily used by Ozone for creating consents when requested by a TPPs.


          Financial Institutions may use this end-point to import consents and for supporting externally managed
          consents. This is not part of the CBUAE standard.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizationDetails'
      responses:
        '201':
          description: |
            Indicates the successful creation of a consent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsentPostResponse'
        '400':
          description: |
            Indicates a failure to create the consent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
    get:
      tags:
        - consents
      summary: Retrieves all the consents that meet the search criteria
      description: >
        Retrieves an array of consents that meets the search criteria.


        If no consents could be found, then an empty array is returned.


        This API may be used by an financial institution to get a "stream" of consents that have been created or updated
        since a given timestamp.
      operationId: getAllConsents
      parameters:
        - name: updatedAt
          in: query
          schema:
            type: number
          required: false
          description: |
            Select only consents updated after the specified time
        - $ref: '#/components/parameters/consentType'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
      responses:
        '200':
          description: |
            Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/multiConsentResponse'
        '400':
          description: Indicates a failure to retrieve the consents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /consents/{consentId}:
    get:
      tags:
        - consents
      summary: Retrieve a consent by its id
      description: Retrieves a consent by its id.
      operationId: getConsentsByConsentId
      parameters:
        - $ref: '#/components/parameters/consentId'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    $ref: '#/components/schemas/consent'
                  meta:
                    $ref: '#/components/schemas/meta'
        '400':
          description: |
            Indicates a failure to retrieve the consent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
    patch:
      tags:
        - consents
      summary: Patches one or more fields in a consent
      description: |
        This operation allows an financial institution modify fields within a consent's `consentBody`.

        Typically, this API would be called after the PSU has authorised a consent. This would
        allow the financial institution to "patch in" the `psuIdentifier` and `accountIds` associated with the
        consent.

        This is also called as authentication progresses for a multi-auth consent.
      operationId: patchConsent
      parameters:
        - $ref: '#/components/parameters/consentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsentManager.AEConsentUpdateProperties'
      responses:
        '204':
          description: |
            Indicates a successful operation.
            The response does not have a body.
        '400':
          description: |
            Indicates a failure to patch the consent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /consents/{consentId}/audit:
    get:
      tags:
        - consents
      summary: Retrieve an audit of a consent by the consent's id
      description: |-
        Retrieves an audit of a consent by the consent's id.
        The audit log is a low-level record of all changes applied to a Consent throughout its life-cycle
      operationId: getAuditConsentsByConsentId
      parameters:
        - $ref: '#/components/parameters/consentId'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - providerId
                        - operation
                        - timestamp
                        - fkMongoId
                        - fkId
                        - id
                        - ozoneInteractionId
                      properties:
                        providerId:
                          type: string
                          description: |
                            The provider id of the financial institution that made the change
                        operation:
                          type: string
                          description: |
                            Like "create" or "patch"
                        timestamp:
                          type: integer
                        fkMongoId:
                          type: string
                          description: |
                            A unique identifier for the audit log in mongodb
                        fkId:
                          type: string
                          description: |
                            A unique identifier for the consentId
                        id:
                          type: string
                          description: |
                            A unique identifier for the audit log
                        ozoneInteractionId:
                          type: string
                          description: >
                            The ozone interaction id assigned to the interaction that caused this changed. Useful for
                            looking up the api-log.


                            Note - this is not the "heimdall Interaction Id" - this is an identifier for the API log
                        callerDetails:
                          type: object
                          description: |
                            The details of the API caller that made the change
                          additionalProperties: false
                          properties:
                            callerOrgId:
                              type: string
                            callerClientId:
                              type: string
                            callerSoftwareStatementId:
                              type: string
                        patchFilter:
                          type: string
                          description: |
                            Low-level operation description of the selector for the patch
                        patch:
                          type: string
                          description: |
                            Low-level operation description of the patch that was applied at the storage level
                  meta:
                    $ref: '#/components/schemas/meta'
        '400':
          description: |
            Indicates a failure to retrieve the consent's audit trail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /consent-groups/{consentGroupId}/consents:
    get:
      tags:
        - consent-groups
      summary: Retrieves consents within a consent group
      description: |
        Retrieves an array of consents that are within a consent group.

        If no consents could be found, then an empty array is returned.

        For CBUAE, a consent group id is the `BaseConsentId`
      operationId: getConsentsInConsentGroup
      parameters:
        - name: consentGroupId
          in: path
          schema:
            type: string
          required: true
          description: |
            Select consents within the consentGroupId
        - $ref: '#/components/parameters/consentType'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
      responses:
        '200':
          description: |
            Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/multiConsentResponse'
        '400':
          description: Indicates a failure to retrieve the consents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /psu/{userId}/consents:
    get:
      tags:
        - consents-by-psu
      summary: Retrieves all the consents associated with a given PSU
      description: |
        Retrieves an array of consents associated with the PSU.

        If no consents could be found associated with the PSU, then an empty array is returned.

        The userId path parameter is matched with the `psuIdentifiers.userId` field in the consent.
      operationId: getConsents
      parameters:
        - $ref: '#/components/parameters/userId'
        - $ref: '#/components/parameters/consentType'
        - name: status
          in: query
          required: false
          style: form
          explode: false
          description: >
            Consent statuses to filter by, as a comma-separated list — for example `?status=Authorized,Suspended`.

            The list is evaluated as a union: a consent is returned if its status matches any value in the list. Order
            is not significant and duplicates are ignored. Omit the parameter to return consents of every status.

            Every value MUST be a member of `AEConsentStatus`. A request carrying any other value is rejected with
            `400`. Values are case-sensitive.
          schema:
            type: array
            minItems: 1
            items:
              $ref: '#/components/schemas/AEConsentStatus'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
      responses:
        '200':
          description: |
            Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/multiConsentResponse'
        '400':
          description: Indicates a failure to retrieve the consents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /accounts/{accountId}/consents:
    get:
      tags:
        - consents-by-account
      summary: Retrieve consents of a account by its id
      description: |
        Retrieve consents of a account by its id
      operationId: getAccountIdConsents
      parameters:
        - name: accountId
          in: path
          schema:
            type: string
          required: true
          description: Identifier for the account
        - $ref: '#/components/parameters/consentType'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/multiConsentResponse'
        '400':
          description: |
            Indicates a failure to create the consent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /consent-groups/{consentGroupId}/consents/action/revoke:
    post:
      tags:
        - actions
      summary: Revokes consents within a consent group
      description: |
        Revokes consents that are within a consent group.
      operationId: revokeConsentsInConsentGroup
      parameters:
        - name: consentGroupId
          in: path
          schema:
            type: string
          required: true
          description: |
            Select consents within the consentGroupId
      requestBody:
        description: >
          An end-point for revoking a consent within a consent group.


          This is similar in behaviour to the consent revocation endpoint, but operates on a consent group id parameter
          instead
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeConsent'
      responses:
        '204':
          description: |
            Indicates a successful operation.
            The response does not have a body.
        '400':
          description: Indicates a failure to revoke the consent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /consents/{consentId}/action/revoke:
    post:
      tags:
        - actions
      summary: Revoke a consent by its id
      description: >-
        Revokes a consent by its id along with any associated access and refresh tokens.

        This API is used by ozone internally to revoke consents.

        The API should be used by a financial institution to revoke consents (rather than simply patching the consent)
        to also revoke the tokens associated with the consent
      operationId: revokeConsentsByConsentId
      parameters:
        - $ref: '#/components/parameters/consentId'
      requestBody:
        description: |
          An end-point for revoking a consent.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeConsent'
      responses:
        '204':
          description: |
            Indicates a successful operation.
            The response does not have a body.
        '400':
          description: |
            Indicates a failure to revoke the consent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /payment-log:
    get:
      tags:
        - payments
      summary: Retrieve a log of Payments by Consent ID
      operationId: getAuditConsentsByConsentIdw
      description: >
        Retrieve the payments made under a consent, using the `consentId` value.

        The response is **paginated**, using the same `page` and `pageSize` parameters as the consent list operations on
        this API. `pageSize` defaults to 25. The response `meta` reports `pageNumber`, `pageSize`, `totalPages` and
        `totalRecords`, so a caller reads `totalPages` to know when to stop rather than assuming a short page is the
        last one.

        Callers written against v2.1 received every payment for the consent in a single response. From v2.2 they
        receive one page, and MUST follow `page` to retrieve the rest.
      parameters:
        - name: consentId
          in: query
          schema:
            type: string
          required: true
          description: |
            Identifier for the consent
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/pageSize'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - consentId
                        - paymentType
                        - paymentId
                        - idempotencyKey
                        - paymentResponse
                        - tpp
                        - accountId
                        - psuIdentifiers
                        - interactionId
                        - authorizationCode
                        - requestBody
                        - requestHeaders
                      properties:
                        consentId:
                          type: string
                          description: |
                            A consent identifier generated by the TPP for the consent.
                        paymentType:
                          type: string
                          description: |
                            The underlying payment type

                            For example,

                              - cbuae-payment (Single Instant Payment, Multi Payment - Fixed and Variable Recurring Payment, Future Dated Payment etc)
                              - cbuae-file-payment
                        paymentId:
                          type: string
                        idempotencyKey:
                          type: string
                        paymentResponse:
                          type: object
                          description: >
                            The payment response as received from the financial institution as a result of a
                            `make-payment` call
                          properties:
                            id:
                              type: string
                              description: |
                                A unique id for the payment in uuid-v4 format.
                            status:
                              type: string
                              description: |
                                The current status of the payment
                              enum:
                                - Pending
                                - AcceptedSettlementCompleted
                                - AcceptedCreditSettlementCompleted
                                - AcceptedWithoutPosting
                                - Rejected
                            creationDateTime:
                              type: string
                              format: date-time
                              description: |
                                An ISO date-time representing when the consent was created
                            statusUpdateDateTime:
                              type: string
                              format: date-time
                              description: |
                                An ISO date-time representing when the consent status was last updated
                            OpenFinanceBilling:
                              $ref: '#/components/schemas/AEServiceInitiationOpenFinancePaymentBilling'
                            paymentRail:
                              $ref: '#/components/schemas/AEPaymentRail'
                            rejectReasonCode:
                              $ref: '#/components/schemas/CbuaePaymentLogRejectReasonCode'
                        signedResponse:
                          type: string
                        tpp:
                          $ref: '#/components/schemas/tpp'
                        accountId:
                          description: The account identifier
                          type: string
                        psuIdentifiers:
                          $ref: '#/components/schemas/psuIdentifiers'
                        interactionId:
                          $ref: '#/components/schemas/apiLogInteractionId'
                        authorizationCode:
                          type: object
                          properties:
                            paymentId:
                              type: string
                            accessTokenHash:
                              type: string
                            currentDateTime:
                              type: string
                              format: date-time
                        requestBody:
                          $ref: '#/components/schemas/AEPaymentAndFilePaymentRequest'
                        signedRequestBody:
                          type: string
                        requestHeaders:
                          type: object
                          description: |
                            The entire set of Http request headers that was received by Ozone from the TPP
                  meta:
                    $ref: '#/components/schemas/paginationMetadata'
        '400':
          description: |
            Indicates a failure to retrieve the payments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /payment-log/{id}:
    patch:
      tags:
        - payments
      summary: Patches one or more fields in a payment-log based on id .
      description: |
        This operation allows an  modify fields within a payment's `paymentResponse`.
        This is used by the financial institutions to update the status of a payment
      operationId: patchPymentlog
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CbuaePatchPaymentRecordBody'
      responses:
        '204':
          description: |
            Indicates a successful operation.
            The response does not have a body.
        '400':
          description: The request patch operation failed due to an error at the Consent Manager API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /account-opening-log/{logId}:
    patch:
      operationId: UpdateAccountOpeningLog
      tags:
        - resource-log
      summary: Patch the status of an account opening request.
      description: >-
        Patch the status of an account opening request. Account opening requests are not associated with a consent, but
        always use an `accountId` value, which is the value of `logId`.
      parameters:
        - $ref: '#/components/parameters/logId'
      requestBody:
        description: Properties of the patch
        content:
          application/json:
            schema:
              type: object
              required:
                - OpeningStatus
              properties:
                OpeningStatus:
                  type: string
                  enum:
                    - Pending
                    - AwaitingUserInput
                    - AwaitingLFIProcesses
                    - Completed
                    - Rejected
                  description: >
                    The status of the opening of the account, based on progress at the LFI.

                    The values are defined as follows:

                    * Pending: This is the initial state for the resource. The account is pending opening, based on 
                      LFI processes being completed.

                    * AwaitingUserInput: The account opening process has started and input is required from the 
                      User to progress the application.

                    * AwaitingLFIProcesses: The account opening process has started and is awaiting the completion 
                      of LFI processes.

                    * Completed: The account opening request has been completed by the LFI and the Account is available
                      for use by the User.

                    * Rejected: The account opening has been rejected by the LFI due to insufficient data or failure
                      to validate the User data.

                AdditionalStatusInformation:
                  description: Additional information provided to the TPP by the LFI that qualifies the status, 
                    including next steps such as where further information is required, or reasons for rejection.
                  type: string
                  minLength: 1
                  maxLength: 1000
      responses:
        '204':
          $ref: '#/components/responses/noContentResponse'
        '400':
          description: Failed to patch the log
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
        default:
          description: Default error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /fx-quote-log/{logId}:
    patch:
      operationId: UpdateFxQuoteLog
      tags:
        - resource-log
      summary: Patch the status of an FX quote.
      description: >-
        Patch the status of an FX quote request. FX quote requests are not associated with a consent, but always use an
        `FxQuoteId` value, which is the value of `logId`.
      parameters:
        - $ref: '#/components/parameters/logId'
      requestBody:
        description: Properties of the patch. `Trade` and `Commission` are only included when the status is `Completed`
        content:
          application/json:
            schema:
              oneOf:
                - title: Intermediate Status
                  description: The status at either an intermediate state or terminal state that is not `Completed`.
                  type: object
                  required:
                    - QuoteStatus
                  properties:
                    QuoteStatus:
                      description: The quote status, based on states that are not `Completed`
                      type: string
                      enum:
                        - AccountOpened
                        - Actioned
                        - Available
                        - Cancelled
                        - Expired
                        - Funded
                        - Rejected
                    AdditionalStatusInformation:
                      description: Additional information provided to the TPP by the LFI that provides qualifies the 
                        status, including next steps such as where further information is required,
                        or reasons for rejection.
                      type: string
                      minLength: 1
                      maxLength: 1000
                - title: Completed Status
                  description: >-
                    Properties of the completed trade. Trade amounts, charges, and commission at terminal state must be
                    confirmed.
                  type: object
                  required:
                    - QuoteStatus
                    - Trade
                    - Commission
                  properties:
                    QuoteStatus:
                      description: The quote status. Only `Completed` is valid.
                      type: string
                      enum:
                        - Completed
                    Trade:
                      description: Quote properties at completion.
                      required:
                        - SellAmount
                        - BuyAmount
                      type: object
                      properties:
                        SellAmount:
                          description: The amount of the currency being sold.
                          type: object
                          required:
                            - Currency
                            - Amount
                          properties:
                            Currency:
                              $ref: '#/components/schemas/AEActiveOrHistoricCurrencyCode'
                            Amount:
                              $ref: '#/components/schemas/AEActiveOrHistoricAmount'
                        BuyAmount:
                          description: The amount of the currency being bought.
                          type: object
                          required:
                            - Currency
                            - Amount
                          properties:
                            Currency:
                              $ref: '#/components/schemas/AEActiveOrHistoricCurrencyCode'
                            Amount:
                              $ref: '#/components/schemas/AEActiveOrHistoricAmount'
                        Charges:
                          description: The charges associated with the request currency exchange.
                          type: array
                          items:
                            type: object
                            required:
                              - ChargeBearer
                              - Type
                              - Amount
                            properties:
                              ChargeBearer:
                                $ref: '#/components/schemas/AEChargeBearerType1Code'
                              Type:
                                $ref: '#/components/schemas/AEExternalPaymentChargeTypeCode'
                              Amount:
                                $ref: '#/components/schemas/AEActiveCurrencyAmount'
                              Description:
                                type: string
                                minLength: 1
                                maxLength: 140
                                description: >-
                                  Description of the charge, for display to the User to help explain why the charge is
                                  levied.
                    Commission:
                      description: Details of commission.
                      type: object
                      properties:
                        CommissionAmount:
                          allOf:
                            - $ref: '#/components/schemas/AEActiveCurrencyAmount'
                          description: The total monetary value of the commission paid to the TPP.
                      required:
                        - CommissionAmount
      responses:
        '204':
          $ref: '#/components/responses/noContentResponse'
        '400':
          description: Failed to patch the log
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /insurance-quote-log/{logId}:
    patch:
      operationId: UpdateInsuranceQuoteLog
      tags:
        - resource-log
      summary: Patch the status of an insurance quote.
      description: >-
        Patch the status of an Insurance quote request. Insurance quote requests are not associated with a consent, but
        always use an `QuoteId` value, which is the value of `logId`.
      parameters:
        - $ref: '#/components/parameters/logId'
      requestBody:
        description: Properties of the patch. `Premium` and `Commission` are only included when the status is
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/AEInsurance.AEInsuranceQuoteEventAvailableStatus'
                - $ref: '#/components/schemas/AEInsurance.AEInsuranceQuoteEventTerminalStatus'
                - $ref: '#/components/schemas/AEInsurance.AEInsuranceQuoteEventPendingCompletionStatus'
                - $ref: '#/components/schemas/AEInsurance.AEInsuranceQuoteEventCompletedStatus'
      responses:
        '204':
          $ref: '#/components/responses/noContentResponse'
        '400':
          description: Failed to patch the log
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error400Response'
  /hello-mtls:
    get:
      operationId: helloMtls
      tags:
        - health-check
      summary: check connectivity including mtls and provides information about the client cert that the server received
      description: >-
        This health check is used to check that the end-to-end network connectivity is working as expected including
        mutual tls. This health check endpoint assists in debugging mutual tls client issues. The health check returns
        information about the client certificate and the issuer of the client certificate that the server received.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckCertResponse'
components:
  schemas:
    standardErrorCodes:
      description: Standardized error codes used across open finance components
      type: string
      enum:
        - AccessToken.InvalidScope
        - Body.InvalidFormat
        - Consent.AccountTemporarilyBlocked
        - Consent.BusinessRuleViolation
        - Consent.FailsControlParameters
        - Consent.Invalid
        - Consent.InvalidUserIdentifier
        - Consent.PermanentAccountAccessFailure
        - Consent.TransientAccountAccessFailure
        - Event.UnexpectedEvent
        - JWE.DecryptionError
        - JWE.InvalidHeader
        - JWS.InvalidClaim
        - JWS.InvalidHeader
        - JWS.InvalidSignature
        - JWS.Malformed
        - Resource.InvalidFormat
    standardErrorCodePattern:
      description: >-
        Namespaced error codes, indicating the source of the error code prior to the period, and the error code itself
        after the period e.g. `AANI.AM04` indicates insufficient funds.
      type: string
      pattern: ^[A-Za-z]+\.[A-Za-z0-9]+$
    errorReasonCodes:
      description: >-
        Error code identifying the problem that occurred. This may either be one of the prescribed error code(s), a 
        code that observes the namespaced pattern, or a custom error codes specific to the API Hub.
      anyOf:
        - $ref: '#/components/schemas/standardErrorCodes'
        - $ref: '#/components/schemas/standardErrorCodePattern'
        - type: string
    error400Response:
      type: object
      required:
        - errorCode
        - errorMessage
      properties:
        errorCode:
          $ref: '#/components/schemas/errorReasonCodes'
        errorMessage:
          type: string
          description: Message describing what problem has occurred
    meta:
      type: object
      additionalProperties: false
    apiLogInteractionId:
      type: object
      properties:
        ozoneInteractionId:
          type: string
        clientInteractionId:
          type: string
      additionalProperties: false
      required:
        - ozoneInteractionId
    tpp:
      description: >-
        The TPP record as held by Ozone. If Ozone TPP Connect has been integrated into a directory, the
        `directoryRecord` provides the TPP's directory record as held by Ozone in base 64 encoded format.
      type: object
      required:
        - clientId
        - orgId
        - softwareStatementId
        - tppId
        - tppName
        - decodedSsa
      properties:
        clientId:
          description: The client identifier for the TPP as issued by the Trust Framework
          type: string
          pattern: ^.*[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
        tppId:
          description: The identifier used by the API Hub to uniquely identify the TPP
          type: string
        tppName:
          description: The TPP name recorded in the Trust Framework
          type: string
        obieTppId:
          description: The UK market TPP identifier. This property is not used for CBUAE and is therefore marked as deprecated.
          type: string
          deprecated: true
        softwareStatementId:
          description: The software statement identifier for the Client.
          type: string
        obieSoftwareStatementId:
          description: >-
            The UK market software statement identifier. This property is not used for CBUAE and is therefore marked as
            deprecated.
          type: string
          deprecated: true
        obieSoftwareStatementName:
          description: >-
            The UK market software statement name. This property is not used for CBUAE and is therefore marked as
            deprecated.
          type: string
          deprecated: true
        directoryRecord:
          type: string
          description: >-
            The latest copy of the TPP directory record retrieve from the CBUAE Trust Framework directory, encoded as a
            Base 64 string
          format: base64
        ssa:
          description: >-
            The encoded Software Statement Assertion. This property is not used for CBUAE and is therefore marked as
            deprecated.
          type: string
          deprecated: true
        decodedSsa:
          $ref: '#/components/schemas/softwareStatementProperties'
        orgId:
          description: The organization identifier for the TPP
          type: string
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
    softwareStatementProperties:
      description: |
        The decoded software statement retrieved from the Trust Framework that provides
        the properties of the Client.

        Please note:

          - The JSON payload will contain other properties in addition to those listed
            here. The properties listed here are considered most relevant for activities
            such as TPP logo retrieval and JWS verification.
          - The content reflects elements of discovery metadata, which in generally
            defined as a file rather than an API. Providing constraints such as
            `minLength` and `maxLength` is impractical in this context

        The full software statement record is also available in the Trust Framework.
        Please also refer the Registration Framework page in the CBUAE standards for
        additional guidance on these properties.
      type: object
      properties:
        redirect_uris:
          description: The redirect URIs registered by the TPP at the Trust Framework
          type: array
          items:
            type: string
        client_name:
          description: Name of the Client to be presented to the End-User.
          type: string
        client_uri:
          description: URL of the home page of the Client.
          type: string
        logo_uri:
          description: URL of the Client logo.
          type: string
        jwks_uri:
          description: URL of the Client JSON Web Key Set (JWKS) at the Trust Framework.
          type: string
        client_id:
          description: Unique Client Identifier.
          type: string
        roles:
          description: The roles under which the organization is registered at the Trust Framework.
          type: array
          items:
            type: string
        sector_identifier_uri:
          description: >-
            URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. Allows redirect URI
            values to be grouped, easing registration management.
          type: string
        application_type:
          description: Client application type.
          type: string
        organisation_id:
          description: Organization identifier for organization that owns the Client.
          type: string
    psuIdentifiers:
      type: object
      description: |
        The PSU that is associated with this consent.

        The `PSUIdentifiers` object may have artitrary custom fields that an financial institution may use to
        identify the PSU.

        However, all `PSUIdentifiers` must have a mandatory `userId` field that provides a unique
        user id for the PSU.

        The consent is initially created without a PSU identified.

        The value must be specified once the consent is authorised.
      properties:
        userId:
          type: string
      required:
        - userId
    newConsent:
      type: object
      properties:
        id:
          type: string
          description: |
            A unique identifier for the consent in uuid-v4 format.
        parId:
          type: string
          description: |
            A unique identifier for the PAR request that created this consent.
            The value matches the value of the request_uri returned by the post call to the PAR endpoint.
        rarType:
          type: string
          pattern: ^urn:openfinanceuae:(?:account-access|insurance|service-initiation)-consent:v[0-9]+\.[0-9]+$
          description: |
            The authorization detail type of the RAR request that resulted in this consent.
            This value matches the Type of the authorization_details element of the RAR request.
            Its value will be one of the authorization_details_types_supported on the well-known endpoint.
        standardVersion:
          type: string
          description: >
            The standardVersion field specifies the standardized version of an API set. An API set refers to a group of
            APIs designed to deliver a specific functionality (e.g., accounts, payments, insurance). Example values:
            'v1.0', 'v2.1', or 'insurance:v1.1'."
        consentGroupId:
          type: string
          description: |
            A unique identifier for the consent group in uuid-v4 format.
            The consent group id is used to group together consents that are related to each other.
        requestUrl:
          type: string
          format: uri
          description: |
            The request url of Http request that was received by Ozone from the TPP
        consentType:
          type: string
          description: >
            The type of the consent that is being created.


            Each financial institution's instance may support a different set of consent types

            The Consent Manager supports the creation of consents of different consent types depending on the standards
            supported.


            - cbuae-account-access-consents

            - cbuae-service-initiation-consents

            - cbuae-insurance-consents
        status:
          $ref: '#/components/schemas/AEConsentStatus'
        request:
          $ref: '#/components/schemas/AuthorizationDetails'
        requestHeaders:
          type: object
          description: |
            The entire set of Http request headers that was received by Ozone from the TPP
        consentBody:
          $ref: '#/components/schemas/cbuaeConsentBody'
        interactionId:
          type: string
          description: The Heimdall `interactionId` that this consent is associated with.
        tpp:
          $ref: '#/components/schemas/tpp'
        ozoneSupplementaryInformation:
          type: object
        updatedAt:
          description: When the consent was last updated, as an epoch-based date/time
          type: number
      required:
        - id
        - consentType
        - consentBody
        - request
        - requestHeaders
        - tpp
    cbuaeConsentBody:
      type: object
      description: |
        An object representing the current state of the consent.
        This includes the entire request, augmented by additional computed properties
        (e.g. ids, charges etc)
      oneOf:
        - $ref: '#/components/schemas/AEAccountAccessConsentBody'
        - $ref: '#/components/schemas/AEInsuranceConsentBody'
        - $ref: '#/components/schemas/AEPaymentConsentResponse'

    ConsentManager.AEUpdatedConsentProperties:
      type: object
      properties:
        psuIdentifiers:
          $ref: '#/components/schemas/psuIdentifiers'
        accountIds:
          $ref: '#/components/schemas/ConsentManager.AccountIdentifiers'
        insurancePolicyIds:
          $ref: '#/components/schemas/insurancePolicyIds'
        supplementaryInformation:
          $ref: '#/components/schemas/ConsentManager.SupplementaryInformation'
        paymentContext:
          type: object
        ConnectToken:
          type: string
          description: >-
            A bearer token that will be sent as the `Authorization` header for calls to Ozone Connect made under this
            consent.
        consentUsage:
          $ref: '#/components/schemas/AEConsentUsage'

    ConsentManager.AEConsentUpdateProperties:
      description: Update one-or-more properties of a given Consent based on the `consentId` value. Use the correct 
        properties for the type of consent i.e. Bank Data Sharing, Bank Service Initiation, or Insurance Data Sharing.
      anyOf:
      - $ref: '#/components/schemas/ConsentManager.AEBankDataSharingConsentUpdateProperties'
      - $ref: '#/components/schemas/ConsentManager.AEBankServiceInitiationConsentUpdateProperties'
      - $ref: '#/components/schemas/ConsentManager.AEInsuranceDataSharingConsentUpdateProperties'

    ConsentManager.AccountIdentifiers:
      description: >-
        An array of Account Identifier values associated with the Consent, which must be populated once consent has 
        been authorised.

        For Bank Service Initiation, the array must always have one element, which is the debtor account from which the 
        payment will be made

        For Bank Data Sharing requests, the array may contain multiple values, representing each of the payment accounts
        for which an data will be provide.

        Insurance Data Sharing does not require `accountIds` to be patched, and will instead use `insurancePolicyIds`. 
        `accountIds` will, however, be populated with the value of `insurancePolicyIds` by a trigger in the Consent 
        Manager, which ensures a consistent set of identifiers are available across different consent types.
      type: array
      minItems: 1
      items:
        type: string

    ConsentManager.AEAuthorizationChannel:
      description: LFI channel on which the User authorized the Consent.
      type: string
      enum:
        - App
        - Web

    ConsentManager.SupplementaryInformation:
      description: Contains additional information at the discretion of the financial institution.
      type: object

    ConsentManager.AEBankDataSharingConsentUpdateProperties:
      title: Bank Data Sharing Consent Update
      description: Properties that can be patched for a Bank Data Sharing Consent.
      type: object
      required:
      - authorizationChannel
      additionalProperties: false
      properties:
        psuIdentifiers:
          $ref: '#/components/schemas/psuIdentifiers'
        accountIds:
          $ref: '#/components/schemas/ConsentManager.AccountIdentifiers'
        supplementaryInformation:
          $ref: '#/components/schemas/ConsentManager.SupplementaryInformation'
        status:
          $ref: '#/components/schemas/cbuaePatchableConsentStatus'
        consentBody.Data.Status:
          $ref: '#/components/schemas/cbuaePatchableConsentStatus'
        consentBody.Data.RevokedBy:
          $ref: '#/components/schemas/AERevokedBy'
        authorizationChannel:
          $ref: '#/components/schemas/ConsentManager.AEAuthorizationChannel'
        consentBody.Data.OpenFinanceBilling:
          $ref: '#/components/schemas/ConsentManager.AEOpenFinanceBillingUpdateProperties'
        consentUsage:
          $ref: '#/components/schemas/AEConsentUsage'

    ConsentManager.AEBankServiceInitiationConsentUpdateProperties:
      title: Bank Service Initiation Consent Update
      description: Properties that can be patched for a Bank Service Initiation Consent.
      type: object
      required:
      - authorizationChannel
      additionalProperties: false
      properties:
        psuIdentifiers:
          $ref: '#/components/schemas/psuIdentifiers'
        accountIds:
          allOf:
          - $ref: '#/components/schemas/ConsentManager.AccountIdentifiers'
          - type: array
            maxItems: 1
            items:
              type: string
        supplementaryInformation:
          $ref: '#/components/schemas/ConsentManager.SupplementaryInformation'
        status:
          $ref: '#/components/schemas/cbuaePatchableConsentStatus'
        consentBody.Data.Status:
          $ref: '#/components/schemas/cbuaePatchableConsentStatus'
        consentBody.Data.ExchangeRate:
          $ref: '#/components/schemas/AEExchangeRateInformation'
        consentBody.Data.Charges:
          $ref: '#/components/schemas/AECharges'
        consentBody.Data.RevokedBy:
          $ref: '#/components/schemas/AERevokedBy'
        consentBody.Meta.MultipleAuthorizers:
          $ref: '#/components/schemas/AEMetaMultiAuthorization'
        authorizationChannel:
          $ref: '#/components/schemas/ConsentManager.AEAuthorizationChannel'
        ConnectToken:
          type: string
          description: A bearer token that will be sent as the `Authorization` header for Bank Service Initiation 
            operations invoked at Ozone Connect. The API Hub for a given LFI must be configured for sending this token.
        consentBody.Data.OpenFinanceBilling:
          $ref: '#/components/schemas/ConsentManager.AEOpenFinanceBillingUpdateProperties'
        consentUsage:
          $ref: '#/components/schemas/AEConsentUsage'

    ConsentManager.AEInsuranceDataSharingConsentUpdateProperties:
      title: Insurance Data Sharing Consent Update
      description: Properties that can be patched for an Insurance Data Sharing Consent.
      type: object
      required:
      - authorizationChannel
      additionalProperties: false
      properties:
        psuIdentifiers:
          $ref: '#/components/schemas/psuIdentifiers'
        insurancePolicyIds:
          $ref: '#/components/schemas/insurancePolicyIds'
        supplementaryInformation:
          $ref: '#/components/schemas/ConsentManager.SupplementaryInformation'
        status:
          $ref: '#/components/schemas/cbuaePatchableConsentStatus'
        consentBody.Data.Status:
          $ref: '#/components/schemas/cbuaePatchableConsentStatus'
        consentBody.Data.RevokedBy:
          $ref: '#/components/schemas/AERevokedBy'
        authorizationChannel:
          $ref: '#/components/schemas/ConsentManager.AEAuthorizationChannel'
        consentBody.Data.OpenFinanceBilling:
          $ref: '#/components/schemas/ConsentManager.AEOpenFinanceBillingUpdateProperties'
        consentUsage:
          $ref: '#/components/schemas/AEConsentUsage'

    AEServiceInitiationOpenFinanceBilling:
      type: object
      properties:
        IsLargeCorporate:
          type: boolean
          description: Customer has more than 100 million AED turnover
      description: Billing parameters specified by the LFI
      additionalProperties: false

    ConsentManager.AEOpenFinanceBillingUpdateProperties:
      type: object
      required:
      - IsLargeCorporate
      properties:
        IsLargeCorporate:
          type: boolean
          description: Customer has more than 100 million AED turnover
      description: Billing parameters specified by the LFI
      additionalProperties: false

    cbuaePatchableConsentStatus:
      description: |
        Specifies the statuses that a consent can be patched to by an LFI.
      type: string
      enum:
        - Authorized
        - Rejected
        - Revoked
        - Expired
        - Consumed
        - Suspended
    CbuaePaymentLogRejectReasonCode:
      description: >
        A list of reject reason codes provided by the LFI. 

        Where this list is patched repeatedly the LFI **MUST** append to the existing list **BEFORE** calling the patch 
        operation, to ensure all values are maintained, unless the reject reason was patched in error and the existing 
        value is being replaced.
      type: array
      minItems: 1
      items:
        description: >-
          The reason for rejection of a given payment request as detected by the LFI. The `Code` and `Message`
          properties are transposed EXACTLY in event notifications sent to the TPP, so the `Message` value MUST be
          sanitized accordingly.
        type: object
        required:
          - code
          - message
        properties:
          code:
            description: >-
              Error code that follows the namespaced pattern standardised for the Open Finance Framework. AANI reason
              codes should be used as standard, and be applied in scenarios where payment instructions are rejected at
              the LFI, prior to submission to AANI. LFI specific codes can be provided as a fallback.
            anyOf:
              - type: string
                pattern: ^(AANI|FTS|LFI)\.[A-Za-z0-9]+$
              - $ref: '#/components/schemas/standardErrorCodePattern'
            example: AANI.AM04
          message:
            description: Error message describing the rejection reason
            type: string
            minLength: 1
            maxLength: 500
            example: Payment request cannot be executed as insufficient funds at debtor account.
      additionalProperties: false
    CbuaePatchPaymentRecordBody:
      type: object
      description: |
        Describes the fields to be patched and their corresponding values.
      required:
        - paymentResponse.status
      additionalProperties: false
      properties:
        paymentResponse.status:
          type: string
          description: >-
            The current status of the payment, mapped to the payment state model defined in the Open Finance Framework
            standards.
          enum:
            - Pending
            - AcceptedSettlementCompleted
            - AcceptedCreditSettlementCompleted
            - AcceptedWithoutPosting
            - Rejected
        paymentResponse.OpenFinanceBilling:
          $ref: '#/components/schemas/AEServiceInitiationOpenFinancePaymentBillingPatch'
        paymentResponse.paymentTransactionId:
          type: string
          description: |
            This is an end to end TransactionId that is generated by the
            underlying payment rails when it is sent from an Originating LFI to a
            Receiving LFI:

            - For Aani transactions, this is the Aani-generated transaction identifier, and not the same value as the 
              `transactionId` in the Bank Data Sharing API.

            - The `paymentTransactionId` must be populated if the payment is processed by the LFI.
          minLength: 1
          maxLength: 40
        paymentResponse.paymentRail:
          $ref: '#/components/schemas/AEPaymentRail'
        paymentResponse.rejectReasonCode:
          $ref: '#/components/schemas/CbuaePaymentLogRejectReasonCode'
    AEPaymentRail:
      type: string
      description: >
        The payment rail over which the LFI settled the payment.

        The value records how the payment was **executed**, not how it was requested. Where an LFI's routing rules
        settle an instant payment on another rail, this field reports the rail actually used.

        * `AANI`: Settled over AANI, the UAE instant payment platform.

        * `FTS`: Settled over UAEFTS, the CBUAE funds transfer system.

        * `LFI`: Settled internally by the LFI. The debtor and creditor accounts are both held at the LFI, so the
        payment was booked on the LFI's own ledger and did not reach an external rail.

        The LFI MUST populate this field when patching `paymentResponse.status` to a terminal success status —
        `AcceptedWithoutPosting`, `AcceptedSettlementCompleted`, or `AcceptedCreditSettlementCompleted`. It MAY be sent
        alongside `Pending`, and MAY be omitted on `Rejected`, where the payment may have been rejected before a rail
        was selected.

        Where a payment was rejected by a rail, this value MUST agree with the namespace of the corresponding
        `paymentResponse.rejectReasonCode` entry: an `AANI.*` reject code MUST be accompanied by `AANI`, and an `FTS.*`
        code by `FTS`. An `LFI.*` reject code indicates rejection at the LFI prior to rail submission, and carries no
        such constraint.

        This field and `paymentResponse.paymentTransactionId` are a pair: the rail names the system that generated the
        transaction identifier.

        A payment settles over exactly one rail. This holds for file payments as well as single payments — a file
        payment is settled in its entirety over one rail, so a single value describes the whole record.
      enum:
        - AANI
        - FTS
        - LFI
      example: AANI
    AEServiceInitiationOpenFinancePaymentBillingPatch:
      type: object
      properties:
        NumberOfSuccessfulTransactions:
          type: integer
          description: |
            Number of individual transactions successfully executed by the LFI.
            This is returned by the LFI after the file is fully processed.
      additionalProperties: false
    AEServiceInitiationOpenFinancePaymentBilling:
      type: object
      properties:
        Type:
          type: string
          enum:
            - Collection
            - LargeValueCollection
            - PushP2P
            - PullP2P
            - Me2Me
          description: The type payment for billing
        MerchantId:
          description: MerchantId
          type: string
          minLength: 8
          maxLength: 20
        NumberOfSuccessfulTransactions:
          type: integer
          description: |
            Number of individual transactions successfully executed by the LFI.
            This is returned by the LFI after the file is fully processed.
      additionalProperties: false
    AEInsuranceConsentBody:
      type: object
      required:
        - Data
      properties:
        Data:
          type: object
          required:
            - ConsentId
            - OpenFinanceBilling
            - Permissions
            - ExpirationDateTime
          properties:
            ConsentId:
              $ref: '#/components/schemas/AEConsentId'
            Permissions:
              type: array
              items:
                $ref: '#/components/schemas/AEInsuranceConsentPermissions'
              minItems: 1
            OpenFinanceBilling:
              $ref: '#/components/schemas/AEInsuranceOpenFinanceBilling'
          allOf:
            - $ref: '#/components/schemas/AEInsuranceAuthorizationDetailProperties'
          additionalProperties: false
        Meta:
          type: object
          properties:
            MultipleAuthorizers:
              $ref: '#/components/schemas/AEMetaMultiAuthorization'
        Subscription:
          type: object
          required:
            - Webhook
          properties:
            Webhook:
              $ref: '#/components/schemas/Webhook'
    AEInsuranceOpenFinanceBillingPost:
      type: object
      required:
        - Purpose
      properties:
        Purpose:
          description: Purpose of data sharing request
          type: string
          enum:
            - AccountAggregation
            - RiskAssessment
            - PremiumHistory
            - ClaimHistory
            - Onboarding
            - Verification
            - QuoteComparison
            - FinancialAdvice
      description: Billing parameters specified by the TPP
      additionalProperties: false
    AEInsuranceOpenFinanceBilling:
      type: object
      required:
        - Purpose
      properties:
        IsLargeCorporate:
          type: boolean
          description: Customer has more than 100 million AED turnover
        Purpose:
          description: Purpose of data sharing request
          type: string
          enum:
            - AccountAggregation
            - RiskAssessment
            - PremiumHistory
            - ClaimHistory
            - Onboarding
            - Verification
            - QuoteComparison
            - FinancialAdvice
      description: Billing parameters specified by the TPP
      additionalProperties: false

    AEBankDataSharingRichAuthorizationRequests.AEBankDataSharingFromDate:
      type: string
      format: date
      description: >-
        Specified start date for the transaction or statement query period.


        If this is not populated, the start date will be open ended, and data will be returned from the earliest
        available transaction or statement.


        All dates in the JSON payloads are represented in ISO 8601 date format.  For example: 2025-01-01

    AEBankDataSharingRichAuthorizationRequests.AEBankDataSharingToDate:
      type: string
      format: date
      description: >-
        Specified end date for the transaction or statement query period.


        If this is not populated, the end date will be open ended, and data will be returned to the latest available
        transaction or the last statement generated.


        All dates in the JSON payloads are represented in ISO 8601 date format.  For example: 2025-12-31    


    AEAccountAccessConsentBody:
      type: object
      required:
        - Data
      properties:
        Data:
          type: object
          required:
            - ConsentId
            - OpenFinanceBilling
            - Permissions
            - ExpirationDateTime
          properties:
            ConsentId:
              $ref: '#/components/schemas/AEConsentId'
            Permissions:
              type: array
              items:
                $ref: '#/components/schemas/AEAccountAccessConsentPermissionCodes'
              minItems: 1
            OpenFinanceBilling:
              $ref: '#/components/schemas/AEAccountAccessOpenFinanceBilling'
          allOf:
            - $ref: '#/components/schemas/AEAccountAccessAuthorizationDetailProperties'
          additionalProperties: false
        Meta:
          type: object
          properties:
            MultipleAuthorizers:
              $ref: '#/components/schemas/AEMetaMultiAuthorization'
        Subscription:
          type: object
          required:
            - Webhook
          properties:
            Webhook:
              $ref: '#/components/schemas/Webhook'
    AEAccountAccessOpenFinanceBilling:
      type: object
      required:
        - UserType
        - Purpose
      properties:
        IsLargeCorporate:
          type: boolean
          description: Customer has more than 100 million AED turnover
        UserType:
          description: Type of Customer
          type: string
          enum:
            - Retail
            - SME
            - Corporate
        Purpose:
          description: Purpose of data sharing request
          type: string
          enum:
            - AccountAggregation
            - RiskAssessment
            - TaxFiling
            - Onboarding
            - Verification
            - QuoteComparison
            - BudgetingAnalysis
            - FinancialAdvice
            - AuditReconciliation
      description: Billing parameters specified by the TPP
      additionalProperties: false
    AEAccountAccessOpenFinanceBillingPost:
      type: object
      required:
        - UserType
        - Purpose
      properties:
        UserType:
          description: Type of Customer
          type: string
          enum:
            - Retail
            - SME
            - Corporate
        Purpose:
          description: Purpose of data sharing request
          type: string
          enum:
            - AccountAggregation
            - RiskAssessment
            - TaxFiling
            - Onboarding
            - Verification
            - QuoteComparison
            - BudgetingAnalysis
            - FinancialAdvice
            - AuditReconciliation
      description: Billing parameters specified by the TPP
      additionalProperties: false
    AEAccountAccessAuthorizationDetailProperties:
      type: object
      properties:
        BaseConsentId:
          $ref: '#/components/schemas/AEBaseConsentId'
        ExpirationDateTime:
          type: string
          format: date-time
          description: |-
            Specified date and time the permissions will expire.
            All date-time fields in responses must include the timezone. An example is below:
            2017-04-05T10:43:07+00:00
        TransactionFromDateTime:
          type: string
          format: date-time
          description: |2-
                Specified start date and time for the transaction query period.

                If this is not populated, the start date will be open ended, and
                data will be returned from the earliest available
                transaction.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

                **DEPRECATED AT V2.1, REPLACED BY `FromDate`**
          deprecated: true
        TransactionToDateTime:
          type: string
          format: date-time
          description: |2-
                Specified end date and time for the transaction query period.

                If this is not populated, the end date will be open ended, and
                data will be returned to the latest available transaction.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

                **DEPRECATED AT V2.1, REPLACED BY `ToDate`**
          deprecated: true
        FromDate:
          $ref: '#/components/schemas/AEBankDataSharingRichAuthorizationRequests.AEBankDataSharingFromDate'
        ToDate:
          $ref: '#/components/schemas/AEBankDataSharingRichAuthorizationRequests.AEBankDataSharingToDate'
        AccountType:
          type: array
          items:
            $ref: '#/components/schemas/AEAccountTypeCode'
        AccountSubType:
          type: array
          items:
            $ref: '#/components/schemas/AEAccountSubTypeCode'
        OnBehalfOf:
          $ref: '#/components/schemas/AEOnBehalfOf'
        Status:
          $ref: '#/components/schemas/AEAccountAccessConsentStatus'
        RevokedBy:
          $ref: '#/components/schemas/AERevokedBy'
        CreationDateTime:
          $ref: '#/components/schemas/AECreationDateTime'
      additionalProperties: false
    AEInsuranceAuthorizationDetailProperties:
      type: object
      required:
        - ExpirationDateTime
      properties:
        BaseConsentId:
          $ref: '#/components/schemas/AEBaseConsentId'
        ExpirationDateTime:
          type: string
          format: date-time
          description: |-
            Specified date and time the permissions will expire.
            All date-time fields in responses must include the timezone. An example is below:
            2017-04-05T10:43:07+00:00
        OnBehalfOf:
          $ref: '#/components/schemas/AEOnBehalfOf'
        Status:
          $ref: '#/components/schemas/AEAccountAccessConsentStatus'
        RevokedBy:
          $ref: '#/components/schemas/AERevokedBy'
        CreationDateTime:
          $ref: '#/components/schemas/AECreationDateTime'
      additionalProperties: false
    AEAccountAccessConsentStatus:
      description: Consent Status is set to either Authorized ,Revoked ,Rejected or AwaitingAuthorization
      type: string
      enum:
        - Authorized
        - AwaitingAuthorization
        - Rejected
        - Revoked
        - Expired
        - Suspended
    AEAccountAccessConsentPermissionCodes:
      type: string
      enum:
        - ReadAccountsBasic
        - ReadAccountsDetail
        - ReadBalances
        - ReadBeneficiariesBasic
        - ReadBeneficiariesDetail
        - ReadFXTransactionsBasic
        - ReadFXTransactionsDetail
        - ReadTransactionsBasic
        - ReadTransactionsDetail
        - ReadProduct
        - ReadScheduledPaymentsBasic
        - ReadScheduledPaymentsDetail
        - ReadDirectDebits
        - ReadStandingOrdersBasic
        - ReadStandingOrdersDetail
        - ReadStatements
        - ReadConsents
        - ReadPartyUser
        - ReadPartyUserIdentity
        - ReadParty
        - ReadProductFinanceRates
      description: |-
        Specifies the permitted account access policy data types.
        This is a list of the data groups being consented by the User, and requested for authorization with the LFI.
    AEAccountSubTypeCode:
      type: string
      enum:
        - CurrentAccount
        - Savings
        - CreditCard
        - Mortgage
        - Finance
      description: Specifies the sub type of account (product family group)
    AEAccountTypeCode:
      type: string
      enum:
        - Retail
        - SME
        - Corporate
      description: Specifies the type of account (Retail, SME or Corporate).
    AEBaseConsentId:
      type: string
      minLength: 1
      maxLength: 128
      description: The original ConsentId assigned by the TPP
    AEConsentId:
      type: string
      minLength: 1
      maxLength: 128
      description: Unique identification assigned by the TPP to identify the consent resource.
    AEOnBehalfOf:
      type: object
      properties:
        TradingName:
          type: string
          description: Trading Name
        LegalName:
          type: string
          description: Legal Name
        IdentifierType:
          allOf:
            - $ref: '#/components/schemas/AEOnBehalfOfIdentifierType'
          description: Identifier Type
        Identifier:
          type: string
          description: Identifier
      additionalProperties: false
    AEOnBehalfOfIdentifierType:
      type: string
      enum:
        - Other
    Webhook:
      type: object
      description: |
        A Webhook Subscription Schema
      required:
        - Url
        - IsActive
      properties:
        Url:
          description: |
            The TPP Callback URL being registered with the LFI
          type: string
          example: https://api.tpp.com/webhook/callbackUrl
        IsActive:
          description: >
            The TPP specifying whether the LFI should send (IsActive true) or not send (IsActive false) Webhook
            Notifications to the TPP's Webhook URL
          type: boolean
          example: false
      additionalProperties: false
    AEInsuranceConsentPermissions:
      description: >-
        The permissions codes available to TPPs. Codes are qualified by insurance type which allows multiple sets of
        permissions to be selected in each consent.
      type: object
      required:
        - InsuranceType
        - Permissions
      properties:
        InsuranceType:
          type: string
          enum:
            - Employment
            - Health
            - Home
            - Life
            - Motor
            - Renters
            - Travel
          description: The insurance sector to which the permissions relate.
        Permissions:
          type: array
          items:
            $ref: '#/components/schemas/AEInsuranceConsentPermissionCodes'
          minItems: 1
          description: >-
            The data clusters requested by the TPP, based on agreement with the User. Data will be returned based on the
            selected permissions.
      additionalProperties: false
    AEInsuranceConsentPermissionCodes:
      type: string
      enum:
        - ReadInsurancePolicies
        - ReadCustomerBasic
        - ReadCustomerDetail
        - ReadCustomerPaymentDetails
        - ReadInsuranceProduct
        - ReadCustomerClaims
        - ReadInsurancePremium
    AERevokedBy:
      description: |
        Denotes the Identifier of the revocation.

        | Identifier| Description|
        |-----------|------------|
        | LFI | Revoked by LFI without User initiation|
        | TPP | Revoked by TPP without User initiation|
        | LFI.InitiatedByUser | Initiated by User via the LFI|
        | TPP.InitiatedByUser | Initiated by User via the TPP|
      type: string
      enum:
        - LFI
        - TPP
        - LFI.InitiatedByUser
        - TPP.InitiatedByUser
    AEMetaMultiAuthorization:
      type: object
      description: >
        Meta Data with Multi-Authorization relevant to the payload.

        For a payment, it represents any Authorizers within the financial institution domain that are involved in
        approving the payment request.
      properties:
        TotalRequired:
          description: |
            The total number of Authorizers required to process the request
          type: number
        Authorizations:
          type: array
          items:
            description: |
              Authorizer
            type: object
            properties:
              AuthorizerId:
                description: |
                  The Authorizer's Identifier
                type: string
              AuthorizerType:
                description: |
                  The Type of Authorizer. For example, Financial, Management, etc.
                type: string
              AuthorizationDate:
                description: >
                  The DateTime of when the Authorization occurred. All dates in the JSON payloads are represented in ISO
                  8601 date-time format. \nAll date-time fields in responses must include the timezone. An example is
                  below:\n2023-04-05T10:43:07+00:00
                type: string
                format: date-time
              AuthorizationStatus:
                description: |
                  The Status reflecting the Authorizer's final decision regarding the request
                type: string
                enum:
                  - Pending
                  - Approved
                  - Rejected
            additionalProperties: false
          additionalProperties: false
      additionalProperties: false
    AEReference:
      description: |
        A reason or reference in relation to a payment.
        Reason or reference for the beneficiary regarding the Payment
      type: string
      minLength: 1
      maxLength: 35
    AEPaymentConsentResponse:
      description: |
        Payment Consent Response Schema
      type: object
      additionalProperties: false
      required:
        - Data
      properties:
        Data:
          type: object
          additionalProperties: false
          required:
            - ConsentId
            - Status
            - ExpirationDateTime
          properties:
            ConsentId:
              $ref: '#/components/schemas/AEConsentId'
            BaseConsentId:
              $ref: '#/components/schemas/AEBaseConsentId'
            IsSingleAuthorization:
              description: |
                Specifies to the LFI that the consent authorization must be completed in a single authorization Step
                with the LFI
              type: boolean
            AuthorizationExpirationDateTime:
              $ref: '#/components/schemas/AEAuthorizationExpirationDateTime'
            Permissions:
              $ref: '#/components/schemas/AEConsentPermissions'
            AcceptedAuthorizationType:
              $ref: '#/components/schemas/AEAcceptedAuthorizationType'
            ExpirationDateTime:
              $ref: '#/components/schemas/AEConsentExpirationDateTime'
            Status:
              $ref: '#/components/schemas/AEConsentStatus'
            RevokedBy:
              $ref: '#/components/schemas/AERevokedBy'
            CreationDateTime:
              $ref: '#/components/schemas/AECreationDateTime'
            StatusUpdateDateTime:
              $ref: '#/components/schemas/AEStatusUpdateDateTime'
            Charges:
              $ref: '#/components/schemas/AECharges'
            ExchangeRate:
              $ref: '#/components/schemas/AEExchangeRateInformation'
            CurrencyRequest:
              $ref: '#/components/schemas/AECurrencyRequest'
            ControlParameters:
              $ref: '#/components/schemas/AEServiceInitiationConsentControlParameters'
            DebtorReference:
              $ref: '#/components/schemas/AEServiceInitiationDebtorReference'
            CreditorReference:
              $ref: '#/components/schemas/AEServiceInitiationCreditorReference'
            PaymentPurposeCode:
              $ref: '#/components/schemas/AEPaymentPurposeCode'
            SponsoredTPPInformation:
              $ref: '#/components/schemas/AESponsoredTPPInformation'
            PaymentConsumption:
              $ref: '#/components/schemas/AEPaymentConsumption'
            OpenFinanceBilling:
              $ref: '#/components/schemas/AEServiceInitiationOpenFinanceBilling'
        Subscription:
          $ref: '#/components/schemas/AEEventNotification'
        Meta:
          $ref: '#/components/schemas/AEMetaMultiAuthorization'
    AEEventNotification:
      type: object
      description: |
        A Webhook Subscription Schema
      required:
        - Webhook
      properties:
        Webhook:
          description: |
            A Webhook Schema
          type: object
          required:
            - Url
            - IsActive
          properties:
            Url:
              description: |
                The TPP Callback URL being registered with the LFI
              type: string
              example: https://api.tpp.com/webhook/callbackUrl
            IsActive:
              description: >
                The TPP specifying whether the LFI should send (IsActive true) or not send (IsActive false) Webhook
                Notifications to the TPP's Webhook URL
              type: boolean
              example: false
          additionalProperties: false
      additionalProperties: false
    AEAcceptedAuthorizationType:
      description: |
        Specifies to the LFI the type of consent authorization accepted by the TPP when staging the consent
        * Single - The consent should incur a single authorization Step with the LFI
        * Multi - The consent should incur a multi-authorization Step with the LFI
      type: string
      enum:
        - Single
        - Multi
    AEAuthorizationExpirationDateTime:
      description: |
        The date and time by which a Consent (in AwaitingAuthorization status) must be Authorized by the User.
      type: string
      format: date-time
    AEConsentPermissions:
      type: array
      description: |
        Specifies the permitted Account Access data types.
        This is a list of the data groups being consented by the User, and requested for authorization with the LFI.

        This allows a TPP to request a balance check permission.
      items:
        type: string
        enum:
          - ReadAccountsBasic
          - ReadAccountsDetail
          - ReadBalances
          - ReadRefundAccount
      minItems: 1
    AEFileNumberOfTransactions:
      type: integer
      description: |
        Number of individual transactions contained in the payment information group.
    AEControlSum:
      description: |
        Total of all individual amounts included in the group, irrespective of currencies.
      type: string
      pattern: ^\d{1,16}\.\d{2}$
      example: '100.00'
    AEFileType:
      type: string
      description: Specifies the payment file type
      minLength: 1
      maxLength: 40
    AEFileHash:
      type: string
      description: A base64 encoding of a SHA256 hash of the file to be uploaded.
      minLength: 1
      maxLength: 44
    AEConsentExpirationDateTime:
      description: |2-
            Specified date and time the consent will expire.

            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 :2023-04-05T10:43:07+00:00
      type: string
      format: date-time
    AEConsentStatus:
      description: |
        Specifies the status of a payment consent.

        | Consent Status| State Type| Description|
        |---------------|-----------|------|
        | AwaitingAuthorization | Pending | The consent is awaiting authorization.|
        | Authorized | In Use | The consent has been successfully authorized.|
        | Rejected | Terminal | The unauthorized consent has been rejected at the LFI.|
        | Revoked | Terminal | The consent has been revoked at the TPP or LFI.|
        | Expired | Terminal | The consent is now expired.|
        | Consumed | Terminal | The consented action(s) have either been completed successfully.|
        | Suspended | In Use | The consent has been suspended, pending further enquiries.|
      type: string
      enum:
        - AwaitingAuthorization
        - Authorized
        - Rejected
        - Revoked
        - Expired
        - Consumed
        - Suspended
    AECreationDateTime:
      description: >-
        Date and time at which the message was created. 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:

        2023-04-05T10:43:07+00:00
      type: string
      format: date-time
    AEStatusUpdateDateTime:
      description: >-
        Date and time at which the resource status was updated.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:

        2023-04-05T10:43:07+00:00
      type: string
      format: date-time
    AECharges:
      type: array
      items:
        type: object
        additionalProperties: false
        description: |
          Set of elements used to provide details of a charge for the payment initiation.
          * For Payments, these Charges are on the Debtor.
        required:
          - ChargeBearer
          - Type
          - Amount
        properties:
          ChargeBearer:
            $ref: '#/components/schemas/AEChargeBearerType1Code'
          Type:
            $ref: '#/components/schemas/AEExternalPaymentChargeTypeCode'
          Amount:
            $ref: '#/components/schemas/AEActiveCurrencyAmount'
    AEExchangeRateInformation:
      type: object
      additionalProperties: false
      required:
        - UnitCurrency
        - ExchangeRate
        - RateType
      description: Further detailed information on the exchange rate that has been used in the payment transaction.
      properties:
        UnitCurrency:
          description: >-
            Currency in which the rate of exchange is expressed in a currency exchange. In the example 1GBP = xxxCUR,
            the unit currency is GBP.
          type: string
          pattern: ^[A-Z]{3,3}$
        ExchangeRate:
          description: >-
            The factor used for conversion of an amount from one currency to another. This reflects the price at which
            one currency was bought with another currency.
          type: number
        RateType:
          description: Specifies the type used to complete the currency exchange.
          type: string
          enum:
            - Actual
            - Agreed
            - Indicative
        ContractIdentification:
          description: >-
            Unique and unambiguous reference to the foreign exchange contract agreed between the initiating
            party/creditor and the debtor agent.
          type: string
          minLength: 1
          maxLength: 256
        ExpirationDateTime:
          description: >-
            Specified date and time the exchange rate agreement will expire.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
    AECurrencyRequest:
      description: >
        The details of the non-local currency or FX request that has been agreed between the User and the TPP.

        The requested ChargeBearer and ExchangeRateInformation are included in this object may be overwritten by the LFI
        in the returned Consent object.
      type: object
      additionalProperties: false
      required:
        - CurrencyOfTransfer
      properties:
        InstructionPriority:
          description: >-
            Indicator of the urgency or order of importance that the instructing party would like the instructed party
            to apply to the processing of the instruction.
          type: string
          enum:
            - Normal
            - Urgent
        ExtendedPurpose:
          description: Specifies the purpose of an international payment.
          type: string
          minLength: 1
          maxLength: 140
        ChargeBearer:
          $ref: '#/components/schemas/AEChargeBearerType1Code'
        CurrencyOfTransfer:
          description: >-
            Specifies the currency of the to be transferred amount, which is different from the currency of the debtor's
            account.
          type: string
          pattern: ^[A-Z]{3,3}$
        DestinationCountryCode:
          description: >-
            Country in which Credit Account is domiciled. Code to identify a country, a dependency, or another area of
            particular geopolitical interest, on the basis of country names obtained from the United Nations (ISO 3166,
            Alpha-2 code).
          type: string
          pattern: '[A-Z]{2,2}'
        ExchangeRateInformation:
          type: object
          additionalProperties: false
          required:
            - UnitCurrency
            - RateType
          description: Provides details on the currency exchange rate and contract.
          properties:
            UnitCurrency:
              description: >-
                Currency in which the rate of exchange is expressed in a currency exchange. In the example 1GBP =
                xxxCUR, the unit currency is GBP.
              type: string
              pattern: ^[A-Z]{3,3}$
            ExchangeRate:
              description: >-
                The factor used for conversion of an amount from one currency to another. This reflects the price at
                which one currency was bought with another currency.
              type: number
            RateType:
              description: Specifies the type used to complete the currency exchange.
              type: string
              enum:
                - Actual
                - Agreed
                - Indicative
            ContractIdentification:
              description: >-
                Unique and unambiguous reference to the foreign exchange contract agreed between the initiating
                party/creditor and the debtor agent.
              type: string
              minLength: 1
              maxLength: 256
        FxQuoteId:
          description: >-
            Required where the consent or payment initiation request relates to a previously quoted FX trade. The TPP
            must provide the `QuoteId` value where a long-lived consent exists, meaning that each payment initiation
            request will relate to a different `QuoteId` value.
          type: string
          minLength: 1
          maxLength: 128
    AEPaymentPurposeCode:
      description: >-
        A category 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: 4
      pattern: ^[A-Z]{3}$
    AESponsoredTPPInformation:
      type: object
      description: |
        The Sponsored TPP is:
        * A TPP that itself has no direct Open Banking API integrations.
        * A TPP that is using the integration of another TPP that does have direct Open Banking API integrations.
      properties:
        Name:
          type: string
          minLength: 1
          maxLength: 50
          description: |
            The Sponsored TPP Name
        Identification:
          type: string
          minLength: 1
          maxLength: 50
          description: |
            The Sponsored TPP Identification
      additionalProperties: false
    AEFilePaymentConsent:
      type: object
      description: |
        A file based payment consent.
        A Consent definition for defining Multi Payments
      required:
        - FileType
        - FileHash
        - NumberOfTransactions
        - ControlSum
      properties:
        FileType:
          $ref: '#/components/schemas/AEFileType'
        FileHash:
          $ref: '#/components/schemas/AEFileHash'
        FileReference:
          $ref: '#/components/schemas/AEReference'
        NumberOfTransactions:
          $ref: '#/components/schemas/AEFileNumberOfTransactions'
        ControlSum:
          $ref: '#/components/schemas/AEControlSum'
        RequestedExecutionDate:
          $ref: '#/components/schemas/AERequestedExecutionDate'
      additionalProperties: false
    AEPaymentConsumption:
      type: object
      description: |
        Data to track the consumption of Payments in relation to an authorized Consent Schedule
      required:
        - CumulativeNumberOfPayments
        - CumulativeValueOfPayments
      properties:
        CumulativeNumberOfPayments:
          type: number
          description: >
            The cumulative number of payment instructions initiated under the consent schedule, excluding instructions
            in a Rejected state.
          minLength: 1
          example: 4
        CumulativeValueOfPayments:
          description: >
            The cumulative value of payment instructions initiated under the consent schedule, excluding instructions in
            a Rejected state.

            A number of monetary units specified in an active currency where the unit of currency is explicit and
            compliant with ISO 4217."
          type: object
          required:
            - Amount
            - Currency
          properties:
            Amount:
              $ref: '#/components/schemas/AEActiveOrHistoricAmount'
            Currency:
              $ref: '#/components/schemas/AEActiveOrHistoricCurrencyCode'
        CumulativeNumberOfPaymentsInCurrentPeriod:
          type: number
          description: >
            The cumulative number of payment instructions in the current period initiated under the consent schedule,
            excluding instructions in a Rejected state.
          minLength: 1
          example: 1
        CumulativeValueOfPaymentsInCurrentPeriod:
          description: >
            The cumulative value of payment instructions in the current period initiated under the consent schedule,
            excluding instructions in a Rejected state.

            A number of monetary units specified in an active currency where the unit of currency is explicit and
            compliant with ISO 4217."
          type: object
          required:
            - Amount
            - Currency
          properties:
            Amount:
              $ref: '#/components/schemas/AEActiveOrHistoricAmount'
            Currency:
              $ref: '#/components/schemas/AEActiveOrHistoricCurrencyCode'
      additionalProperties: false
    AEActiveOrHistoricAmount:
      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,16}\.\d{2}$
      example: '100.00'
    AEActiveOrHistoricCurrencyCode:
      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: AED
    AERequestedExecutionDate:
      description: >
        The date when the TPP expects the LFI to execute the payment.

        The date must be in the future and cannot be on the same day or a day in the past.

        The maximum date in the future that can be specified is 1 year from the day of the consent of the User to the
        TPP.

        All dates in the JSON payloads are represented in ISO 8601 date format.
      type: string
      format: date
    AEExternalPaymentChargeTypeCode:
      description: Charge type, in a coded form.
      type: string
      enum:
        - VAT
        - Fees
    AEChargeBearerType1Code:
      description: Specifies which party/parties will bear the charges associated with the processing of the payment transaction.
      type: string
      enum:
        - BorneByCreditor
        - BorneByDebtor
        - Shared
    AEActiveCurrencyAmount:
      description: |
        The Currency and Amount relating to the Payment
      type: object
      required:
        - Amount
        - Currency
      properties:
        Amount:
          $ref: '#/components/schemas/AEActiveOrHistoricAmount'
        Currency:
          $ref: '#/components/schemas/AEActiveOrHistoricCurrencyCode'
    AEPeriodType:
      type: string
      description: >
        A Period may begin from the Consent CreationDateTime if a PeriodStartDate is not provided.


        |Period Type|Description|

        |-----------|-----------|

        |Day|A continuous period of time, consisting of 24 consecutive hours, starting from midnight (00:00:00) and
        finishing at 23:59:59 of the same day. |

        |Week|A continuous period of time, consisting of seven consecutive days, starting from midnight (00:00:00) and
        finishing at 23:59:59 of the 7th day. |

        |Month|A continuous period of time starting from midnight (00:00:00) of the first day of a month and finishing
        at 23:59:59 of the last day of that month.|

        |Year|A continuous period of time, consisting of 12 months.|
      enum:
        - Day
        - Week
        - Month
        - Year
    AEPeriodStartDate:
      type: string
      description: |
        * Payments: Specifies the start date of when a payment schedule begins.
      format: date
    AEPaymentAndFilePaymentRequest:
      description: The payment request body as received from the TPP
      oneOf:
        - $ref: '#/components/schemas/AEPaymentRequest'
        - $ref: '#/components/schemas/AEFilePaymentRequest'
    AEPaymentRequest:
      description: |
        Payment Request Schema
      type: object
      additionalProperties: false
      required:
        - Data
      properties:
        Data:
          type: object
          additionalProperties: false
          required:
            - ConsentId
            - Instruction
            - PaymentPurposeCode
          properties:
            ConsentId:
              $ref: '#/components/schemas/AEConsentId'
            Instruction:
              $ref: '#/components/schemas/AEPaymentInstruction'
            CurrencyRequest:
              $ref: '#/components/schemas/AECurrencyRequest'
            PersonalIdentifiableInformation:
              description: >-
                Personal Identifiable Information, represented in both encoded and decoded form using a `anyOf`, to help
                implementers readily understand both the structure and serialized form of the property.


                **Implementations MUST reflect the AEJWEPaymentPII Schema Object** **structure and the notes provided**
                **on implementing a JWS and JWE. The decoded forms of PII objects are for guidance on content only,**
                **to help with parsing the JWS payload once the JWE has been decrypted.**


              anyOf:
                - $ref: '#/components/schemas/AEPaymentInitiationPII'
                - $ref: '#/components/schemas/AEBankServiceInitiation.AEDomesticPaymentPIIProperties'
                - $ref: '#/components/schemas/AEBankServiceInitiation.AEInternationalPaymentPIIProperties'
                - $ref: '#/components/schemas/AEJWEPaymentPII'
            PaymentPurposeCode:
              $ref: '#/components/schemas/AEPaymentPurposeCode'
            DebtorReference:
              $ref: '#/components/schemas/AEServiceInitiationDebtorReference'
            CreditorReference:
              $ref: '#/components/schemas/AEServiceInitiationCreditorReference'
    AEPaymentInitiationPII:
      title: Payment Initiation PII, to v2.0
      type: object
      additionalProperties: false
      deprecated: true
      description: >
        Elements of Personal Identifiable Information data.

        **PII up to v2.0. Deprecated at v2.1 for description split by Domestic and International payments.**
      properties:
        Initiation:
          type: object
          additionalProperties: false
          description: >-
            The Initiation payload is sent by the initiating party to the LFI. It is used to request movement of funds
            from the debtor account to a creditor.
          properties:
            CreditorAgent:
              $ref: '#/components/schemas/AECreditorAgent'
            Creditor:
              type: object
              additionalProperties: false
              description: Party to which an amount of money is due.
              properties:
                Name:
                  description: |
                    Name by which a party is known and which is usually used to identify that party.
                    This may be used to identify the Creditor for international payments.
                  type: string
                  minLength: 1
                  maxLength: 140
                PostalAddress:
                  $ref: '#/components/schemas/AEAddress'
            CreditorAccount:
              $ref: '#/components/schemas/AECreditorAccount'
            ConfirmationOfPayeeResponse:
              $ref: '#/components/schemas/AEConfirmationOfPayeeResponse'
        Risk:
          $ref: '#/components/schemas/AERisk'
    AECreditorAgent:
      description: |
        Refers to the Financial Institution.
      type: object
      required:
        - SchemeName
        - Identification
      properties:
        SchemeName:
          description: |
            The identification scheme for uniquely identifying the Agent.

            * BICFI: The BIC/SWIFT Code
            * Other: Identifier based on non-SWIFT payment system or local market scheme.
          type: string
          enum:
            - BICFI
            - Other
        Identification:
          description: Identifier that can be the BIC/SWIFT code or target payment scheme identifier.
          type: string
        Name:
          description: Name by which an agent is known and which is usually used to identify that agent.
          type: string
          minLength: 1
          maxLength: 140
        PostalAddress:
          $ref: '#/components/schemas/AEAddress'
    AECreditorAccount:
      description: Unambiguous identification of the account of the creditor to which a credit entry will be posted.
      type: object
      additionalProperties: false
      required:
        - SchemeName
        - Identification
        - Name
      properties:
        SchemeName:
          $ref: '#/components/schemas/AECreditorExternalAccountIdentificationCode'
        Identification:
          $ref: '#/components/schemas/AEIdentification'
        Name:
          $ref: '#/components/schemas/AEName'
        TradingName:
          $ref: '#/components/schemas/AETradingName'
    AEFilePaymentRequest:
      description: |
        File Payment Request Schema
      type: object
      additionalProperties: false
      required:
        - Data
      properties:
        Data:
          type: object
          additionalProperties: false
          required:
            - ConsentId
            - PaymentPurposeCode
          properties:
            ConsentId:
              $ref: '#/components/schemas/AEConsentId'
            Instruction:
              $ref: '#/components/schemas/AEFilePaymentConsent'
            PaymentPurposeCode:
              $ref: '#/components/schemas/AEPaymentPurposeCode'
            DebtorReference:
              $ref: '#/components/schemas/AEServiceInitiationDebtorReference'
    AEPaymentInstruction:
      type: object
      additionalProperties: false
      required:
        - Amount
      description: >-
        The Initiation payload is sent by the initiating party to the LFI. It is used to request movement of funds from
        the debtor account to a creditor for a single payment.
      properties:
        Amount:
          $ref: '#/components/schemas/AEActiveCurrencyAmount'
    consent:
      description: >

        A consent in its current state.


        If the consent has been authorised, then it can be expected that the financial institution would have patched in
        `accountIds` and `psuIdentifier` fields.


        Additionally, the financial institution may also patch in an arbitrary set of fields along with consent in the
        `supplementaryInformation` field.
      allOf:
        - $ref: '#/components/schemas/newConsent'
        - $ref: '#/components/schemas/ConsentManager.AEUpdatedConsentProperties'
        - type: object
          properties:
            authorizationChannel:
              type: string
              enum:
                - App
                - Web
    multiConsentResponse:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/consent'
        meta:
          $ref: '#/components/schemas/paginationMetadata'
    ConsentPostResponse:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          $ref: '#/components/schemas/newConsent'
        meta:
          $ref: '#/components/schemas/meta'
    RevokeConsent:
      type: object
      required:
        - revokedBy
      properties:
        revokedBy:
          $ref: '#/components/schemas/AERevokedBy'
        revokedByPsu:
          type: object
          properties:
            userId:
              type: string
    AuthorizationDetails:
      description: |
        The request body for creating a new consent.

        The body consists of the RAR request that is sent by the TPP to the authorization server.
      oneOf:
        - $ref: '#/components/schemas/DataSharingAuthorizationDetails'
        - $ref: '#/components/schemas/InsuranceAuthorizationDetails'
        - $ref: '#/components/schemas/ServiceInitiationAuthorizationDetails'
    DataSharingAuthorizationDetails:
      type: object
      properties:
        type:
          description: The Rich Authorization Request (RAR) type
          type: string
          pattern: ^urn:openfinanceuae:account-access-consent:v[0-9]+\.[0-9]+$
          example: urn:openfinanceuae:account-access-consent:v2.1
        consent:
          $ref: '#/components/schemas/AuthorizationDetailsDataSharingConsent'
        subscription:
          $ref: '#/components/schemas/EventNotification'
    InsuranceAuthorizationDetails:
      type: object
      properties:
        type:
          description: The Rich Authorization Request (RAR) type
          type: string
          pattern: ^urn:openfinanceuae:insurance-consent:v[0-9]+\.[0-9]+$
          example: urn:openfinanceuae:insurance-consent:v2.1
        consent:
          $ref: '#/components/schemas/AuthorizationDetailsInsuranceConsent'
        subscription:
          $ref: '#/components/schemas/EventNotification'
    ServiceInitiationAuthorizationDetails:
      type: object
      properties:
        type:
          description: The Rich Authorization Request (RAR) type
          type: string
          pattern: ^urn:openfinanceuae:service-initiation-consent:v[0-9]+\.[0-9]+$
          example: urn:openfinanceuae:service-initiation-consent:v2.1
        consent:
          $ref: '#/components/schemas/AEServiceInitiationAuthorizationDetailProperties'
        subscription:
          $ref: '#/components/schemas/EventNotification'
    AEServiceInitiationAuthorizationDetailProperties:
      type: object
      required:
        - ConsentId
        - PersonalIdentifiableInformation
        - ControlParameters
        - PaymentPurposeCode
        - ExpirationDateTime
      properties:
        ConsentId:
          $ref: '#/components/schemas/AEConsentId'
        BaseConsentId:
          $ref: '#/components/schemas/AEBaseConsentId'
        IsSingleAuthorization:
          $ref: '#/components/schemas/IsSingleAuthorization'
        AuthorizationExpirationDateTime:
          type: string
          format: date-time
          description: |2-
                A time by which a Consent (in AwaitingAuthorization status) must be Authorized by the User.
                The time window starts from the actual CreationDateTime (when the Consent is staged with the LFI).
                If the current time window exceeds the Authorization Expiration Time Window (and the Consent status is AwaitingAuthorization) then the Consent Status must be set to Rejected.
                The time window is based on a custom time format hhh:mm:ss. e.g. 720:00:00 represents a time window of 720 hours, 00 minutes, 00 seconds (30 days) after the CreationDateTime to Authorize the Consent.
        ExpirationDateTime:
          allOf:
            - $ref: '#/components/schemas/ARConsentExpirationDateTime'
          description: |2-
                Specified date and time the consent will expire.

                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 :2023-04-05T10:43:07+00:00
        Permissions:
          type: array
          items:
            $ref: '#/components/schemas/AEServiceInitiationConsentPermissionCodes'
          description: |
            Specifies the permitted Account Access data types.
            This is a list of the data groups being consented by the User, and requested for authorization with the LFI.

            This allows a TPP to request a balance check permission.
        CurrencyRequest:
          $ref: '#/components/schemas/AECurrencyRequest'
        PersonalIdentifiableInformation:
          description: >-
            Personal Identifiable Information, represented in both encoded and decoded form using a `oneOf`, to help
            implementers readily understand both the structure and serialized form of the property.

            **Implementations MUST reflect the AEJWEPaymentPII Schema Object** **structure and the notes provided on
            implementing a JWS and JWE** **The decoded form AEPaymentConsentPII is for guidance on content only**
          anyOf:
            - $ref: '#/components/schemas/AEPaymentConsentPII'
            - $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEDomesticPaymentPII'
            - $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalPaymentPII'
            - $ref: '#/components/schemas/AEJWEPaymentPII'
        ControlParameters:
          $ref: '#/components/schemas/AEServiceInitiationConsentControlParameters'
        DebtorReference:
          $ref: '#/components/schemas/AEServiceInitiationDebtorReference'
        CreditorReference:
          $ref: '#/components/schemas/AEServiceInitiationCreditorReference'
        PaymentPurposeCode:
          $ref: '#/components/schemas/AEServiceInitiationPaymentPurposeCode'
        SponsoredTPPInformation:
          $ref: '#/components/schemas/AEServiceInitiationSponsoredTPPInformation'
      additionalProperties: false
    ARConsentExpirationDateTime:
      type: string
      format: date-time
    AEServiceInitiationSponsoredTPPInformation:
      type: object
      required:
        - Name
        - Identification
      properties:
        Name:
          type: string
          minLength: 1
          maxLength: 50
          description: The Sponsored TPP Name
        Identification:
          type: string
          minLength: 1
          maxLength: 50
          description: The Sponsored TPP Identification
      description: |2-
            The Sponsored TPP is:
            * A TPP that itself has no direct Open Banking API integrations.
            * A TPP that is using the integration of another TPP that does have direct Open Banking API integrations.
      additionalProperties: false
    AEServiceInitiationPaymentPurposeCode:
      type: string
      minLength: 1
      maxLength: 3
      pattern: ^[A-Z]{3}$
      description: >-
        A category 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.
    AEServiceInitiationCreditorReference:
      anyOf:
        - description: >
            **DEPRECATED AT v2.1**

            A reason or reference in relation to a payment, set to facilitate a structured Creditor reference consisting
            of:


            * TPP ID and BIC for the Debtor Account, followed by freeform text to a maximum of 120 characters.


            The TPP ID value will match the organization ID value from the Trust Framework, and therefore will be a v4
            UUID.


            A BIC is specific according to the standard format for ISO 20022, and can therefore be either 8 or 11
            characters in length.


            If the value of the concatenated string exceeds 120 characters, the TPP must first omit or truncate the
            freeform element of the reference.
          type: string
          minLength: 1
          maxLength: 120
          pattern: >-
            ^TPP=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12},BIC=[A-Z0-9]{4}[A-Z0-9]{2}[A-Z0-9]{2}([A-Z0-9]{3}){0,1}($|,.+$)
          deprecated: true
        - description: |-
            **DEPRECATED AT v2.1 - OPEN STRINGS ARE NO LONGER ALLOWED.**

            A Creditor Reference is a note for a given Creditor or Creditor LFI that supports reconciliation of
            a given payment instruction.
          type: string
          minLength: 1
          maxLength: 35
          deprecated: true
        - description: |-
            A Creditor Reference is a note for a given Creditor or Creditor LFI that supports reconciliation of
            a given payment instruction. Supports a restricted character set.
          type: string
          minLength: 1
          maxLength: 35
          pattern: ^[A-Za-z0-9 \/?:().,'+-]+$
    AEServiceInitiationDebtorReference:
      anyOf:
        - description: >
            **DEPRECATED AT v2.1**

            A reason or reference in relation to a payment, set to facilitate a structured Debtor reference consisting
            of:


            * For payments to Merchants: TPP ID, Merchant ID, BIC for the Creditor Account, followed by freeform text to a
            maximum of 120 characters.


            * For other payments: TPP ID and BIC for the Creditor Account, followed by freeform text to a maximum of 120
            characters.


            The TPP ID value will match the organization ID value from the Trust Framework, and therefore will be a v4
            UUID.


            The Merchant ID wil be as per the existing Aani Core rules for the Merchant identification, and will
            incorporate the Trade License number for the Merchant.


            A BIC is specific according to the standard format for ISO 20022, and can therefore be either 8 or 11
            characters in length.


            If the value of the concatenated string exceeds 120 characters, the TPP must omit or truncate the freeform
            element of the reference.
          type: string
          minLength: 1
          maxLength: 120
          pattern: ^TPP=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12},(Merchant=[A-Z0-9]{3}-[A-Z]{4}-TL.+-[0-9]{4}|),BIC=[A-Z0-9]{4}[A-Z0-9]{2}[A-Z0-9]{2}([A-Z0-9]{3}){0,1}($|,.+$)
          deprecated: true
        - description: |-
            **DEPRECATED AT v2.1 - OPEN STRINGS ARE NO LONGER ALLOWED.**

            A Debtor Reference is a note is for the reference of a given User that may be available as
            additional information in relation to a given payment instruction.
          type: string
          minLength: 1
          maxLength: 35
          deprecated: true
        - description: |-
            A Debtor Reference is a note is for the reference of a given User that may be available as
            additional information in relation to a given payment instruction. Supports a restricted character set.
          type: string
          minLength: 1
          maxLength: 35
          pattern: ^[A-Za-z0-9 \/?:().,'+-]+$
    AEServiceInitiationConsentControlParameters:
      type: object
      properties:
        IsDelegatedAuthentication:
          type: boolean
          description: >-
            Indicates whether the all payment controls will be defined and managed by the TPP under the Payment with
            Delegated Authentication capability
        ConsentSchedule:
          $ref: '#/components/schemas/AEServiceInitiationConsentSchedule'
      description: Control Parameters set the overall rules for the Payment Schedule
      additionalProperties: false
    AEServiceInitiationConsentSchedule:
      type: object
      properties:
        SinglePayment:
          $ref: '#/components/schemas/AEServiceInitiationSinglePayment'
        MultiPayment:
          $ref: '#/components/schemas/AEServiceInitiationLongLivedPaymentConsent'
        FilePayment:
          $ref: '#/components/schemas/AEServiceInitiationFilePaymentConsent'
      description: |2-
            The various payment types that can be initiated:
            * A Single Payment
            * A Multi-Payment
            * A Combined Payment (one SinglePayment and one MultiPayment)
      additionalProperties: false
    AEServiceInitiationFilePaymentConsent:
      type: object
      required:
        - FileType
        - FileHash
        - NumberOfTransactions
        - ControlSum
      properties:
        FileType:
          type: string
          minLength: 1
          maxLength: 40
          description: Specifies the payment file type
        FileHash:
          type: string
          minLength: 1
          maxLength: 44
          description: A base64 encoding of a SHA256 hash of the file to be uploaded.
        FileReference:
          $ref: '#/components/schemas/AEServiceInitiationReference'
        NumberOfTransactions:
          type: integer
          description: Number of individual transactions contained in the payment information group.
        ControlSum:
          type: string
          pattern: ^\d{1,16}\.\d{2}$
          description: Total of all individual amounts included in the group, irrespective of currencies.
        RequestedExecutionDate:
          $ref: '#/components/schemas/AERequestedExecutionDate'
      description: A Consent definition for defining Bulk/Batch Payments
      additionalProperties: false
    AEServiceInitiationReference:
      type: string
      minLength: 1
      maxLength: 35
      description: A reason or reference in relation to a payment.
    AEServiceInitiationLongLivedPaymentConsent:
      type: object
      required:
        - PeriodicSchedule
      properties:
        MaximumCumulativeValueOfPayments:
          allOf:
            - $ref: '#/components/schemas/AEAmountAndCurrency'
          description: |2-
                The maximum cumulative value of all successful payment rails executions under the Consent.
                Each successful payment rails execution amount (related to the Consent) is added to the total cumulative value of the Consent which cannot exceed the maximum value agreed with the User at the point of consent.
        MaximumCumulativeNumberOfPayments:
          type: integer
          description: |2-
                The maximum cumulative number of all successful payment rails executions under the Consent.
                Each successful payment rails execution (related to the Consent) is added to the total cumulative number of payments for the Consent which cannot exceed the maximum value agreed with the User at the point of consent.
        PeriodicSchedule:
          $ref: '#/components/schemas/AEServiceInitiationLongLivedPaymentConsentPeriodicSchedule'
      description: A Consent definition for defining Multi Payments
      additionalProperties: false
    AEServiceInitiationLongLivedPaymentConsentPeriodicSchedule:
      oneOf:
        - $ref: '#/components/schemas/AEServiceInitiationFixedDefinedSchedule'
        - $ref: '#/components/schemas/AEServiceInitiationVariableDefinedSchedule'
        - $ref: '#/components/schemas/AEServiceInitiationFixedPeriodicSchedule'
        - $ref: '#/components/schemas/AEServiceInitiationVariablePeriodicSchedule'
        - $ref: '#/components/schemas/AEServiceInitiationFixedOnDemand'
        - $ref: '#/components/schemas/AEServiceInitiationVariableOnDemand'
      discriminator:
        propertyName: Type
      description: The definition for a schedule
      additionalProperties: false
    AEServiceInitiationVariablePeriodicSchedule:
      type: object
      required:
        - Type
        - PeriodType
        - PeriodStartDate
        - MaximumIndividualAmount
      properties:
        Type:
          type: string
          enum:
            - VariablePeriodicSchedule
        PeriodType:
          $ref: '#/components/schemas/AEPeriodType'
        PeriodStartDate:
          $ref: '#/components/schemas/AEPeriodStartDate'
        MaximumIndividualAmount:
          allOf:
            - $ref: '#/components/schemas/AEAmountAndCurrency'
          description: This is the Maximum amount a variable payment can take per period.
      description: >-
        Payment Controls that apply to all payment instructions in a given period under this payment consent. The
        payments for this consent must be executed only on the PeriodStartDate, and dates recurring based on the
        PeriodType.
      additionalProperties: false
    AEServiceInitiationFixedDefinedSchedule:
      type: object
      required:
        - Type
        - Schedule
      properties:
        Type:
          type: string
          enum:
            - FixedDefinedSchedule
          description: The Periodic Schedule Type
        Schedule:
          type: array
          items:
            $ref: '#/components/schemas/AEServiceInitiationFixedSchedule'
          minItems: 1
          maxItems: 53
      description: Payment Schedule denoting a list of pre-defined future dated payments all with fixed amounts and dates.
      additionalProperties: false
    AEServiceInitiationVariableDefinedSchedule:
      type: object
      required:
        - Type
        - Schedule
      properties:
        Type:
          type: string
          enum:
            - VariableDefinedSchedule
          description: The Periodic Schedule Type
        Schedule:
          type: array
          items:
            $ref: '#/components/schemas/AEServiceInitiationVariableSchedule'
          minItems: 1
          maxItems: 53
      description: Payment Schedule denoting a list of pre-defined future dated payments all with variable amounts and dates.
      additionalProperties: false
    AEServiceInitiationFixedPeriodicSchedule:
      type: object
      required:
        - Type
        - PeriodType
        - PeriodStartDate
        - Amount
      properties:
        Type:
          type: string
          enum:
            - FixedPeriodicSchedule
        PeriodType:
          $ref: '#/components/schemas/AEPeriodType'
        PeriodStartDate:
          $ref: '#/components/schemas/AEPeriodStartDate'
        Amount:
          $ref: '#/components/schemas/AEAmountAndCurrency'
      description: >-
        Payment Controls that apply to all payment instructions in a given period under this payment consent. The
        payments for this consent must be executed only on the PeriodStartDate, and dates recurring based on the
        PeriodType.
      additionalProperties: false
    AEServiceInitiationFixedOnDemand:
      type: object
      required:
        - Type
        - PeriodType
        - PeriodStartDate
        - Amount
        - Controls
      properties:
        Type:
          type: string
          enum:
            - FixedOnDemand
        PeriodType:
          $ref: '#/components/schemas/AEPeriodType'
        PeriodStartDate:
          $ref: '#/components/schemas/AEPeriodStartDate'
        Amount:
          $ref: '#/components/schemas/AEAmountAndCurrency'
        Controls:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            MaximumCumulativeValueOfPaymentsPerPeriod:
              allOf:
                - $ref: '#/components/schemas/AEAmountAndCurrency'
              description: The maximum cumulative payment value of all payment initiations per Period Type.
            MaximumCumulativeNumberOfPaymentsPerPeriod:
              type: integer
              description: The maximum frequency of payment initiations per Period Type.
      description: >-
        Payment Controls that apply to all payment instructions in a given period under this payment consent. The
        payments for this consent may be executed on any date, as long as they are within the Controls for a PeriodType
      additionalProperties: false
    AEServiceInitiationVariableOnDemand:
      type: object
      required:
        - Type
        - PeriodType
        - PeriodStartDate
        - Controls
      properties:
        Type:
          type: string
          enum:
            - VariableOnDemand
        PeriodType:
          $ref: '#/components/schemas/AEPeriodType'
        PeriodStartDate:
          $ref: '#/components/schemas/AEPeriodStartDate'
        Controls:
          type: object
          minProperties: 1
          additionalProperties: false
          properties:
            MaximumIndividualAmount:
              allOf:
                - $ref: '#/components/schemas/AEAmountAndCurrency'
              description: This is the Maximum amount a variable payment can take per period.
            MaximumCumulativeValueOfPaymentsPerPeriod:
              allOf:
                - $ref: '#/components/schemas/AEAmountAndCurrency'
              description: The maximum cumulative payment value of all payment initiations per Period Type.
            MaximumCumulativeNumberOfPaymentsPerPeriod:
              type: integer
              description: The maximum frequency of payment initiations per Period Type.
      description: >-
        Payment Controls that apply to all payment instructions in a given period under this payment consent. The
        payments for this consent may be executed on any date, as long as they are within the Controls for a PeriodType
      additionalProperties: false
    AEServiceInitiationFixedSchedule:
      type: object
      required:
        - PaymentExecutionDate
        - Amount
      properties:
        PaymentExecutionDate:
          type: string
          format: date
          description: |2-
                Used to specify the expected payment execution date/time.
                All dates in the JSON payloads are represented in ISO 8601 date format.
                An example is: 2023-04-05
        Amount:
          $ref: '#/components/schemas/AEAmountAndCurrency'
      additionalProperties: false
    AEServiceInitiationVariableSchedule:
      type: object
      required:
        - PaymentExecutionDate
        - MaximumIndividualAmount
      properties:
        PaymentExecutionDate:
          type: string
          format: date
          description: >-
            Used to specify the expected payment execution date/time. All dates in the JSON payloads are represented in
            ISO 8601 date format. An example is: 2023-04-05
        MaximumIndividualAmount:
          allOf:
            - $ref: '#/components/schemas/AEAmountAndCurrency'
          description: This is the Maximum amount a variable payment can take per period.
      additionalProperties: false
    AEServiceInitiationSinglePayment:
      anyOf:
        - $ref: '#/components/schemas/AEServiceInitiationSingleInstantPayment'
        - $ref: '#/components/schemas/AEServiceInitiationFutureDatedPayment'
      discriminator:
        propertyName: Type
        mapping:
          SingleInstantPayment: '#/components/schemas/AEServiceInitiationSingleInstantPayment'
          SingleFutureDatedPayment: '#/components/schemas/AEServiceInitiationFutureDatedPayment'
      description: A Consent definition for defining Single Payments
    AEServiceInitiationFutureDatedPayment:
      type: object
      required:
        - Type
        - Amount
        - RequestedExecutionDate
      properties:
        Type:
          type: string
          enum:
            - SingleFutureDatedPayment
        Amount:
          $ref: '#/components/schemas/AEAmountAndCurrency'
        RequestedExecutionDate:
          $ref: '#/components/schemas/AERequestedExecutionDate'
      description: >-
        A single payment consent that MUST be used for a single payment executed by the LFI on a future date. This
        payment consent will be authorized by the User during the payment journey, and the payment will be executed by
        the TPP immediately.

        **Support for Single Future-Dated Payments warehoused at the LFI is removed from v2.1 of the standards.**
        **This property is therefore deprecated, and the Schema Object is retained to provide compatibility with**
        **existing consent resources.**
      additionalProperties: false
      deprecated: true
    AEServiceInitiationSingleInstantPayment:
      type: object
      required:
        - Type
        - Amount
      properties:
        Type:
          type: string
          enum:
            - SingleInstantPayment
          description: The Payment Type
        Amount:
          $ref: '#/components/schemas/AEAmountAndCurrency'
      description: >-
        A single immediate payment consent that MUST be used for a single payment which will be initiated immediately
        after User authorization at the LFI.
      additionalProperties: false
    AEAmountAndCurrency:
      type: object
      required:
        - Currency
        - Amount
      properties:
        Currency:
          $ref: '#/components/schemas/CurrencyCode'
        Amount:
          $ref: '#/components/schemas/Amount'
      description: The Currency and Amount relating to the Payment
      additionalProperties: false
    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
      pattern: ^\d{1,16}\.\d{2}$
    CurrencyCode:
      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}$
    IsSingleAuthorization:
      description: |
        Specifies to the LFI that the consent authorization must be completed in a single authorization Step
        with the LFI
      type: boolean
    AEServiceInitiationConsentPermissionCodes:
      type: string
      enum:
        - ReadAccountsBasic
        - ReadAccountsDetail
        - ReadBalances
        - ReadRefundAccount
    AEJWEPaymentPII:
      type: string
      description: |
        A JSON Web Encryption (JWE) object, which encapsulates a JWS. The value is a
        compact serialization of a JWE, which is a string consisting of five
        base64url-encoded parts joined by dots. It encapsulates encrypted content
        using JSON data structures.

        The decrypted JWS content has the structure of the AEPaymentPII schema.
      example: eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00ifQ....
    AEPaymentConsentPII:
      title: Payment Initiation PII, to v2.0
      type: object
      additionalProperties: false
      deprecated: true
      description: >
        Elements of Personal Identifiable Information data.

        **PII up to v2.0. Deprecated at v2.1 for description split by Domestic and International payments.**
      properties:
        Initiation:
          type: object
          additionalProperties: false
          description: >-
            The Initiation payload is sent by the initiating party to the LFI. It is used to request movement of funds
            from the debtor account to a creditor.
          properties:
            DebtorAccount:
              type: object
              additionalProperties: false
              required:
                - SchemeName
                - Identification
              description: >-
                Unambiguous identification of the account of the debtor to which a debit entry will be made as a result
                of the transaction.
              properties:
                SchemeName:
                  description: Name of the identification scheme, in a coded form as published in an external list.
                  type: string
                  enum:
                    - IBAN
                Identification:
                  description: |
                    Identification for the account assigned by the LFI based on the Account Scheme Name.
                    This identification is known by the User account owner.
                  type: string
                  minLength: 1
                Name:
                  type: object
                  description: >
                    The Account Holder Name is the name or names of the Account owner(s) represented at the account
                    level
                  properties:
                    en:
                      type: string
                      description: English value of the string
                      maxLength: 70
                    ar:
                      type: string
                      description: Arabic value of the string
                      maxLength: 70
                  additionalProperties: false
            Creditor:
              description: |
                (Array) Identification elements for a Creditor associated with the consent
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/AECreditor'
        Risk:
          $ref: '#/components/schemas/AERisk'
    AECreditor:
      additionalProperties: false
      type: object
      description: Identification elements for a Creditor.
      properties:
        CreditorAgent:
          description: |
            Refers to the Financial Institution.
          type: object
          required:
            - SchemeName
            - Identification
          properties:
            SchemeName:
              description: |
               The identification scheme for uniquely identifying the Agent.

                * BICFI: The BIC/SWIFT Code
                * Other: Identifier based on non-SWIFT payment system or local market scheme.
              type: string
              enum:
                - BICFI
                - Other
            Identification:
              description: Identifier that can be the BIC/SWIFT code or target payment scheme identifier.
              type: string
            Name:
              description: Name by which an agent is known and which is usually used to identify that agent.
              type: string
              minLength: 1
              maxLength: 140
            PostalAddress:
              $ref: '#/components/schemas/AEAddress'
        Creditor:
          type: object
          additionalProperties: false
          description: Party to which an amount of money is due.
          properties:
            Name:
              description: |
                Name by which a party is known and which is usually used to identify that party.
                This may be used to identify the Creditor for international payments.
              type: string
              minLength: 1
              maxLength: 140
            PostalAddress:
              $ref: '#/components/schemas/AEAddress'
        CreditorAccount:
          description: Unambiguous identification of the account of the creditor to which a credit entry will be posted.
          type: object
          additionalProperties: false
          required:
            - SchemeName
            - Identification
            - Name
          properties:
            SchemeName:
              $ref: '#/components/schemas/AECreditorExternalAccountIdentificationCode'
            Identification:
              $ref: '#/components/schemas/AEIdentification'
            Name:
              $ref: '#/components/schemas/AEName'
            TradingName:
              $ref: '#/components/schemas/AETradingName'
        ConfirmationOfPayeeResponse:
          $ref: '#/components/schemas/AEConfirmationOfPayeeResponse'
    AEDebtorIndicators:
      type: object
      description: |
        Debtor (User) Indicators
      properties:
        Authentication:
          type: object
          description: The authentication method used by the User to access their account with the TPP
          properties:
            AuthenticationChannel:
              description: Channel on which the User was authenticated
              type: string
              enum:
                - App
                - Web
            PossessionFactor:
              type: object
              description: The User's possession, that only the User possesses
              properties:
                IsUsed:
                  type: boolean
                Type:
                  type: string
                  enum:
                    - FIDO2SecurityKey
                    - Passkey
                    - OTPDevice
                    - OTPApp
                    - SMSOTP
                    - EmailOTP
                    - PushNotification
                    - WebauthnToken
                    - SecureEnclaveKey
                    - HardwareOTPKey
                    - TrustedDevice
                    - Other
              additionalProperties: false
            KnowledgeFactor:
              type: object
              description: The User's knowledge, that only the User knows
              properties:
                IsUsed:
                  type: boolean
                Type:
                  type: string
                  enum:
                    - PIN
                    - Password
                    - SecurityQuestion
                    - SMSOTP
                    - EmailOTP
                    - OTPPush
                    - Other
              additionalProperties: false
            InherenceFactor:
              type: object
              description: The User's inherance, that is unique to the User's physical characteristics
              properties:
                IsUsed:
                  type: boolean
                Type:
                  type: string
                  enum:
                    - Biometric
                    - Fingerprint
                    - FaceRecognition
                    - IrisScan
                    - VoiceRecognition
                    - FIDOBiometric
                    - DeviceBiometrics
                    - Other
              additionalProperties: false
            ChallengeOutcome:
              type: string
              description: >-
                The result of multi-factor authentication performed by the TPP, with NotPerformed indication the User
                was not required to authenticate before consenting to the requested payment
              enum:
                - Pass
                - Fail
                - NotPerformed
            AuthenticationFlow:
              type: string
              enum:
                - MFA
                - Other
            AuthenticationValue:
              type: string
              description: Cryptographic proof of authentication where supported by the device and protocol.
            ChallengeDateTime:
              type: string
              format: date-time
          additionalProperties: false
        UserName:
          type: object
          description: The Name of the User initiating the Payment
          properties:
            en:
              type: string
              description: English value of the string
            ar:
              type: string
              description: Arabic value of the string
          additionalProperties: false
        GeoLocation:
          type: object
          description: GPS to identify and track the whereabouts of the connected electronic device.
          required:
            - Latitude
            - Longitude
          properties:
            Latitude:
              type: string
              description: latitude
            Longitude:
              type: string
              description: longitude
          additionalProperties: false
        DeviceInformation:
          type: object
          description: Detailed device information
          properties:
            DeviceId:
              type: string
              description: IMEISV number of the connected electronic device
            AlternativeDeviceId:
              type: string
              description: Alternative identifier for the connected electronic device
            DeviceOperatingSystem:
              type: string
              description: Device operating system
            DeviceOperatingSystemVersion:
              type: string
              description: Device operating system version
            DeviceBindingId:
              type: string
              description: An identifier that associates a device uniquely with a specific application
            LastBindingDateTime:
              type: string
              format: date-time
              description: Date and time when the device was last bound to the application
            BindingDuration:
              type: string
              format: duration
              description: ISO 8601 duration since device was last bound (e.g., P30D for 30 days)
            BindingStatus:
              type: string
              description: Current status of the device binding
              enum:
                - Active
                - Expired
                - Revoked
                - Suspended
            DeviceType:
              type: string
              description: Type of device used
              enum:
                - Mobile
                - Desktop
                - Tablet
                - Wearable
                - Other
            DeviceManufacturer:
              type: object
              properties:
                Model:
                  type: string
                  description: Device model name
                  maxLength: 50
                Manufacturer:
                  type: string
                  description: Device manufacturer
                  maxLength: 50
              additionalProperties: false
            DeviceLanguage:
              type: string
              description: Device language
            DeviceLocalDateTime:
              type: string
              description: Device local time
            ConnectionType:
              type: string
              description: Type of connection to the internet
              enum:
                - WiFi
                - Cellular
                - Other
            ScreenInformation:
              type: object
              properties:
                PixelDensity:
                  type: number
                  description: Screen pixel density
                Orientation:
                  type: string
                  enum:
                    - Portrait
                    - Landscape
              additionalProperties: false
            BatteryStatus:
              type: object
              properties:
                Level:
                  type: number
                  minimum: 0
                  maximum: 100
                IsCharging:
                  type: boolean
              additionalProperties: false
            TouchSupport:
              type: object
              properties:
                Supported:
                  type: boolean
                MaxTouchPoints:
                  type: integer
                  minimum: 0
              additionalProperties: false
            MotionSensors:
              type: object
              properties:
                Status:
                  type: string
                  enum:
                    - InMotion
                    - Stationary
                Accelerometer:
                  type: boolean
                Gyroscope:
                  type: boolean
              additionalProperties: false
            DeviceEnvironmentContext:
              type: array
              description: List of device environment context
              items:
                type: string
                enum:
                  - VPNDetected
                  - EmulatorDetected
          additionalProperties: false
        BiometricCapabilities:
          type: object
          description: Device biometric capabilities
          properties:
            SupportsBiometric:
              type: boolean
              description: Whether device supports biometric authentication
            BiometricTypes:
              type: array
              description: Types of biometric authentication supported
              items:
                type: string
                enum:
                  - Fingerprint
                  - FacialRecognition
                  - Iris
                  - VoicePrint
                  - Other
          additionalProperties: false
        AppInformation:
          type: object
          description: Mobile application specific information
          properties:
            AppVersion:
              type: string
              description: Version of the mobile application
            PackageName:
              type: string
              description: Application package identifier
            BuildNumber:
              type: string
              description: Application build number
          additionalProperties: false
        BrowserInformation:
          type: object
          description: Browser-specific information
          properties:
            UserAgent:
              type: string
              description: Complete browser user agent string
            IsCookiesEnabled:
              type: boolean
              description: Whether cookies are enabled in the browser
            AvailableFonts:
              type: array
              description: List of available fonts
              items:
                type: string
            Plugins:
              type: array
              description: List of installed browser plugins
              items:
                type: string
            PixelRatio:
              type: number
              description: Device pixel ratio for scaling
          additionalProperties: false
        UserBehavior:
          type: object
          description: User behavior indicators
          properties:
            ScrollBehavior:
              type: object
              properties:
                Direction:
                  type: string
                  enum:
                    - Up
                    - Down
                    - Both
                Speed:
                  type: number
                  description: Average scroll speed in pixels per second
                Frequency:
                  type: number
                  description: Number of scroll events per minute
              additionalProperties: false
          additionalProperties: false
        AccountRiskIndicators:
          type: object
          description: Risk indicators related to the account
          properties:
            UserOnboardingDateTime:
              type: string
              format: date-time
              description: The exact date and time when the User account was activated with the TPP.
            LastAccountChangeDate:
              type: string
              format: date
              description: Date that the User's account was last changed
            LastPasswordChangeDate:
              type: string
              format: date
              description: Date of the last password change by the User
            SuspiciousActivity:
              type: string
              description: Indicates any suspicious activity associated with the account
              enum:
                - NoSuspiciousActivity
                - SuspiciousActivityDetected
            TransactionHistory:
              type: object
              properties:
                LastDay:
                  type: integer
                  description: Total transactions made by the account in the last 24 hours
                  minimum: 0
                LastYear:
                  type: integer
                  description: Total transactions made by the account in the past year
                  minimum: 0
              additionalProperties: false
          additionalProperties: false
        SupplementaryData:
          type: object
          description: >
            Additional information that cannot be captured in the structured fields and/or any other specific block

            This may include information that is not available in the structured fields, such as a user's behavioural
            data

            like their typing speed and typing patterns.
      additionalProperties: false
    AERisk:
      additionalProperties: false
      description: >
        The Risk section is sent by the TPP to the LFI. It is used to specify additional details for risk/fraud scoring
        regarding Payments.
      type: object
      properties:
        DebtorIndicators:
          $ref: '#/components/schemas/AEDebtorIndicators'
        DestinationDeliveryAddress:
          type: object
          description: |
            Destination Delivery Address
          properties:
            RecipientType:
              type: string
              description: The recipient of the goods whether an individual or a corporation.
              enum:
                - Individual
                - Corporate
            RecipientName:
              type: object
              description: The name of the recipient of the goods, whether an individual or a corporation.
              properties:
                en:
                  type: string
                  description: English value of the string
                ar:
                  type: string
                  description: Arabic value of the string
              additionalProperties: false
            NationalAddress:
              $ref: '#/components/schemas/AEAddress'
          additionalProperties: false
        TransactionIndicators:
          $ref: '#/components/schemas/AETransactionIndicators'
        CreditorIndicators:
          $ref: '#/components/schemas/AECreditorIndicators'
    AETransactionIndicators:
      type: object
      description: |
        Transaction Indicators
      properties:
        IsCustomerPresent:
          description: This field differentiates between automatic and manual payment initiation.
          type: boolean
        IsContractPresent:
          description: Indicates if the Creditor has a contractual relationship with the TPP.
          type: boolean
        Channel:
          description: Where the payment has been initiated from.
          type: string
          enum:
            - Web
            - Mobile
        ChannelType:
          type: string
          description: The channel through which the transaction is being conducted
          enum:
            - ECommerce
            - InStore
            - InApp
            - Telephone
            - Mail
            - RecurringPayment
            - Other
        SubChannelType:
          type: string
          description: More specific classification of the transaction channel
          enum:
            - WebBrowser
            - MobileApp
            - SmartTV
            - WearableDevice
            - POSTerminal
            - ATM
            - KioskTerminal
            - Other
        PaymentProcess:
          type: object
          description: Metrics related to the payment process duration and attempts
          properties:
            TotalDuration:
              type: integer
              description: Total time in seconds from payment initiation to completion
              minimum: 0
            CurrentSessionAttempts:
              type: integer
              description: Number of payment attempts in the current session
              minimum: 1
            CurrentSessionFailedAttempts:
              type: integer
              description: Number of failed payment attempts in the current session
              minimum: 0
            Last24HourAttempts:
              type: integer
              description: Number of payment attempts in the last 24 hours
              minimum: 0
            Last24HourFailedAttempts:
              type: integer
              description: Number of failed payment attempts in the last 24 hours
              minimum: 0
          additionalProperties: false
        MerchantRisk:
          type: object
          description: Risk indicator details provided by the merchant
          properties:
            DeliveryTimeframe:
              type: string
              description: Timeframe for the delivery of purchased items
              enum:
                - ElectronicDelivery
                - SameDayShipping
                - OvernightShipping
                - MoreThan1DayShipping
            ReorderItemsIndicator:
              type: string
              description: Indicates if the transaction is a reorder
              enum:
                - FirstTimeOrder
                - Reorder
            PreOrderPurchaseIndicator:
              type: string
              description: Indicates if this is a pre-ordered item
              enum:
                - MerchandiseAvailable
                - FutureAvailability
            IsGiftCardPurchase:
              type: boolean
              description: Indicates if the transaction includes a gift card
            IsDeliveryAddressMatchesBilling:
              type: boolean
              description: Indicates if delivery address matches billing address
            AddressMatchLevel:
              type: string
              description: Level of match between delivery and billing addresses
              enum:
                - FullMatch
                - PartialMatch
                - NoMatch
                - NotApplicable
          additionalProperties: false
        SupplementaryData:
          type: object
          description: |
            Additional information that cannot be captured in the structured fields and/or any other specific block
      additionalProperties: false
    AECreditorIndicators:
      type: object
      description: |
        Creditor Indicators
      properties:
        AccountType:
          $ref: '#/components/schemas/AEAccountTypeCode'
        IsCreditorPrePopulated:
          $ref: '#/components/schemas/AEIsCreditorPrePopulated'
        TradingName:
          $ref: '#/components/schemas/AETradingName'
        IsVerifiedByTPP:
          $ref: '#/components/schemas/AEIsVerifiedbyTPP'
        AdditionalAccountHolderIdentifiers:
          $ref: '#/components/schemas/AEAdditionalAccountHolderIdentifiers'
        MerchantDetails:
          type: object
          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
          properties:
            MerchantId:
              description: MerchantId
              type: string
              minLength: 8
              maxLength: 20
            MerchantName:
              description: Name by which the merchant is known.
              type: string
              minLength: 1
              maxLength: 350
            MerchantSICCode:
              description: >
                SIC code stands for standard industrial classification (SIC) code.

                This four digit-number identifies a very specific short descriptor of the type of business a company is
                engaged in.

                SIC can be obtained from the Chamber of Commerce.
              type: string
              minLength: 3
              maxLength: 4
            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.

                Category code conforms to ISO 18245, related to the type of services or goods the merchant provides for
                the transaction."
              type: string
              minLength: 3
              maxLength: 4
          additionalProperties: false
        IsCreditorConfirmed:
          description: Creditor account details have been confirmed successfully using Confirmation of Payee
          type: boolean
        ConfirmationOfPayeeResponse:
          $ref: '#/components/schemas/AEConfirmationOfPayeeResponse'
        SupplementaryData:
          type: object
          description: |
            Additional information that cannot be captured in the structured fields and/or any other specific block
      additionalProperties: false
    AEIsCreditorPrePopulated:
      description: Is Creditor populated
      type: boolean
    AEIsVerifiedbyTPP:
      description: The TPP has onboarded the Creditor
      type: boolean
    AEAdditionalAccountHolderIdentifiers:
      type: array
      items:
        type: object
        description: Provides the details to identify an account.
        required:
          - SchemeName
          - Identification
        properties:
          SchemeName:
            $ref: '#/components/schemas/AERiskExternalAccountIdentificationCode'
          Identification:
            $ref: '#/components/schemas/AEIdentification'
          Name:
            $ref: '#/components/schemas/AEName'
        additionalProperties: false
    AERiskExternalAccountIdentificationCode:
      description: Name of the identification scheme, in a coded form as published in an external list.
      type: string
      enum:
        - EmiratesID
        - TradeLicenceNumber
    AEConfirmationOfPayeeResponse:
      description: >-
        The JSON Web Signature returned by the Payee Confirmation operation at the Confirmation of Payee API. The value
        must be the full JWS string, including the header and signature, without decoding to an object. If Confirmation
        of Payee is not performed this property can be omitted
      type: string
      pattern: ^.+\..+\..+$
    AEAddress:
      anyOf:
        - description: >
            (Array) Address information that locates and identifes a specific address, as defined by a national or
            international postal service."

            **v1.2 version of address format marked as deprecated, replaced at v2.0**
          type: array
          minItems: 1
          items:
            type: object
            required:
              - AddressType
              - Country
            properties:
              AddressType:
                $ref: '#/components/schemas/AEAddressTypeCode'
              ShortAddress:
                $ref: '#/components/schemas/AEShortAddress'
              UnitNumber:
                $ref: '#/components/schemas/AEUnitNumber'
              FloorNumber:
                $ref: '#/components/schemas/AEFloorNumber'
              BuildingNumber:
                $ref: '#/components/schemas/AEBuildingNumber'
              StreetName:
                $ref: '#/components/schemas/AEStreetName'
              SecondaryNumber:
                $ref: '#/components/schemas/AESecondaryNumber'
              District:
                $ref: '#/components/schemas/AEDistrict'
              PostalCode:
                $ref: '#/components/schemas/AEPostalCode'
              POBox:
                $ref: '#/components/schemas/AEPOBox'
              ZipCode:
                $ref: '#/components/schemas/AEZipCode'
              City:
                $ref: '#/components/schemas/AECity'
              Region:
                $ref: '#/components/schemas/AERegion'
              Country:
                $ref: '#/components/schemas/AECountryCode'
            additionalProperties: false
        - type: array
          items:
            type: object
            properties:
              AddressType:
                type: string
                enum:
                  - Billing
                  - Business
                  - Correspondence
                  - DeliveryTo
                  - MailTo
                  - POBox
                  - Postal
                  - Permanent
                  - Residential
                  - Statement
                  - Other
              AddressLine:
                type: array
                items:
                  type: string
                  minLength: 1
                  maxLength: 70
                minItems: 1
                maxItems: 7
              BuildingNumber:
                type: string
                minLength: 1
                maxLength: 16
              BuildingName:
                type: string
                minLength: 1
                maxLength: 140
              Floor:
                type: string
                minLength: 1
                maxLength: 70
              StreetName:
                type: string
                minLength: 1
                maxLength: 140
              DistrictName:
                type: string
                minLength: 1
                maxLength: 140
              PostBox:
                type: string
                minLength: 1
                maxLength: 16
              TownName:
                type: string
                minLength: 1
                maxLength: 140
              CountrySubDivision:
                anyOf:
                  - type: string
                    enum:
                      - AbuDhabi
                      - Ajman
                      - Dubai
                      - Fujairah
                      - RasAlKhaimah
                      - Sharjah
                      - UmmAlQuwain
                  - type: string
              Country:
                type: string
                pattern: ^[A-Z]{2}$
            required:
              - AddressType
              - AddressLine
              - Country
            additionalProperties: false
          minItems: 1
          description: One-or-more addresses related to a given subject.
    AEAddressTypeCode:
      description: Specifies the nature of the Address.
      type: string
      enum:
        - Business
        - Correspondence
        - Residential
      example: Residential
    AEShortAddress:
      description: >-
        A short address consists of four letters: region code, branch code, division code, unique code and a four-digit
        number for the building.
      type: string
      minLength: 1
      maxLength: 8
      example: ABCD1234
    AEUnitNumber:
      description: Identifies the unit or apartment number.
      type: string
      minLength: 1
      maxLength: 10
      example: '6'
    AEFloorNumber:
      description: Identifies the building floor number.
      type: string
      minLength: 1
      maxLength: 10
      example: '2'
    AEBuildingNumber:
      description: Identifies the building number.
      type: string
      minLength: 1
      maxLength: 10
      example: '34'
    AEStreetName:
      description: Identifies the street name or road.
      type: string
      minLength: 1
      maxLength: 70
      example: Omar Bin Hassan Street
    AEDistrict:
      description: Identifies the district of a city.
      type: string
      minLength: 1
      maxLength: 35
      example: Olaya Dist.
    AECountryCode:
      description: Indicates the country code in which the address is located (References ISO 3166-1 alpha-2).
      type: string
      pattern: ^[A-Z]{2,2}$
      example: SA
    AEPostalCode:
      description: ' Identifies the postal code; a unique code assigned to a specific geographic area for efficient mail sorting and delivery purposes.'
      type: string
      minLength: 1
      maxLength: 10
      example: '12345'
    AEPOBox:
      description: ' Identifies the POBox.'
      type: string
      minLength: 1
      maxLength: 10
      example: '11562'
    AEZipCode:
      description: >-
        Identifies the ZIP code; a unique code assigned to a specific geographic area for efficient mail sorting and
        delivery purposes.
      type: string
      minLength: 1
      maxLength: 10
      example: '12366'
    AESecondaryNumber:
      description: 4 numbers representing the accurate location coordinates of the address
      type: string
      minLength: 4
      maxLength: 4
      example: '1233'
    AECity:
      description: Identifies the name of the city or town where the address is situated.
      type: string
      minLength: 1
      maxLength: 35
      example: Riyadh
    AERegion:
      description: Identifies the region.
      type: string
      minLength: 1
      maxLength: 35
      example: North
    AECreditorExternalAccountIdentificationCode:
      description: Name of the identification scheme, in a coded form as published in an external list.
      type: string
      enum:
        - IBAN
        - AccountNumber
    AEIdentification:
      description: |
        Identification for the account assigned by the LFI based on the Account Scheme Name.
        This identification is known by the User account owner.
      type: string
      minLength: 1
    AEName:
      type: object
      description: |
        The Account Holder Name is the name or names of the Account owner(s) represented at the account level
      properties:
        en:
          type: string
          description: English value of the string
          maxLength: 70
        ar:
          type: string
          description: Arabic value of the string
          maxLength: 70
      additionalProperties: false
    AETradingName:
      type: object
      description: |
        The Trading Brand Name (if applicable) for the Creditor.
        Applicable to Payments.
      properties:
        en:
          type: string
          description: English value of the string
          maxLength: 70
        ar:
          type: string
          description: Arabic value of the string
          maxLength: 70
      additionalProperties: false
    AuthorizationDetailsDataSharingConsent:
      type: object
      required:
        - ConsentId
        - Permissions
        - OpenFinanceBilling
        - ExpirationDateTime
      properties:
        ConsentId:
          $ref: '#/components/schemas/AEConsentId'
        Permissions:
          type: array
          items:
            $ref: '#/components/schemas/AEAccountAccessConsentPermissionCodes'
          minItems: 1
        OpenFinanceBilling:
          $ref: '#/components/schemas/AEAccountAccessOpenFinanceBillingPost'
      allOf:
        - $ref: '#/components/schemas/AEAccountAccessAuthorizationDetailsProperties'
      additionalProperties: false
    AuthorizationDetailsInsuranceConsent:
      type: object
      required:
        - ConsentId
        - Permissions
        - OpenFinanceBilling
        - ExpirationDateTime
      properties:
        BaseConsentId:
          type: string
          description: The original ConsentId assigned by the TPP
        ExpirationDateTime:
          type: string
          format: date-time
          description: >-
            Specified date and time the permissions will expire. All date-time fields in responses must include the
            timezone. An example is below: 2017-04-05T10:43:07+00:00
        OnBehalfOf:
          $ref: '#/components/schemas/OnBehalfOf'
        ConsentId:
          $ref: '#/components/schemas/AEConsentId'
        Permissions:
          type: array
          items:
            $ref: '#/components/schemas/AEInsuranceConsentPermissions'
          minItems: 1
        OpenFinanceBilling:
          $ref: '#/components/schemas/AEInsuranceOpenFinanceBillingPost'
    AEAccountAccessAuthorizationDetailsProperties:
      type: object
      properties:
        BaseConsentId:
          $ref: '#/components/schemas/AEBaseConsentId'
        ExpirationDateTime:
          type: string
          format: date-time
          description: |-
            Specified date and time the permissions will expire.
            All date-time fields in responses must include the timezone. An example is below:
            2017-04-05T10:43:07+00:00
        TransactionFromDateTime:
          type: string
          format: date-time
          description: |2-
                Specified start date and time for the transaction query period.

                If this is not populated, the start date will be open ended, and
                data will be returned from the earliest available
                transaction.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
                **DEPRECATED AT V2.1, REPLACED BY `FromDate`**
        TransactionToDateTime:
          type: string
          format: date-time
          description: |2-
                Specified end date and time for the transaction query period.

                If this is not populated, the end date will be open ended, and
                data will be returned to the latest available transaction.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
                **DEPRECATED AT V2.1, REPLACED BY `ToDate`**
        FromDate:
          $ref: '#/components/schemas/AEBankDataSharingRichAuthorizationRequests.AEBankDataSharingFromDate'
        ToDate:
          $ref: '#/components/schemas/AEBankDataSharingRichAuthorizationRequests.AEBankDataSharingToDate'
        AccountType:
          type: array
          items:
            $ref: '#/components/schemas/AEExternalAccountTypeCode'
        AccountSubType:
          type: array
          items:
            $ref: '#/components/schemas/AEAccountSubTypeCode'
        OnBehalfOf:
          $ref: '#/components/schemas/AEOnBehalfOf'
      additionalProperties: false
    AEExternalAccountTypeCode:
      description: Specifies the type of account (Retail, SME or Corporate).
      type: string
      enum:
        - Retail
        - SME
        - Corporate
    OnBehalfOf:
      type: object
      description: On Behalf Of
      properties:
        TradingName:
          type: string
          description: Trading Name
          example: Acme Accounting Trading Name
        LegalName:
          type: string
          description: Legal Name
          example: Acme Accounting Legal Name
        IdentifierType:
          type: string
          description: Identifier Type
          enum:
            - Other
        Identifier:
          type: string
          description: Identifier
          example: abcd1234
      additionalProperties: false
    EventNotification:
      type: object
      description: |
        A Webhook Subscription Schema
      required:
        - Webhook
      properties:
        Webhook:
          description: |
            A Webhook Schema
          type: object
          required:
            - Url
            - IsActive
          properties:
            Url:
              description: |
                The TPP Callback URL being registered with the LFI
              type: string
              example: https://api.tpp.com/webhook/callbackUrl
            IsActive:
              description: >
                The TPP specifying whether the LFI should send (IsActive true) or not send (IsActive false) Webhook
                Notifications to the TPP's Webhook URL
              type: boolean
              example: false
          additionalProperties: false
      additionalProperties: false
    HealthCheckCertResponse:
      type: object
      properties:
        connectionEstablished:
          type: boolean
        mtlsStatus:
          type: string
          enum:
            - established
            - not-established
        hostName:
          type: string
        clientCertificate:
          type: object
          properties:
            subject:
              type: string
            issuer:
              type: string
          required:
            - subject
            - issuer
      required:
        - connectionEstablished
        - mtlsStatus
        - hostName
        - clientCertificate
    AEConsentUsage:
      type: object
      description: |
        Contains information about the last time the consent was used.
      properties:
        lastDataShared:
          type: string
          format: date-time
          description: >
            The last time the data was shared with the TPP. This is updated by the CM when the data is shared with the
            TPP.
        lastServiceInitiationAttempt:
          type: string
          format: date-time
          description: |
            The last time the payment was initiated by TPP. This is updated by the CM when payment is initiated by TPP.
    paginationMetadata:
      description: Pagination metadata that describes the response
      type: object
      required:
        - totalPages
        - totalRecords
      properties:
        pageNumber:
          description: The current page number
          type: integer
          minimum: 1
        pageSize:
          description: Number of records in the current page
          type: integer
          minimum: 1
        totalPages:
          description: Total number of pages available for response
          type: integer
          minimum: 0
        totalRecords:
          description: Total number of records across all pages
          type: integer
          minimum: 0
    insurancePolicyIds:
      description: >-
        List of insurance policy identifiers that have been selected and authorized by the User when consenting to
        insurance policy access. The LFI **MUST** patch these values onto the consent after the User has selected them,
        to ensure the policies are correctly retrieved based on the consent in operations such as `get
        /life-insurance-policies`.
      type: array
      minItems: 1
      items:
        description: >-
          An insurance policy identifier, set by the LFI to uniquely identify a given policy when addressed through an
          API operation e.g. `get /life-insurance-policies/{insurancePolicyId}`. For the sake of clarify this is **NOT**
          the policy reference understood by the User.
        type: string
    AEInsurance.AEInsuranceQuoteEventBrokerInstructions:
      type: object
      minProperties: 1
      properties:
        ActionRequired:
          type: string
          minLength: 1
          maxLength: 1000
          description: Free-text description that provides confirmation of the action required by the Broker.
        Reason:
          allOf:
            - $ref: '#/components/schemas/AEInsurance.AEInsuranceQuoteStatusUpdateReason'
          description: Free-text explanation of why the action must be performed by the Broker.
        Url:
          type: string
          format: uri
          description: >-
            URL provided by the LFI for the Broker to collect a one-off premium payment or set up recurring premium
            payments.
    AEInsurance.AEInsuranceQuoteStatusUpdateReason:
      type: string
      minLength: 1
      maxLength: 1000
    AEInsurance.AEDocumentProperties:
      type: object
      required:
        - Type
        - FileName
        - ContentType
        - Content
        - HashType
        - Hash
      properties:
        Type:
          type: string
          description: The type of document that has been provided.  For example, Policy Booklet, Terms & Conditions
        FileName:
          type: string
          description: >-
            Original file name for operator reference (no paths). Should include  a suitable extension (e.g.,
            policy.pdf, terms.pdf).
        ContentType:
          type: string
          enum:
            - application/pdf
            - image/jpeg
            - image/png
          description: >-
            Content (MIME) type of the document, using IANA-registered media types, and based on types supported in the
            Open Finance Framework.
        Content:
          type: string
          format: base64
          description: >-
            Base64-encoded representation of the document content.  The encoded string must be generated from the raw
            file bytes and decoded by the LFI to restore the original file.
        HashType:
          type: string
          enum:
            - SHA256
          description: Approach used to create checksum or hash of the file. SHA256 is supported.
        Hash:
          type: string
          description: >-
            Checksum of the original file bytes created using the method indicated by `HashType`. Required to enable
            integrity verification by comparing with the hash or checksum calculated on the decoded file.
        AdditionalInformation:
          type: string
          maxLength: 1000
          description: Optional free text notes providing context on the document.
    AEInsurance.AEInsuranceEmirate:
      type: string
      enum:
        - AbuDhabi
        - Ajman
        - Dubai
        - Fujairah
        - RasAlKhaimah
        - Sharjah
        - UmmAlQuwain
    AEInsurance.AEInsuranceQuoteEventCompletedStatus:
      title: Completed Status
      type: object
      required:
        - QuoteStatus
        - PolicyTerm
        - Premium
        - CustomerPaidInFull
        - PolicyCountrySubDivision
      properties:
        QuoteStatus:
          type: string
          enum:
            - Completed
          description: Completed status.
        PolicyStartDate:
          type: string
          format: date
          description: Policy start date
        PolicyEndDate:
          type: string
          format: date
          description: Policy end date
        PolicyTerm:
          type: string
          pattern: ^P(\d+Y)?(\d+M)?$
          format: duration
          description: The insurance policy term in years and months, using ISO 8601 compatible duration format
          example: P2Y3M
        Premium:
          type: object
          properties:
            OneYearPremiumExcludingVAT:
              allOf:
                - $ref: '#/components/schemas/AEInsurance.AEActiveCurrencyAmount'
              description: >-
                The details of the final insurance premium, reflecting the total value of premiums excluding VAT payable
                either annually or over the life of the policy when the coverage period is less than one year.
            VATAmount:
              allOf:
                - $ref: '#/components/schemas/AEInsurance.AEActiveCurrencyAmount'
              description: The Premium VAT amount.
            TotalOneYearPremium:
              allOf:
                - $ref: '#/components/schemas/AEInsurance.AEActiveCurrencyAmount'
              description: >-
                The details of the final insurance premium, reflecting the total value of premiums including VAT payable
                either annually or over the life of the policy when the coverage period is less than one year.
            TotalPolicyPremium:
              allOf:
                - $ref: '#/components/schemas/AEInsurance.AEActiveCurrencyAmount'
              description: The total value of premiums, including VAT, payable over the life of the policy.
          required:
            - OneYearPremiumExcludingVAT
            - VATAmount
            - TotalOneYearPremium
          description: Details for the policy premium.
        CustomerSalary:
          type: string
          enum:
            - Under4K
            - Over4K
          description: >-
            Confirmation whether the customer monthly salary is less than or greater than AED 4,000 each month. Required
            for Health Insurance.
        Commission:
          type: object
          properties:
            CommissionAmount:
              allOf:
                - $ref: '#/components/schemas/AEInsurance.AEActiveCurrencyAmount'
              description: >-
                The total monetary value of the commission paid to the TPP if the User proceeds with the quote
                application and purchases the policy based on the quote information provided.
            PaymentMethod:
              type: string
              enum:
                - DirectToTPP
                - ThroughAPIHub
              description: >-
                The method to be used to pay the commission to the TPP if the User elects to proceed with the
                application and successfully purchases the policy.
          required:
            - PaymentMethod
          description: Commission amount, where the LFI is responsible for calculating the value.
        Documents:
          type: array
          items:
            $ref: '#/components/schemas/AEInsurance.AEDocumentProperties'
          minItems: 1
          description: Policy documents to be issued to the Customer via the TPP.
        CustomerPaidInFull:
          type: boolean
          description: Indicates the Customer has paid for the policy in full.
        PolicyCountrySubDivision:
          allOf:
            - $ref: '#/components/schemas/AEInsurance.AEInsuranceEmirate'
          description: The Emirate state where the policy was issued.
      description: Quote has been Completed.
    AEInsurance.AEActiveCurrencyAmount:
      type: object
      required:
        - Currency
        - Amount
      properties:
        Currency:
          $ref: '#/components/schemas/AEInsurance.AEActiveOrHistoricCurrencyCode'
        Amount:
          $ref: '#/components/schemas/AEInsurance.AEActiveOrHistoricAmount'
      description: The Currency and Amount relating to the Payment, Refund or Request to Pay
    AEInsurance.AEActiveOrHistoricAmount:
      type: string
      pattern: ^\d{1,16}\.\d{2}$
      description: >-
        A number of monetary units specified in an active currency where the unit of currency is explicit and compliant
        with ISO 4217.
      example: '100.00'
    AEInsurance.AEActiveOrHistoricCurrencyCode:
      type: string
      pattern: ^[A-Z]{3,3}$
      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'.
      example: AED
    AEInsurance.AEInsuranceQuoteNegativeTerminalStatusCodes:
      type: string
      enum:
        - Expired
        - Rejected
        - CustomerCancelled
        - LFICancelled
    AEInsurance.AEInsuranceEventCompletionPendingStatusCodes:
      type: string
      enum:
        - ApplicationPending
        - ApplicationApproved
        - PaymentRequired
        - PolicyIssued
    AEInsurance.AEInsuranceQuoteEventTerminalStatus:
      title: Terminal Status
      type: object
      required:
        - QuoteStatus
      properties:
        QuoteStatus:
          allOf:
            - $ref: '#/components/schemas/AEInsurance.AEInsuranceQuoteNegativeTerminalStatusCodes'
          description: Terminal quote status.
        Reason:
          allOf:
            - $ref: '#/components/schemas/AEInsurance.AEInsuranceQuoteStatusUpdateReason'
          description: Optional explanation for the unsuccessful completion of the quote.
      description: Quote status updates indicating a terminal state.
    AEInsurance.AEInsuranceQuoteEventPendingCompletionStatus:
      title: Pending Completion Status
      type: object
      required:
        - QuoteStatus
      properties:
        QuoteStatus:
          allOf:
            - $ref: '#/components/schemas/AEInsurance.AEInsuranceEventCompletionPendingStatusCodes'
          description: Pending completion quote status.
        BrokerInstructions:
          type: array
          items:
            $ref: '#/components/schemas/AEInsurance.AEInsuranceQuoteEventBrokerInstructions'
          minItems: 1
          description: Instructions and actions required by the Broker to allow the application to proceed.
        Documents:
          type: array
          items:
            $ref: '#/components/schemas/AEInsurance.AEDocumentProperties'
          minItems: 1
          description: Policy documents to be issued to the Customer via the TPP.
        InsurancePolicyId:
          allOf:
            - $ref: '#/components/schemas/AEInsuranceResourceIdentifierType'
          description: Unique policy identifier for a given policy. Optionally provided when the `QuoteStatus` is 
            `PolicyIssued`
        ConfirmedPolicyStartDate:
          $ref: '#/components/schemas/AEInsurancePolicyConfirmedPolicyStartDateStartDate1Type'
        ConfirmedPolicyEndDate:
          $ref: '#/components/schemas/AEInsurancePolicyConfirmedPolicyEndDateStartDate1Type'
      description: Quote status updates indicating a pending state, with optional instructions for TPPs.
    AEInsurance.AEInsuranceQuoteEventAvailableStatus:
      title: Available Status
      type: object
      required:
        - QuoteStatus
      properties:
        QuoteStatus:
          description: Available quote status.
          type: string
          enum:
            - Available

  # PII properties split between Domestic and International, as described by v2.1 of the standards

    AEBankServiceInitiationRichAuthorizationRequests.AEDomesticPaymentPII:
      type: object
      properties:
        Initiation:
          type: object
          properties:
            DebtorAccount:
              $ref: >-
                #/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEBankServiceInitiationDebtorAccountProperties
            Creditor:
              type: array
              items:
                $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEDomesticCreditor'
              minItems: 1
              description: List of Creditors for a domestic payment consent.
          description: >-
            The Initiation payload is sent by the initiating party to the LFI. It is used to request movement of funds
            from the Debtor Account to a Creditor for one-or-more domestic payments.
          additionalProperties: false
        Risk:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AERisk'
      description: Elements of Personal Identifiable Information for a Domestic Payment.
      additionalProperties: false
      title: Domestic Payment PII Schema Object
    AEBankServiceInitiationRichAuthorizationRequests.AEBankServiceInitiationDebtorAccountProperties:
      type: object
      required:
        - SchemeName
        - Identification
      properties:
        SchemeName:
          type: string
          enum:
            - IBAN
          description: Scheme name for the Debtor Account. The Debtor Account must be an IBAN.
        Identification:
          type: string
          minLength: 1
          description: The Identification of the Debtor Account.
        Name:
          type: object
          properties:
            en:
              type: string
              maxLength: 70
            ar:
              type: string
              maxLength: 70
          minProperties: 1
          description: The Debtor Account, which can be provided in both English and Arabic. Omitted if not held by the TPP.
          additionalProperties: false
      description: >-
        Details of the Debtor Account when provided at the TPP. Omitted if not available at the TPP or the User chooses
        to select the Debtor Account at the LFI.
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AEDomesticCreditor:
      type: object
      required:
        - CreditorAccount
      properties:
        CreditorAgent:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AECreditorAgentProperties'
        Creditor:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AECreditorProperties'
        CreditorAccount:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEDomesticCreditorAccountProperties'
        ConfirmationOfPayeeResponse:
          type: string
          pattern: ^.+\..+\..+$
          description: |-
            Response from Confirmation of Payee operation, when executed for the Creditor Account.

            This is JSON Web Signature returned by the Payee Confirmation operation at the Confirmation of Payee API.

            The value must be the full JWS string, including the header and signature, without decoding to an object.

            If Confirmation of Payee is not performed this property can be omitted
      description: Identification elements for a Creditor for a domestic payment instruction.
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AECreditorAgentProperties:
      type: object
      required:
        - SchemeName
        - Identification
      properties:
        SchemeName:
          type: string
          enum:
            - BICFI
            - Other
        Identification:
          type: string
        Name:
          type: string
          minLength: 1
          maxLength: 140
        PostalAddress:
          $ref: '#/components/schemas/AEAddress'
      description: >-
        Properties of the Creditor Agent, which provides information on the Financial Institution that holds the
        Creditor Account.
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AECreditorProperties:
      type: object
      properties:
        Name:
          type: string
          minLength: 1
          maxLength: 140
        PostalAddress:
          $ref: '#/components/schemas/AEAddress'
      description: Party to which an amount of money is due.
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AEDomesticCreditorAccountProperties:
      type: object
      required:
        - SchemeName
        - Identification
        - Name
      properties:
        SchemeName:
          type: string
          enum:
            - IBAN
          description: Domestic payment scheme, restricted to `IBAN`
        Identification:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEIdentification'
        Name:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEName'
        TradingName:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AETradingName'
        Type:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AECreditorAccountTypeCodes'
      description: Unambiguous identification of the account of the creditor to which a credit entry will be posted.
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AEIdentification:
      type: string
      minLength: 1
      description: |-
        Identification for the account assigned by the LFI based on the Account Scheme Name.
        This identification is known by the User account owner.
    AEBankServiceInitiationRichAuthorizationRequests.AEName:
      type: object
      properties:
        en:
          type: string
          maxLength: 70
          description: English value of the string
        ar:
          type: string
          maxLength: 70
          description: Arabic value of the string
      description: The Account Holder Name is the name or names of the Account owner(s) represented at the account level
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AETradingName:
      type: object
      properties:
        en:
          type: string
          maxLength: 70
          description: English value of the string
        ar:
          type: string
          maxLength: 70
          description: Arabic value of the string
      description: |-
        The Trading Brand Name (if applicable) for the Creditor.
        Applicable to Payments.
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AECreditorAccountTypeCodes:
      type: string
      enum:
        - Individual
        - Merchant
        - Business
        - Charity
        - GovernmentBody
        - Other
      description: >-
        The Creditor (Payee) Type, based on an allowed list. This value is populated by TPPs to inform the User of the
        type of Creditor being authorized, which facilitates providing information during the Consent journey.
    AEBankServiceInitiationRichAuthorizationRequests.AERisk:
      type: object
      properties:
        DebtorIndicators:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEDebtorIndicators'
        DestinationDeliveryAddress:
          type: object
          properties:
            RecipientType:
              type: string
              enum:
                - Individual
                - Corporate
            RecipientName:
              type: object
              properties:
                en:
                  type: string
                ar:
                  type: string
              additionalProperties: false
            NationalAddress:
              $ref: '#/components/schemas/AEAddress'
          description: Destination Delivery Address
          additionalProperties: false
        TransactionIndicators:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AETransactionIndicators'
        CreditorIndicators:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AECreditorIndicators'
      description: >-
        The Risk section is sent by the TPP to the LFI. It is used to specify additional details for risk/fraud scoring
        regarding Payments.
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AEDebtorIndicators:
      type: object
      properties:
        Authentication:
          type: object
          properties:
            AuthenticationChannel:
              type: string
              enum:
                - App
                - Web
            PossessionFactor:
              type: object
              properties:
                IsUsed:
                  type: boolean
                Type:
                  type: string
                  enum:
                    - FIDO2SecurityKey
                    - Passkey
                    - OTPDevice
                    - OTPApp
                    - SMSOTP
                    - EmailOTP
                    - PushNotification
                    - WebauthnToken
                    - SecureEnclaveKey
                    - HardwareOTPKey
                    - TrustedDevice
                    - Other
              additionalProperties: false
            KnowledgeFactor:
              type: object
              properties:
                IsUsed:
                  type: boolean
                Type:
                  type: string
                  enum:
                    - PIN
                    - Password
                    - SecurityQuestion
                    - SMSOTP
                    - EmailOTP
                    - OTPPush
                    - Other
              additionalProperties: false
            InherenceFactor:
              type: object
              properties:
                IsUsed:
                  type: boolean
                Type:
                  type: string
                  enum:
                    - Biometric
                    - Fingerprint
                    - FaceRecognition
                    - IrisScan
                    - VoiceRecognition
                    - FIDOBiometric
                    - DeviceBiometrics
                    - Other
              additionalProperties: false
            ChallengeOutcome:
              type: string
              enum:
                - Pass
                - Fail
                - NotPerformed
            AuthenticationFlow:
              type: string
              enum:
                - MFA
                - Other
            AuthenticationValue:
              type: string
            ChallengeDateTime:
              type: string
              format: date-time
          description: The authentication method used by the User to access their account with the TPP
          additionalProperties: false
        UserName:
          type: object
          properties:
            en:
              type: string
            ar:
              type: string
          description: The Name of the User initiating the Payment
          additionalProperties: false
        GeoLocation:
          type: object
          properties:
            Latitude:
              type: string
            Longitude:
              type: string
          required:
            - Latitude
            - Longitude
          description: GPS to identify and track the whereabouts of the connected electronic device.
          additionalProperties: false
        DeviceInformation:
          type: object
          properties:
            DeviceId:
              type: string
            AlternativeDeviceId:
              type: string
            DeviceOperatingSystem:
              type: string
            DeviceOperatingSystemVersion:
              type: string
            DeviceBindingId:
              type: string
            LastBindingDateTime:
              type: string
              format: date-time
            BindingDuration:
              type: string
              format: duration
            BindingStatus:
              type: string
              enum:
                - Active
                - Expired
                - Revoked
                - Suspended
            DeviceType:
              type: string
              enum:
                - Mobile
                - Desktop
                - Tablet
                - Wearable
                - Other
            DeviceManufacturer:
              type: object
              properties:
                Model:
                  type: string
                  maxLength: 50
                Manufacturer:
                  type: string
                  maxLength: 50
              additionalProperties: false
            DeviceLanguage:
              type: string
            DeviceLocalDateTime:
              type: string
            ConnectionType:
              type: string
              enum:
                - WiFi
                - Cellular
                - Other
            ScreenInformation:
              type: object
              properties:
                PixelDensity:
                  type: number
                Orientation:
                  type: string
                  enum:
                    - Portrait
                    - Landscape
              additionalProperties: false
            BatteryStatus:
              type: object
              properties:
                Level:
                  type: number
                  minimum: 0
                  maximum: 100
                IsCharging:
                  type: boolean
              additionalProperties: false
            TouchSupport:
              type: object
              properties:
                Supported:
                  type: boolean
                MaxTouchPoints:
                  type: integer
                  minimum: 0
              additionalProperties: false
            MotionSensors:
              type: object
              properties:
                Status:
                  type: string
                  enum:
                    - InMotion
                    - Stationary
                Accelerometer:
                  type: boolean
                Gyroscope:
                  type: boolean
              additionalProperties: false
            DeviceEnvironmentContext:
              type: array
              items:
                type: string
                enum:
                  - VPNDetected
                  - EmulatorDetected
          description: Detailed device information
          additionalProperties: false
        BiometricCapabilities:
          type: object
          properties:
            SupportsBiometric:
              type: boolean
            BiometricTypes:
              type: array
              items:
                type: string
                enum:
                  - Fingerprint
                  - FacialRecognition
                  - Iris
                  - VoicePrint
                  - Other
          description: Device biometric capabilities
          additionalProperties: false
        AppInformation:
          type: object
          properties:
            AppVersion:
              type: string
            PackageName:
              type: string
            BuildNumber:
              type: string
          description: Mobile application specific information
          additionalProperties: false
        BrowserInformation:
          type: object
          properties:
            UserAgent:
              type: string
            IsCookiesEnabled:
              type: boolean
            AvailableFonts:
              type: array
              items:
                type: string
            Plugins:
              type: array
              items:
                type: string
            PixelRatio:
              type: number
          description: Browser-specific information
          additionalProperties: false
        UserBehavior:
          type: object
          properties:
            ScrollBehavior:
              type: object
              properties:
                Direction:
                  type: string
                  enum:
                    - Up
                    - Down
                    - Both
                Speed:
                  type: number
                Frequency:
                  type: number
              additionalProperties: false
          description: User behavior indicators
          additionalProperties: false
        AccountRiskIndicators:
          type: object
          properties:
            UserOnboardingDateTime:
              type: string
              format: date-time
            LastAccountChangeDate:
              type: string
              format: date
            LastPasswordChangeDate:
              type: string
              format: date
            SuspiciousActivity:
              type: string
              enum:
                - NoSuspiciousActivity
                - SuspiciousActivityDetected
            TransactionHistory:
              type: object
              properties:
                LastDay:
                  type: integer
                  minimum: 0
                LastYear:
                  type: integer
                  minimum: 0
              additionalProperties: false
          description: Risk indicators related to the account
          additionalProperties: false
        SupplementaryData:
          type: object
          description: |-
            Additional information that cannot be captured in the structured fields and/or any other specific block This
            may include information that is not available in the structured fields, such as a user's behavioural data
            like their typing speed and typing patterns.
      description: Debtor (User) Indicators
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AETransactionIndicators:
      type: object
      properties:
        IsCustomerPresent:
          type: boolean
          description: This field differentiates between automatic and manual payment initiation.
        IsContractPresent:
          type: boolean
          description: Indicates if the Creditor has a contractual relationship with the TPP.
        Channel:
          type: string
          enum:
            - Web
            - Mobile
          description: Where the payment has been initiated from.
        ChannelType:
          type: string
          enum:
            - ECommerce
            - InStore
            - InApp
            - Telephone
            - Mail
            - RecurringPayment
            - Other
          description: The channel through which the transaction is being conducted
        SubChannelType:
          type: string
          enum:
            - WebBrowser
            - MobileApp
            - SmartTV
            - WearableDevice
            - POSTerminal
            - ATM
            - KioskTerminal
            - Other
          description: More specific classification of the transaction channel
        PaymentProcess:
          type: object
          properties:
            TotalDuration:
              type: integer
              minimum: 0
            CurrentSessionAttempts:
              type: integer
              minimum: 1
            CurrentSessionFailedAttempts:
              type: integer
              minimum: 0
            Last24HourAttempts:
              type: integer
              minimum: 0
            Last24HourFailedAttempts:
              type: integer
              minimum: 0
          description: Metrics related to the payment process duration and attempts
          additionalProperties: false
        MerchantRisk:
          type: object
          properties:
            DeliveryTimeframe:
              type: string
              enum:
                - ElectronicDelivery
                - SameDayShipping
                - OvernightShipping
                - MoreThan1DayShipping
            ReorderItemsIndicator:
              type: string
              enum:
                - FirstTimeOrder
                - Reorder
            PreOrderPurchaseIndicator:
              type: string
              enum:
                - MerchandiseAvailable
                - FutureAvailability
            IsGiftCardPurchase:
              type: boolean
            IsDeliveryAddressMatchesBilling:
              type: boolean
            AddressMatchLevel:
              type: string
              enum:
                - FullMatch
                - PartialMatch
                - NoMatch
                - NotApplicable
          description: Risk indicator details provided by the merchant
          additionalProperties: false
        SupplementaryData:
          type: object
          description: Additional information that cannot be captured in the structured fields and/or any other specific block
      description: Transaction Indicators
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AECreditorIndicators:
      type: object
      properties:
        AccountType:
          type: string
          enum:
            - Retail
            - SME
            - Corporate
          description: Specifies the type of account (Retail, SME or Corporate).
        IsCreditorPrePopulated:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEIsCreditorPrePopulated'
        TradingName:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AETradingName'
        IsVerifiedByTPP:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEIsVerifiedbyTPP'
        AdditionalAccountHolderIdentifiers:
          $ref: '#/components/schemas/AEAdditionalAccountHolderIdentifiers'
        MerchantDetails:
          type: object
          properties:
            MerchantId:
              type: string
              minLength: 8
              maxLength: 20
            MerchantName:
              type: string
              minLength: 1
              maxLength: 350
            MerchantSICCode:
              type: string
              minLength: 3
              maxLength: 4
            MerchantCategoryCode:
              type: string
              minLength: 3
              maxLength: 4
          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
          additionalProperties: false
        IsCreditorConfirmed:
          type: boolean
          description: Creditor account details have been confirmed successfully using Confirmation of Payee
        SupplementaryData:
          type: object
          description: Additional information that cannot be captured in the structured fields and/or any other specific block
      description: Creditor Indicators
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AEIsCreditorPrePopulated:
      type: boolean
      description: Is Creditor populated
    AEBankServiceInitiationRichAuthorizationRequests.AEIsVerifiedbyTPP:
      type: boolean
      description: The TPP has onboarded the Creditor
    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalPaymentPII:
      type: object
      properties:
        Initiation:
          type: object
          properties:
            DebtorAccount:
              $ref: >-
                #/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEBankServiceInitiationDebtorAccountProperties
            Creditor:
              type: array
              items:
                $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditor'
              minItems: 1
              description: >-
                List of Creditors for an international payment consent. Please note that the `ConfirmationOfPayee`
                property is **excluded** from this object as Confirmation of Payee is not expected for international
                payments.
          description: >-
            The Initiation payload is sent by the initiating party to the LFI. It is used to request movement of funds
            from the Debtor Account to a Creditor for one-or-more international payments.
          additionalProperties: false
        Risk:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AERisk'
      description: Elements of Personal Identifiable Information for an International Payment.
      additionalProperties: false
      title: International Payment PII Schema Object
    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditor:
      type: object
      required:
        - CreditorAccount
      properties:
        CreditorAgent:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorAgentProperties'
        Creditor:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorParty'
        CreditorAccount:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorAccountProperties'
      description: >-
        Identification elements for a Creditor for an international payment instruction. Please note that Confirmation
        of Payee is **NOT** required or expected for International Payments, as non-domestic Creditor accounts are not
        supported.
      additionalProperties: false

    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorParty:
      oneOf:
        - $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalIndividualCreditor'
        - $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalOrganisationCreditor'
      discriminator:
        propertyName: IdentityType
        mapping:
          Individual: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalIndividualCreditor'
          Organization: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalOrganisationCreditor'
      description: >-
        Party to which an amount of money is due, for an international payment. The Creditor is either an Individual
        (natural person) or an Organization, selected by the `IdentityType` discriminator.

    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorName:
      type: object
      properties:
        en:
          type: string
          minLength: 1
          maxLength: 70
          description: English value of the Creditor name.
        ar:
          type: string
          minLength: 1
          maxLength: 70
          description: Arabic value of the Creditor name.
        ls:
          type: string
          minLength: 1
          maxLength: 70
          description: Local script value of the Creditor name.
      description: The Creditor name, represented in English (`en`), Arabic (`ar`) and/or local script (`ls`).
      additionalProperties: false

    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorNameComponent:
      type: object
      properties:
        en:
          type: string
          minLength: 1
          maxLength: 35
          description: English value of the name component.
        ar:
          type: string
          minLength: 1
          maxLength: 35
          description: Arabic value of the name component.
        ls:
          type: string
          minLength: 1
          maxLength: 35
          description: Local script value of the name component.
      description: >-
        A component of the Creditor's name (e.g. first, middle or last name), represented in English (`en`),
        Arabic (`ar`) and/or local script (`ls`).
      additionalProperties: false

    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalIndividualCreditor:
      type: object
      required:
        - IdentityType
      properties:
        IdentityType:
          type: string
          enum:
            - Individual
          description: Discriminator indicating the Creditor is an individual (natural person).
        Name:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorName'
        FirstName:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorNameComponent'
        MiddleName:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorNameComponent'
        LastName:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorNameComponent'
        RelationshipToSender:
          type: string
          enum:
            - Self
            - Spouse
            - Parent
            - Child
            - Sibling
            - Relative
            - Friend
            - Dependent
            - Employer
            - Employee
            - Business
            - Other
          description: The Creditor's relationship to the sender (Debtor).
        DateOfBirth:
          type: string
          format: date
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: The Creditor's date of birth, in YYYY-MM-DD format.
        Occupation:
          type: string
          minLength: 1
          maxLength: 70
          description: The Creditor's occupation. Free-text, as values are driven by varying regulator requirements.
        Nationality:
          type: string
          pattern: ^[A-Z]{2}$
          description: The Creditor's nationality, as an ISO 3166-1 alpha-2 country code.
        Gender:
          type: string
          enum:
            - Male
            - Female
            - Other
          description: The Creditor's gender.
        CountryOfBirth:
          type: string
          pattern: ^[A-Z]{2}$
          description: The Creditor's country of birth, as an ISO 3166-1 alpha-2 country code.
        SourceOfIncome:
          type: string
          minLength: 1
          maxLength: 256
          description: The Creditor's source of income.
        SourceOfFunds:
          type: string
          minLength: 1
          maxLength: 256
          description: >-
            The Creditor's source of funds. Free-text; populated where Enhanced Due Diligence (e.g. by a
            correspondent bank) requires further information about the transaction.
        MobileNumber:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          description: The Creditor's mobile number, in E.164 format.
        Email:
          type: string
          pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
          description: The Creditor's email address.
        PostalAddress:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalAddress'
        Evidence:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorEvidence'
      description: Identification elements for an individual (natural person) international Creditor.
      additionalProperties: false

    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalOrganisationCreditor:
      type: object
      required:
        - IdentityType
      properties:
        IdentityType:
          type: string
          enum:
            - Organization
          description: Discriminator indicating the Creditor is an organisation.
        Name:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorName'
        AnyBIC:
          type: string
          pattern: ^[A-Z]{6}[A-Z0-9]{2}(?:[A-Z0-9]{3})?$
          description: The organisation's Business Identifier Code (BIC), per ISO 9362.
        LEI:
          type: string
          pattern: ^[A-Z0-9]{18}[0-9]{2}$
          description: The organisation's Legal Entity Identifier (LEI), per ISO 17442.
        Identification:
          type: string
          minLength: 1
          maxLength: 35
          description: >-
            Other organisation identifier, used in the edge cases where neither `AnyBIC` nor `LEI` is available.
            The identification scheme is given in `SchemeName`.
        SchemeName:
          type: string
          minLength: 1
          maxLength: 35
          description: >-
            Name of the identification scheme used for `Identification` (e.g. TradeLicence, TaxID, DUNS). Free-text,
            as there is no definitive scheme list for these edge cases.
        MobileNumber:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          description: The Creditor's mobile number, in E.164 format.
        Email:
          type: string
          pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
          description: The Creditor's email address.
        PostalAddress:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalAddress'
      description: Identification elements for an organisation international Creditor.
      additionalProperties: false

    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorEvidence:
      type: array
      minItems: 1
      description: >-
        Identity documents evidencing the Creditor's identity. Applicable to individual Creditors.
      items:
        type: object
        properties:
          Type:
            type: string
            enum:
              - Passport
              - DrivingPermit
              - IdCard
              - ResidencePermit
            description: The type of identity document.
          DocumentNumber:
            type: string
            minLength: 1
            maxLength: 35
            description: The document number.
          PersonalNumber:
            type: string
            minLength: 1
            maxLength: 35
            description: A personal number contained in the document.
          SerialNumber:
            type: string
            minLength: 1
            maxLength: 35
            description: A serial number contained in the document.
          CalendarType:
            type: string
            enum:
              - IslamicCalendar
              - GregorianCalendar
            description: The calendar used for the document's issuance and expiry dates.
          DateOfIssuance:
            type: string
            format: date
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: The date the document was issued, in YYYY-MM-DD format.
          DateOfExpiry:
            type: string
            format: date
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: The date the document expires, in YYYY-MM-DD format.
          Issuer:
            type: object
            required:
              - Name
              - CountryCode
              - Jurisdiction
            properties:
              Name:
                type: string
                minLength: 1
                maxLength: 140
                description: Name of the authority that issued the document.
              CountryCode:
                type: string
                pattern: ^[A-Z]{2}$
                description: Country that issued the document, as an ISO 3166-1 alpha-2 country code.
              Jurisdiction:
                type: string
                minLength: 1
                maxLength: 140
                description: The jurisdiction under which the document was issued.
            description: >-
              The authority that issued the document. When the `Issuer` object is present, `Name`, `CountryCode` and
              `Jurisdiction` are mandatory.
            additionalProperties: false
        additionalProperties: false

    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorAgentProperties:
      type: object
      required:
        - SchemeName
        - Identification
      properties:
        SchemeName:
          type: string
          description: >
            The identification scheme for uniquely identifying the Agent.

            * BICFI: The BIC/SWIFT Code

            * Other: Identifier based on non-SWIFT payment system or local market scheme.
          enum:
            - BICFI
            - Other
        Identification:
          description: Identifier that can be the BIC/SWIFT code or target payment scheme identifier.
          type: string
        Name:
          description: Name by which an agent is known and which is usually used to identify that agent.
          type: string
          minLength: 1
          maxLength: 140
        PostalAddress:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalAddress'
        Branch:
          type: object
          required:
            - Identification
          properties:
            Identification:
              type: string
              minLength: 1
              maxLength: 35
              description: Identification of the specific branch of the financial institution.
            Name:
              type: string
              minLength: 1
              maxLength: 140
              description: Name of the specific branch of the financial institution.
          description: >-
            The specific branch of the financial institution that holds the Creditor Account. When the `Branch`
            object is present, `Identification` is mandatory.
          additionalProperties: false
      description: >-
        Properties of the Creditor Agent for an international payment, which provides information on the Financial
        Institution that holds the Creditor Account.
      additionalProperties: false

    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalAddress:
      description: >-
        One-or-more addresses related to an international Creditor or Creditor Agent, based on the ISO 20022
        `PostalAddress27` definition and extended for SWIFT SR2026.
      type: array
      minItems: 1
      items:
        type: object
        required:
          - AddressType
          - AddressLine
          - TownName
          - Country
        properties:
          AddressType:
            description: The type of address.
            type: string
            enum:
              - Billing
              - Business
              - Correspondence
              - DeliveryTo
              - MailTo
              - POBox
              - Postal
              - Permanent
              - Residential
              - Statement
              - Other
          Department:
            description: Identification of a division of a large organisation or building.
            type: string
            minLength: 1
            maxLength: 70
          SubDepartment:
            description: Identification of a sub-division of a large organisation or building.
            type: string
            minLength: 1
            maxLength: 70
          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
          Room:
            description: Building room number.
            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
          PostBox:
            description: The P.O. Box number assigned to the recipient for mail delivery.
            type: string
            minLength: 1
            maxLength: 16
          PostCode:
            description: Identifier consisting of a group of letters and/or numbers added to a postal address.
            type: string
            minLength: 1
            maxLength: 16
          StreetName:
            description: The name of the street or road where the property is located.
            type: string
            minLength: 1
            maxLength: 140
          TownLocationName:
            description: Specific location name within the town.
            type: string
            minLength: 1
            maxLength: 70
          TownName:
            description: Name of a built-up area, such as a town or city.
            type: string
            minLength: 1
            maxLength: 70
          DistrictName:
            description: The district, community, or neighbourhood where the property is located.
            type: string
            minLength: 1
            maxLength: 140
          CountrySubDivision:
            description: Country subdivision, such as state or province. Where the address is in the UAE this is the
              Emirate where the address is registered.
            anyOf:
              - type: string
                enum:
                - AbuDhabi
                - Ajman
                - Dubai
                - Fujairah
                - RasAlKhaimah
                - Sharjah
                - UmmAlQuwain
              - type: string
          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
    AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditorAccountProperties:
      type: object
      required:
        - SchemeName
        - Identification
        - Name
      properties:
        SchemeName:
          $ref: >-
            #/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AECreditorExternalAccountIdentificationCode
        Identification:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEIdentification'
        Name:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEName'
        TradingName:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AETradingName'
        Type:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AECreditorAccountTypeCodes'
        AccountType:
          type: string
          enum:
            - Savings
            - Current
            - Checking
            - Prepaid
          description: >-
            The type of the Creditor account. This is distinct from `Type`, which classifies the payee segment
            (e.g. Individual, Merchant).
      description: Unambiguous identification of the account of the creditor to which a credit entry will be posted.
      additionalProperties: false
    AEBankServiceInitiationRichAuthorizationRequests.AECreditorExternalAccountIdentificationCode:
      type: string
      enum:
        - IBAN
        - AccountNumber
      description: >-
        Name of the identification scheme, in a coded form as published in an external list. For international payments
        TPP may use `IBAN`, but must use `AccountNumber` where a local scheme is used to identify the Creditor Account.

    AEBankServiceInitiation.AEDomesticPaymentPIIProperties:
      title: Domestic Payment PII Schema Object
      type: object
      additionalProperties: false
      description: Elements of Personal Identifiable Information data
      properties:
        Initiation:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEDomesticCreditor'
        Risk:
          $ref: '#/components/schemas/AERisk'

    AEBankServiceInitiation.AEInternationalPaymentPIIProperties:
      title: International Payment PII Schema Object
      type: object
      properties:
        Initiation:
          $ref: '#/components/schemas/AEBankServiceInitiationRichAuthorizationRequests.AEInternationalCreditor'
        Risk:
          $ref: '#/components/schemas/AERisk'
      additionalProperties: false

    AEInsuranceResourceIdentifierType:
      type: string
      minLength: 1
      maxLength: 128
      description: |-
        Unique identifier for a given insurance policy. 

        A uuid v4 is recommended for consistency but not mandatory.

    AEInsurancePolicyConfirmedPolicyStartDateStartDate1Type:
      type: string
      format: date
      description: LFI confirmed or revised start date for policy plan at issuance. Optionally provided when 
        `QuoteStatus` is `PolicyIssued`.

    AEInsurancePolicyConfirmedPolicyEndDateStartDate1Type:
      type: string
      format: date
      description: LFI confirmed or revised end date for policy plan at issuance. Optionally provided when 
        `QuoteStatus` is `PolicyIssued`.

  parameters:
    consentId:
      name: consentId
      in: path
      schema:
        type: string
      required: true
      description: |
        Identifies the consent by an id
    id:
      name: id
      in: path
      schema:
        type: string
      required: true
      description: |
        Identifies the payment by an id
    userId:
      name: userId
      in: path
      schema:
        type: string
      required: true
      description: |
        Identifies the PSU associated with a consent.

        This should match up with the `psuIdentifier.userId` field.
    page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
      required: false
      description: |
        The page number to retrieve in a paginated response
    pageSize:
      name: pageSize
      in: query
      schema:
        type: integer
        minimum: 1
      required: false
      description: |
        The maximum rows to retrieve in a given page. Defaults to 25 if not specified.
    consentType:
      name: consentType
      in: query
      schema:
        type: string
      description: Consents of particular accountId
      required: false
    status:
      name: status
      in: query
      schema:
        type: string
      description: Status of the consent
      required: false
    logId:
      name: logId
      description: >-
        Unique identifier for a given log entry, which relates to the original unique identifier created for resource.
        For example, for an FX Quote this will be the `FxQuoteId` value.
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    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
  responses:
    noContentResponse:
      description: Indicates a successful operation. The response does not have a body.
