openapi: 3.0.1
info:
  title: Mojaloop SDK Outbound Scheme Adapter API
  description: |
    Specification for the Mojaloop SDK Scheme Adapter Outbound Transfers API

    This API can be used by DFSP backends to simplify the process of sending funds to other parties within a Mojaloop scheme.

    Please see other documentation on https://github.com/mojaloop/sdk-scheme-adapter for more information.

    **Note on terminology:** The term "Switch" is equal to the term "Hub", and the term "FSP" is equal to the term "DFSP".
  license:
    name: Apache License Version 2.0, January 2004
    url: https://github.com/mojaloop/documentation/blob/main/LICENSE.md
  version: 1.0.0
paths:
  /:
    get:
      summary: Health check endpoint
      description: This endpoint allows a user of the SDK scheme adapter to check the outbound transfers service is listening.
      tags:
        - Health
      responses:
        '200':
          description: Returns empty body if the scheme adapter outbound transfers service is running.
  /accounts:
    post:
      summary: Create accounts on the Account Lookup Service
      description: |-
        The HTTP request `POST /accounts` is used to create account information on the Account Lookup Service (ALS) regarding the provided list of identities.

        Caller DFSP is used as the account source FSP information
      tags:
        - Accounts
      requestBody:
        description: Identities list request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/accountsRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/accountsCreationCompleted'
        '400':
          $ref: '#/components/responses/accountsCreationError'
        '500':
          $ref: '#/components/responses/accountsCreationError'
        '504':
          $ref: '#/components/responses/accountsCreationTimeout'
  /bulkQuotes:
    post:
      summary: Request bulk quotes for the provided financial transactions
      description: |
        The HTTP request `POST /bulkQuotes` is used to request a bulk quote to fascilitate funds transfer from payer DFSP to payees' DFSP.
      tags:
        - BulkQuotes
      requestBody:
        description: Bulk quote request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bulkQuoteRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/bulkQuoteSuccess'
        '400':
          $ref: '#/components/responses/bulkQuoteBadRequest'
        '500':
          $ref: '#/components/responses/bulkQuoteServerError'
        '504':
          $ref: '#/components/responses/bulkQuoteTimeout'
  /bulkQuotes/{bulkQuoteId}:
    get:
      summary: Retrieves information for a specific bulk quote
      description: The HTTP request `GET /bulkQuotes/{bulktQuoteId}` is used to get information regarding a bulk quote created or requested earlier. The `{bulkQuoteId}` in the URI should contain the `bulkQuoteId` that was used for the creation of the bulk quote.
      tags:
        - BulkQuotes
      parameters:
        - $ref: '#/components/parameters/bulkQuoteId'
      responses:
        '200':
          description: Bulk quote information successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bulkQuoteStatusResponse'
        '500':
          description: An error occurred processing the bulk quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /bulkTransactions:
    post:
      summary: Sends money from one account to multiple accounts
      description: |
        The HTTP request `POST /bulkTransactions` is used to request the movement of funds from payer DFSP to payees' DFSP.
      tags:
        - BulkTransactions
      requestBody:
        description: Bulk transfer request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bulkTransactionRequest'
        required: true
      responses:
        '202':
          $ref: '#/components/responses/bulkTransactionAccepted'
        '400':
          $ref: '#/components/responses/bulkTransferBadRequest'
        '500':
          $ref: '#/components/responses/errorResponse'
  /bulkTransactions/{bulkTransactionId}:
    put:
      summary: Amends the bulk transaction request
      description: The HTTP request `PUT /bulkTransactions/{bulkTransactionId}` is used to amend information regarding a bulk transaction, i.e. when autoAcceptParty or autoAcceptQuote  is false then the payer need to provide confirmation to proceed with further processing of the request. The `{bulkTransactionId}` in the URI should contain the `bulkTransactionId` that was used for the creation of the bulk transfer.
      tags:
        - BulkTransactions
      parameters:
        - $ref: '#/components/parameters/bulkTransactionId'
      requestBody:
        description: Bulk transaction request body
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/bulkTransactionContinuationAcceptParty'
                - $ref: '#/components/schemas/bulkTransactionContinuationAcceptQuote'
        required: true
      responses:
        '202':
          description: Bulk transaction information successfully amended
        '400':
          $ref: '#/components/responses/bulkTransactionPutBadRequest'
        '500':
          description: An error occurred processing the bulk transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /bulkTransfers:
    post:
      summary: Sends money from one account to multiple accounts
      description: |
        The HTTP request `POST /bulkTransfers` is used to request the movement of funds from payer DFSP to payees' DFSP.
      tags:
        - BulkTransfers
      requestBody:
        description: Bulk transfer request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bulkTransferRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/bulkTransferSuccess'
        '400':
          $ref: '#/components/responses/bulkTransferBadRequest'
        '500':
          $ref: '#/components/responses/errorResponse'
  /bulkTransfers/{bulkTransferId}:
    get:
      summary: Retrieves information for a specific bulk transfer
      description: The HTTP request `GET /bulkTransfers/{bulkTransferId}` is used to get information regarding a bulk transfer created or requested earlier. The `{bulkTransferId}` in the URI should contain the `bulkTransferId` that was used for the creation of the bulk transfer.
      tags:
        - BulkTransfers
      parameters:
        - $ref: '#/components/parameters/bulkTransferId'
      responses:
        '200':
          description: Bulk transfer information successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bulkTransferStatusResponse'
        '500':
          description: An error occurred processing the bulk transfer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /parties/{Type}/{ID}:
    parameters:
      - $ref: '#/components/parameters/Type'
      - $ref: '#/components/parameters/ID'
    get:
      description: The HTTP request GET /parties// (or GET /parties///) is used to lookup information regarding the requested Party, defined by ,  and optionally (for example, GET /parties/MSISDN/123456789, or GET /parties/BUSINESS/shoecompany/employee1).
      summary: PartiesByTypeAndID
      tags:
        - parties
      operationId: PartiesByTypeAndID
      responses:
        '200':
          $ref: '#/components/responses/partiesByIdSuccess'
        '404':
          $ref: '#/components/responses/partiesByIdError404'
  /parties/{Type}/{ID}/{SubId}:
    parameters:
      - $ref: '#/components/parameters/Type'
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/SubId'
    get:
      description: The HTTP request GET /parties// (or GET /parties///) is used to lookup information regarding the requested Party, defined by ,  and optionally (for example, GET /parties/MSISDN/123456789, or GET /parties/BUSINESS/shoecompany/employee1).
      summary: PartiesSubIdByTypeAndID
      tags:
        - parties
      operationId: PartiesSubIdByTypeAndID
      responses:
        '200':
          $ref: '#/components/responses/partiesByIdSuccess'
        '404':
          $ref: '#/components/responses/partiesByIdError404'
  /quotes:
    post:
      summary: Quotes endpoint
      description: is used to request quotes from other DFSP
      tags:
        - quotes
      operationId: QuotesPost
      requestBody:
        description: Quotes request payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/simpleQuotesPostRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/quotesPostSuccess'
        '500':
          $ref: '#/components/responses/quotesServerError'
  /requestToPay:
    post:
      summary: Receiver requesting funds from Sender
      description: |
        The HTTP request `POST /requestToPay` is used to support Pull Funds pattern where in a receiver can request for funds from the Sender.
        The underlying API has two stages:

          1. Party lookup. This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement.
          2. Transaction Request. This request enables a Payee to request Payer to send electronic funds to the Payee.
      tags:
        - RequestToPay
      requestBody:
        description: RequestToPay request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestToPayRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/requestToPaySuccess'
  /requestToPay/{transactionRequestId}:
    put:
      summary: Continues a request funds from sender that has paused at the party resolution stage in order to accept or reject party information
      description: |
        The HTTP request `PUT /requestToPay/{transactionRequestId}` is used to continue a transfer initiated via the `POST /requestToPay` method that has halted after party lookup stage.
        The request body should contain the "acceptParty" property set to `true` as required to continue the transfer.
        See the description of the `POST /requestToPay` HTTP method for more information on modes of transfer.
      tags:
        - RequestToPay
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/transferContinuationAcceptParty'
      parameters:
        - $ref: '#/components/parameters/transactionRequestId'
      responses:
        '200':
          $ref: '#/components/responses/requestToPaySuccess'
        '500':
          $ref: '#/components/responses/transferServerError'
        '504':
          $ref: '#/components/responses/transferTimeout'
  /requestToPayTransfer:
    post:
      summary: Used to trigger funds from customer fsp account to merchant fsp account. This is a follow-up request to requestToPay.
      description: |
        The HTTP request `POST /requestToPayTransfer` is used to request the movement of funds from payer DFSP to payee DFSP.
        The underlying Mojaloop API has three stages for money transfer:

          1. Quotation. This facilitates the exchange of fee information and the construction of a cryptographic "contract" between payee and payer DFSPs before funds are transferred.
          2. Authorization. This facilitates getting OTP from payee DFSP.
          3. Transfer. The enactment of the previously agreed "contract"

        This method has several modes of operation.
        - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"` this method will terminate and return the quotation when it has been received from the payee DFSP.
          If the payee wished to proceed with the otp, then a subsequent `PUT /transfers/{transferId}` request (accepting the quote) is required to continue the operation.
          The scheme adapter will then proceed with the transfer state.

        - If the configuration variable `AUTO_ACCEPT_OTP` is set to `"false"` this method will terminate and return the otp when it has been received from the payee DFSP.
          If the payer wished to proceed with the transfer, then a subsequent `PUT /transfers/{transferId}` request (accepting the quote) is required to continue the operation.
          The scheme adapter will then proceed with the transfer state.

        If the configuration variables `AUTO_ACCEPT_PARTIES` and `AUTO_ACCEPT_QUOTES` are both set to `"true"` this method will block until all three transfer stages are complete. Upon completion it will return the entire set of transfer details received during the operation.

        Combinations of settings for `AUTO_ACCEPT...` configuration variables allow the scheme adapter user to decide which mode of operation best suits their use cases. i.e. the scheme adapter can be configured to "break" the three stage transfer at these points in order to execute backend logic such as party verification, quoted fees assessments etc...
      tags:
        - RequestToPayTransfer
      requestBody:
        description: Request To Pay Transfer request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestToPayTransferRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/requestToPayTransferSuccess'
        '400':
          $ref: '#/components/responses/requestToPayTransferBadRequest'
        '500':
          $ref: '#/components/responses/transferServerError'
        '504':
          $ref: '#/components/responses/transferTimeout'
  /requestToPayTransfer/{transactionRequestId}:
    put:
      summary: Continues a transfer that has paused at the otp stage in order to accept or reject quote
      description: |
        This request is used to continue a requestToPayTransfer initiated via the `POST /requestToPayTransfer` method that has halted after quotation stage and/or otp stage.

        The request body should contain either the "acceptOTP" or "acceptQuote" property set to `true` as required to continue the transfer.

        See the description of the `POST /requestToPayTransfer` HTTP method for more information on modes of transfer.
      tags:
        - RequestToPayTransferID
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/transferContinuationAcceptQuote'
                - $ref: '#/components/schemas/transferContinuationAcceptOTP'
      parameters:
        - $ref: '#/components/parameters/transactionRequestId'
      responses:
        '200':
          $ref: '#/components/responses/transferSuccess'
        '500':
          $ref: '#/components/responses/transferServerError'
        '504':
          $ref: '#/components/responses/transferTimeout'
  /simpleTransfers:
    post:
      summary: Simple Transfers endpoint
      description: is used to request a transfer
      tags:
        - transfers
      operationId: SimpleTransfersPost
      requestBody:
        description: Simple Transfer request payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/simpleTransfersPostRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/simpleTransfersPostSuccess'
        '500':
          $ref: '#/components/responses/simpleTransfersServerError'
  /transfers:
    post:
      summary: Sends money from one account to another
      description: |
        The HTTP request `POST /transfers` is used to request the movement of funds from payer DFSP to payee DFSP.
        The underlying Mojaloop API has three stages for money transfer:

          1. Party lookup. This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement.
          2. Quotation. This facilitates the exchange of fee information and the construction of a cryptographic "contract" between payee and payer DFSPs before funds are transferred.
          3. Transfer. The enactment of the previously agreed "contract"

        This method has several modes of operation.
        - If the configuration variables `AUTO_ACCEPT_PARTIES` is set to `"false"` this method will terminate when the payee party has been resolved and return the payee party details.
          If the payee wishes to proceed with the transfer, then a subsequent `PUT /transfers/{transferId}` request (accepting the payee party) is required to continue the operation.
          The scheme adapter will then proceed with quotation stage...

        - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"` this method will terminate and return the quotation when it has been received from the payee DFSP.
          If the payee wished to proceed with the transfer, then a subsequent `PUT /transfers/{transferId}` request (accepting the quote) is required to continue the operation.
          The scheme adapter will then proceed with the transfer state.

        If the configuration variables `AUTO_ACCEPT_PARTIES` and `AUTO_ACCEPT_QUOTES` are both set to `"true"` this method will block until all three transfer stages are complete. Upon completion it will return the entire set of transfer details received during the operation.

        Combinations of settings for `AUTO_ACCEPT...` configuration variables allow the scheme adapter user to decide which mode of operation best suits their use cases. i.e. the scheme adapter can be configured to "break" the three stage transfer at these points in order to execute backend logic such as party verification, quoted fees assessments etc...
      tags:
        - Transfers
      requestBody:
        description: Transfer request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/transferRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/transferSuccess'
        '400':
          $ref: '#/components/responses/transferBadRequest'
        '500':
          $ref: '#/components/responses/transferServerError'
        '504':
          $ref: '#/components/responses/transferTimeout'
  /transfers/{transferId}:
    put:
      summary: Continues a transfer that has paused at the quote stage in order to accept or reject payee party and/or quote
      description: |
        The HTTP request `PUT /transfers/{transferId}` is used to continue a transfer initiated via the `POST /transfers` method that has halted after party lookup and/or quotation stage.

        The request body should contain either the "acceptParty" or "acceptQuote" property set to `true` as required to continue the transfer.

        See the description of the `POST /transfers` HTTP method for more information on modes of transfer.
      tags:
        - Transfers
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/transferContinuationAcceptParty'
                - $ref: '#/components/schemas/transferContinuationAcceptQuote'
      parameters:
        - $ref: '#/components/parameters/transferId'
      responses:
        '200':
          $ref: '#/components/responses/transferSuccess'
        '500':
          $ref: '#/components/responses/transferServerError'
        '504':
          $ref: '#/components/responses/transferTimeout'
    get:
      summary: Retrieves information for a specific transfer
      description: The HTTP request `GET /transfers/{transferId}` is used to get information regarding a transfer created or requested earlier. The `{transferId}` in the URI should contain the `transferId` that was used for the creation of the transfer.
      tags:
        - Transfers
      parameters:
        - $ref: '#/components/parameters/transferId'
      responses:
        '200':
          description: Transfer information successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transferStatusResponse'
        '500':
          description: An error occurred processing the transfer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
components:
  schemas:
    PartyIdType:
      title: PartyIdType
      type: string
      enum:
        - MSISDN
        - EMAIL
        - PERSONAL_ID
        - BUSINESS
        - DEVICE
        - ACCOUNT_ID
        - IBAN
        - ALIAS
      description: |-
        Below are the allowed values for the enumeration.
        - MSISDN - An MSISDN (Mobile Station International Subscriber Directory Number, that is, the phone number) is used as reference to a participant. The MSISDN identifier should be in international format according to the [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). Optionally, the MSISDN may be prefixed by a single plus sign, indicating the international prefix.
        - EMAIL - An email is used as reference to a participant. The format of the email should be according to the informational [RFC 3696](https://tools.ietf.org/html/rfc3696).
        - PERSONAL_ID - A personal identifier is used as reference to a participant. Examples of personal identification are passport number, birth certificate number, and national registration number. The identifier number is added in the PartyIdentifier element. The personal identifier type is added in the PartySubIdOrType element.
        - BUSINESS - A specific Business (for example, an organization or a company) is used as reference to a participant. The BUSINESS identifier can be in any format. To make a transaction connected to a specific username or bill number in a Business, the PartySubIdOrType element should be used.
        - DEVICE - A specific device (for example, a POS or ATM) ID connected to a specific business or organization is used as reference to a Party. For referencing a specific device under a specific business or organization, use the PartySubIdOrType element.
        - ACCOUNT_ID - A bank account number or FSP account ID should be used as reference to a participant. The ACCOUNT_ID identifier can be in any format, as formats can greatly differ depending on country and FSP.
        - IBAN - A bank account number or FSP account ID is used as reference to a participant. The IBAN identifier can consist of up to 34 alphanumeric characters and should be entered without whitespace.
        - ALIAS An alias is used as reference to a participant. The alias should be created in the FSP as an alternative reference to an account owner. Another example of an alias is a username in the FSP system. The ALIAS identifier can be in any format. It is also possible to use the PartySubIdOrType element for identifying an account under an Alias defined by the PartyIdentifier.
    PartyIdentifier:
      title: PartyIdentifier
      type: string
      minLength: 1
      maxLength: 128
      description: Identifier of the Party.
      example: '16135551212'
    PartySubIdOrType:
      title: PartySubIdOrType
      type: string
      minLength: 1
      maxLength: 128
      description: Either a sub-identifier of a PartyIdentifier, or a sub-type of the PartyIdType, normally a PersonalIdentifierType.
    Currency:
      title: Currency
      description: The currency codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter alphabetic codes are used as the standard naming representation for currencies.
      type: string
      minLength: 3
      maxLength: 3
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GGP
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - IMP
        - INR
        - IQD
        - IRR
        - ISK
        - JEP
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRO
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLL
        - SOS
        - SPL
        - SRD
        - STD
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TVD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VEF
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XDR
        - XOF
        - XPF
        - XTS
        - XXX
        - YER
        - ZAR
        - ZMW
        - ZWD
    accountsRequest:
      type: array
      items:
        type: object
        additionalProperties: false
        required:
          - idType
          - idValue
          - currency
        properties:
          idType:
            $ref: '#/components/schemas/PartyIdType'
          idValue:
            $ref: '#/components/schemas/PartyIdentifier'
          idSubValue:
            $ref: '#/components/schemas/PartySubIdOrType'
          currency:
            $ref: '#/components/schemas/Currency'
    CorrelationId:
      title: CorrelationId
      type: string
      pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
      description: Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘).
      example: b51ec534-ee48-4575-b6a9-ead2955b8069
    errorResponse:
      type: object
      additionalProperties: false
      properties:
        statusCode:
          type: string
          description: Error code as string.
        message:
          type: string
          description: Error message text.
    accountCreationStatus:
      type: array
      items:
        type: object
        additionalProperties: false
        required:
          - idType
          - idValue
        properties:
          idType:
            $ref: '#/components/schemas/PartyIdType'
          idValue:
            $ref: '#/components/schemas/PartyIdentifier'
          idSubValue:
            $ref: '#/components/schemas/PartySubIdOrType'
          error:
            $ref: '#/components/schemas/errorResponse'
    accountsCreationState:
      type: string
      enum:
        - ERROR_OCCURRED
        - COMPLETED
    ErrorCode:
      title: ErrorCode
      type: string
      pattern: ^[1-9]\d{3}$
      description: The API data type ErrorCode is a JSON String of four characters, consisting of digits only. Negative numbers are not allowed. A leading zero is not allowed. Each error code in the API is a four-digit number, for example, 1234, where the first number (1 in the example) represents the high-level error category, the second number (2 in the example) represents the low-level error category, and the last two numbers (34 in the example) represent the specific error.
      example: '5100'
    ErrorDescription:
      title: ErrorDescription
      type: string
      minLength: 1
      maxLength: 128
      description: Error description string.
    ExtensionKey:
      title: ExtensionKey
      type: string
      minLength: 1
      maxLength: 32
      description: Extension key.
    ExtensionValue:
      title: ExtensionValue
      type: string
      minLength: 1
      maxLength: 128
      description: Extension value.
    Extension:
      title: Extension
      type: object
      additionalProperties: false
      description: Data model for the complex type Extension.
      properties:
        key:
          $ref: '#/components/schemas/ExtensionKey'
        value:
          $ref: '#/components/schemas/ExtensionValue'
      required:
        - key
        - value
    ExtensionList:
      title: ExtensionList
      type: object
      additionalProperties: false
      description: Data model for the complex type ExtensionList. An optional list of extensions, specific to deployment.
      properties:
        extension:
          type: array
          items:
            $ref: '#/components/schemas/Extension'
          minItems: 1
          maxItems: 16
          description: Number of Extension elements.
      required:
        - extension
    ErrorInformation:
      title: ErrorInformation
      type: object
      additionalProperties: false
      description: Data model for the complex type ErrorInformation.
      properties:
        errorCode:
          $ref: '#/components/schemas/ErrorCode'
        errorDescription:
          $ref: '#/components/schemas/ErrorDescription'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
      required:
        - errorCode
        - errorDescription
    mojaloopError:
      type: object
      additionalProperties: false
      properties:
        errorInformation:
          $ref: '#/components/schemas/ErrorInformation'
    transferError:
      type: object
      additionalProperties: false
      description: This may be a Mojaloop API error returned from another entity in the scheme or an object representing other types of error e.g. exceptions that may occur inside the scheme adapter.
      properties:
        httpStatusCode:
          type: integer
          description: The HTTP status code returned to the caller. This is the same as the actual HTTP status code returned with the response.
        mojaloopError:
          $ref: '#/components/schemas/mojaloopError'
    accountsResponse:
      type: object
      additionalProperties: false
      required:
        - accounts
      properties:
        modelId:
          $ref: '#/components/schemas/CorrelationId'
        accounts:
          $ref: '#/components/schemas/accountsRequest'
        response:
          $ref: '#/components/schemas/accountCreationStatus'
        currentState:
          $ref: '#/components/schemas/accountsCreationState'
        lastError:
          $ref: '#/components/schemas/transferError'
        postAccountsResponse:
          type: object
          required:
            - body
          properties:
            body:
              type: object
            headers:
              type: object
    errorAccountsResponse:
      allOf:
        - $ref: '#/components/schemas/errorResponse'
        - type: object
          additionalProperties: false
          required:
            - executionState
          properties:
            executionState:
              $ref: '#/components/schemas/accountsResponse'
    TransactionInitiatorType:
      title: TransactionInitiatorType
      type: string
      enum:
        - CONSUMER
        - AGENT
        - BUSINESS
        - DEVICE
      description: |-
        Below are the allowed values for the enumeration.
        - CONSUMER - Consumer is the initiator of the transaction.
        - AGENT - Agent is the initiator of the transaction.
        - BUSINESS - Business is the initiator of the transaction.
        - DEVICE - Device is the initiator of the transaction.
      example: CONSUMER
    Name:
      title: Name
      type: string
      pattern: ^(?!\s*$)[\w .,'-]{1,128}$
      description: |-
        The API data type Name is a JSON String, restricted by a regular expression to avoid characters which are generally not used in a name.

        Regular Expression - The regular expression for restricting the Name type is "^(?!\s*$)[\w .,'-]{1,128}$". The restriction does not allow a string consisting of whitespace only, all Unicode characters are allowed, as well as the period (.) (apostrophe (‘), dash (-), comma (,) and space characters ( ).

        **Note:** In some programming languages, Unicode support must be specifically enabled. For example, if Java is used, the flag UNICODE_CHARACTER_CLASS must be enabled to allow Unicode characters.
    FirstName:
      title: FirstName
      type: string
      minLength: 1
      maxLength: 128
      pattern: ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$
      description: First name of the Party (Name Type).
      example: Henrik
    MiddleName:
      title: MiddleName
      type: string
      minLength: 1
      maxLength: 128
      pattern: ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$
      description: Middle name of the Party (Name Type).
      example: Johannes
    LastName:
      title: LastName
      type: string
      minLength: 1
      maxLength: 128
      pattern: ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$
      description: Last name of the Party (Name Type).
      example: Karlsson
    DateOfBirth:
      title: DateofBirth (type Date)
      type: string
      pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$
      description: Date of Birth of the Party.
      example: '1966-06-16'
    MerchantClassificationCode:
      title: MerchantClassificationCode
      type: string
      pattern: ^[\d]{1,4}$
      description: A limited set of pre-defined numbers. This list would be a limited set of numbers identifying a set of popular merchant types like School Fees, Pubs and Restaurants, Groceries, etc.
    FspId:
      title: FspId
      type: string
      minLength: 1
      maxLength: 32
      description: FSP identifier.
    extensionListEmptiable:
      type: array
      items:
        $ref: '#/components/schemas/Extension'
      minItems: 0
      maxItems: 16
    transferParty:
      type: object
      additionalProperties: false
      required:
        - idType
        - idValue
      properties:
        type:
          $ref: '#/components/schemas/TransactionInitiatorType'
        idType:
          $ref: '#/components/schemas/PartyIdType'
        idValue:
          $ref: '#/components/schemas/PartyIdentifier'
        idSubValue:
          $ref: '#/components/schemas/PartySubIdOrType'
        displayName:
          $ref: '#/components/schemas/Name'
        firstName:
          $ref: '#/components/schemas/FirstName'
        middleName:
          $ref: '#/components/schemas/MiddleName'
        lastName:
          $ref: '#/components/schemas/LastName'
        dateOfBirth:
          $ref: '#/components/schemas/DateOfBirth'
        merchantClassificationCode:
          $ref: '#/components/schemas/MerchantClassificationCode'
        fspId:
          $ref: '#/components/schemas/FspId'
        extensionList:
          $ref: '#/components/schemas/extensionListEmptiable'
    AmountType:
      title: AmountType
      type: string
      enum:
        - SEND
        - RECEIVE
      description: |-
        Below are the allowed values for the enumeration AmountType.
        - SEND - Amount the Payer would like to send, that is, the amount that should be withdrawn from the Payer account including any fees.
        - RECEIVE - Amount the Payer would like the Payee to receive, that is, the amount that should be sent to the receiver exclusive of any fees.
      example: RECEIVE
    Amount:
      title: Amount
      type: string
      pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
      description: The API data type Amount is a JSON String in a canonical format that is restricted by a regular expression for interoperability reasons. This pattern does not allow any trailing zeroes at all, but allows an amount without a minor currency unit. It also only allows four digits in the minor currency unit; a negative value is not allowed. Using more than 18 digits in the major currency unit is not allowed.
      example: '123.45'
    transferTransactionType:
      title: transferTransactionType
      type: string
      enum:
        - TRANSFER
      description: Type of transaction.
    TransactionSubScenario:
      title: TransactionSubScenario
      type: string
      pattern: ^[A-Z_]{1,32}$
      description: Possible sub-scenario, defined locally within the scheme (UndefinedEnum Type).
      example: LOCALLY_DEFINED_SUBSCENARIO
    Note:
      title: Note
      type: string
      minLength: 1
      maxLength: 128
      description: Memo assigned to transaction.
      example: Note sent to Payee.
    individualQuote:
      title: IndividualQuote
      type: object
      additionalProperties: false
      description: Data model for the complex type 'individualQuote'.
      properties:
        quoteId:
          $ref: '#/components/schemas/CorrelationId'
        to:
          $ref: '#/components/schemas/transferParty'
        amountType:
          $ref: '#/components/schemas/AmountType'
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
        transactionType:
          $ref: '#/components/schemas/transferTransactionType'
        subScenario:
          $ref: '#/components/schemas/TransactionSubScenario'
        note:
          $ref: '#/components/schemas/Note'
        extensions:
          $ref: '#/components/schemas/ExtensionList'
      required:
        - quoteId
        - to
        - amountType
        - currency
        - transactionType
        - amount
    bulkQuoteRequest:
      type: object
      additionalProperties: false
      required:
        - homeTransactionId
        - from
        - individualQuotes
      properties:
        homeTransactionId:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        bulkQuoteId:
          $ref: '#/components/schemas/CorrelationId'
        from:
          $ref: '#/components/schemas/transferParty'
        individualQuotes:
          description: List of individual quotes in a bulk quote.
          type: array
          minItems: 1
          maxItems: 1000
          items:
            $ref: '#/components/schemas/individualQuote'
        extensions:
          $ref: '#/components/schemas/ExtensionList'
    DateTime:
      title: DateTime
      type: string
      pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$
      description: The API data type DateTime is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. The format is according to [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html), expressed in a combined date, time and time zone format. A more readable version of the format is yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time zone, same as UTC).
      example: '2016-05-24T08:38:08.699-04:00'
    bulkTransferStatus:
      type: string
      enum:
        - ERROR_OCCURRED
        - COMPLETED
    Money:
      title: Money
      type: object
      additionalProperties: false
      description: Data model for the complex type Money.
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
      required:
        - currency
        - amount
    Latitude:
      title: Latitude
      type: string
      pattern: ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$
      description: The API data type Latitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons.
      example: '+45.4215'
    Longitude:
      title: Longitude
      type: string
      pattern: ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$
      description: The API data type Longitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons.
      example: '+75.6972'
    GeoCode:
      title: GeoCode
      type: object
      additionalProperties: false
      description: Data model for the complex type GeoCode. Indicates the geographic location from where the transaction was initiated.
      properties:
        latitude:
          $ref: '#/components/schemas/Latitude'
        longitude:
          $ref: '#/components/schemas/Longitude'
      required:
        - latitude
        - longitude
    IlpPacket:
      title: IlpPacket
      type: string
      pattern: ^[A-Za-z0-9-_]+[=]{0,2}$
      minLength: 1
      maxLength: 32768
      description: Information for recipient (transport layer information).
      example: AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA
    IlpCondition:
      title: IlpCondition
      type: string
      pattern: ^[A-Za-z0-9-_]{43}$
      maxLength: 48
      description: Condition that must be attached to the transfer by the Payer.
    quoteError:
      type: object
      additionalProperties: false
      description: This object represents a Mojaloop API error received at any time during the quote process
      properties:
        httpStatusCode:
          type: integer
          description: The HTTP status code returned to the caller. This is the same as the actual HTTP status code returned with the response.
        mojaloopError:
          $ref: '#/components/schemas/mojaloopError'
    individualQuoteResult:
      type: object
      additionalProperties: false
      properties:
        quoteId:
          $ref: '#/components/schemas/CorrelationId'
        transferAmount:
          $ref: '#/components/schemas/Money'
        payeeReceiveAmount:
          $ref: '#/components/schemas/Money'
        payeeFspFee:
          $ref: '#/components/schemas/Money'
        payeeFspCommission:
          $ref: '#/components/schemas/Money'
        geoCode:
          $ref: '#/components/schemas/GeoCode'
        ilpPacket:
          $ref: '#/components/schemas/IlpPacket'
        condition:
          $ref: '#/components/schemas/IlpCondition'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
        lastError:
          $ref: '#/components/schemas/quoteError'
      required:
        - quoteId
    bulkQuoteResponse:
      type: object
      additionalProperties: false
      required:
        - bulkQuoteId
        - individualQuoteResults
        - currentState
        - expiration
      properties:
        bulkQuoteId:
          $ref: '#/components/schemas/CorrelationId'
        homeTransactionId:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        expiration:
          $ref: '#/components/schemas/DateTime'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
        currentState:
          $ref: '#/components/schemas/bulkTransferStatus'
        individualQuoteResults:
          type: array
          maxItems: 1000
          items:
            $ref: '#/components/schemas/individualQuoteResult'
          description: List of individualQuoteResults in a bulk transfer response.
    bulkQuoteErrorResponse:
      allOf:
        - $ref: '#/components/schemas/errorResponse'
        - type: object
          additionalProperties: false
          required:
            - bulkQuoteState
          properties:
            bulkQuoteState:
              $ref: '#/components/schemas/bulkQuoteResponse'
    bulkQuoteStatus:
      type: string
      enum:
        - ERROR_OCCURRED
        - COMPLETED
    bulkQuoteStatusResponse:
      type: object
      additionalProperties: false
      required:
        - bulkQuoteId
        - currentState
        - individualQuotes
      properties:
        bulkQuoteId:
          $ref: '#/components/schemas/CorrelationId'
        currentState:
          $ref: '#/components/schemas/bulkQuoteStatus'
        individualQuotes:
          type: array
          minItems: 1
          maxItems: 1000
          items:
            $ref: '#/components/schemas/individualQuote'
    autoAcceptPartyOption:
      type: object
      additionalProperties: false
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          enum:
            - false
            - true
    bulkPerTransferFeeLimit:
      type: object
      additionalProperties: false
      required:
        - currency
        - amount
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
    autoAcceptQuote:
      type: object
      additionalProperties: false
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          enum:
            - true
            - false
        perTransferFeeLimits:
          type: array
          minItems: 0
          items:
            $ref: '#/components/schemas/bulkPerTransferFeeLimit'
    bulkTransactionOptions:
      type: object
      additionalProperties: false
      required:
        - autoAcceptParty
        - autoAcceptQuote
        - bulkExpiration
      properties:
        onlyValidateParty:
          description: Set to true if only party validation is required.  This means the quotes and transfers will not run. This is useful for only party resolution.
          type: boolean
        autoAcceptParty:
          $ref: '#/components/schemas/autoAcceptPartyOption'
        autoAcceptQuote:
          description: Set to true if the quote response is accepted without confirmation from the payer. The fees applied by the payee will be acceptable to the payer abiding by the limits set by optional 'perTransferFeeLimits' array.
          type: object
          oneOf:
            - $ref: '#/components/schemas/autoAcceptQuote'
        skipPartyLookup:
          description: Set to true if supplying an FSPID for the payee party and no party resolution is needed. This may be useful if a previous party resolution has been performed.
          type: boolean
        synchronous:
          description: Set to true if the bulkTransfer requests need be handled synchronous. Otherwise the requests will be handled asynchronously, meaning there will be callbacks whenever the processing is done
          type: boolean
        bulkExpiration:
          $ref: '#/components/schemas/DateTime'
    PartyIdInfo:
      title: PartyIdInfo
      type: object
      additionalProperties: false
      description: Data model for the complex type PartyIdInfo. An ExtensionList element has been added to this reqeust in version v1.1
      properties:
        partyIdType:
          $ref: '#/components/schemas/PartyIdType'
        partyIdentifier:
          $ref: '#/components/schemas/PartyIdentifier'
        partySubIdOrType:
          $ref: '#/components/schemas/PartySubIdOrType'
        fspId:
          $ref: '#/components/schemas/FspId'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
      required:
        - partyIdType
        - partyIdentifier
    PartyName:
      title: PartyName
      type: string
      minLength: 1
      maxLength: 128
      description: Name of the Party. Could be a real name or a nickname.
    PartyComplexName:
      title: PartyComplexName
      type: object
      additionalProperties: false
      description: Data model for the complex type PartyComplexName.
      properties:
        firstName:
          $ref: '#/components/schemas/FirstName'
        middleName:
          $ref: '#/components/schemas/MiddleName'
        lastName:
          $ref: '#/components/schemas/LastName'
    PartyPersonalInfo:
      title: PartyPersonalInfo
      type: object
      additionalProperties: false
      description: Data model for the complex type PartyPersonalInfo.
      properties:
        complexName:
          $ref: '#/components/schemas/PartyComplexName'
        dateOfBirth:
          $ref: '#/components/schemas/DateOfBirth'
    Party:
      title: Party
      type: object
      additionalProperties: false
      description: Data model for the complex type Party.
      properties:
        partyIdInfo:
          $ref: '#/components/schemas/PartyIdInfo'
        merchantClassificationCode:
          $ref: '#/components/schemas/MerchantClassificationCode'
        name:
          $ref: '#/components/schemas/PartyName'
        personalInfo:
          $ref: '#/components/schemas/PartyPersonalInfo'
      required:
        - partyIdInfo
    bulkTransactionIndividualTransfer:
      title: BulkTransactionIndividualTransfer
      type: object
      additionalProperties: false
      description: Data model for the complex type 'bulkTransactionIndividualTransfer'.
      properties:
        homeTransactionId:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        to:
          $ref: '#/components/schemas/Party'
        reference:
          description: Payer Loan reference
          type: string
        amountType:
          $ref: '#/components/schemas/AmountType'
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
        note:
          $ref: '#/components/schemas/Note'
        quoteExtensions:
          $ref: '#/components/schemas/ExtensionList'
        transferExtensions:
          $ref: '#/components/schemas/ExtensionList'
        lastError:
          $ref: '#/components/schemas/transferError'
      required:
        - homeTransactionId
        - to
        - amountType
        - currency
        - amount
    bulkTransactionRequest:
      type: object
      additionalProperties: false
      required:
        - bulkTransactionId
        - bulkHomeTransactionID
        - options
        - from
        - individualTransfers
      properties:
        bulkHomeTransactionID:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        bulkTransactionId:
          $ref: '#/components/schemas/CorrelationId'
        options:
          $ref: '#/components/schemas/bulkTransactionOptions'
        from:
          $ref: '#/components/schemas/Party'
        individualTransfers:
          description: List of individual transfers in a bulk transfer.
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/bulkTransactionIndividualTransfer'
        extensions:
          $ref: '#/components/schemas/ExtensionList'
    TransferState:
      title: TransferState
      type: string
      enum:
        - RECEIVED
        - RESERVED
        - COMMITTED
        - ABORTED
      description: |-
        Below are the allowed values for the enumeration.
        - RECEIVED - Next ledger has received the transfer.
        - RESERVED - Next ledger has reserved the transfer.
        - COMMITTED - Next ledger has successfully performed the transfer.
        - ABORTED - Next ledger has aborted the transfer due to a rejection or failure to perform the transfer.
      example: RESERVED
    IlpFulfilment:
      title: IlpFulfilment
      type: string
      pattern: ^[A-Za-z0-9-_]{43}$
      maxLength: 48
      description: Fulfilment that must be attached to the transfer by the Payee.
      example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8
    individualTransferResult:
      type: object
      additionalProperties: false
      required:
        - transferId
      properties:
        transferId:
          $ref: '#/components/schemas/CorrelationId'
        fulfilment:
          $ref: '#/components/schemas/IlpFulfilment'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
        transferState:
          $ref: '#/components/schemas/TransferState'
        lastError:
          $ref: '#/components/schemas/transferError'
    bulkTransferResponse:
      type: object
      additionalProperties: false
      required:
        - bulkTransferId
        - individualTransferResults
        - currentState
      properties:
        bulkTransferId:
          $ref: '#/components/schemas/CorrelationId'
        bulkQuoteId:
          $ref: '#/components/schemas/CorrelationId'
        homeTransactionId:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        bulkTransferState:
          $ref: '#/components/schemas/TransferState'
        completedTimestamp:
          $ref: '#/components/schemas/DateTime'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
        currentState:
          $ref: '#/components/schemas/bulkTransferStatus'
        individualTransferResults:
          type: array
          maxItems: 1000
          items:
            $ref: '#/components/schemas/individualTransferResult'
          description: List of individual transfer result in a bulk transfer response.
    bulkTransferErrorResponse:
      allOf:
        - $ref: '#/components/schemas/errorResponse'
        - type: object
          additionalProperties: false
          required:
            - bulkTransferState
          properties:
            bulkTransferState:
              $ref: '#/components/schemas/bulkTransferResponse'
    bulkTransactionIndividualTransferAccept:
      type: object
      additionalProperties: false
      description: Data model for the 'individualTransfer' while accepting party or quote.
      properties:
        transferId:
          $ref: '#/components/schemas/CorrelationId'
      required:
        - transferId
    transferContinuationAcceptParty:
      type: object
      additionalProperties: false
      required:
        - acceptParty
      properties:
        acceptParty:
          type: boolean
          enum:
            - true
            - false
    bulkTransactionContinuationAcceptParty:
      description: The object sent back as confirmation of payee parties when autoAcceptParty is false.
      type: object
      additionalProperties: false
      required:
        - individualTransfers
      properties:
        individualTransfers:
          description: List of individual transfers in a bulk transfer with accept party information.
          type: array
          minItems: 1
          items:
            allOf:
              - $ref: '#/components/schemas/bulkTransactionIndividualTransferAccept'
              - $ref: '#/components/schemas/transferContinuationAcceptParty'
    transferContinuationAcceptQuote:
      type: object
      additionalProperties: false
      required:
        - acceptQuote
      properties:
        acceptQuote:
          type: boolean
          enum:
            - true
            - false
    bulkTransactionContinuationAcceptQuote:
      description: The object sent back as confirmation of quotes when autoAcceptQuotes is false.
      type: object
      additionalProperties: false
      required:
        - individualTransfers
      properties:
        individualTransfers:
          description: List of individual transfers in a bulk transfer.
          type: array
          minItems: 1
          items:
            allOf:
              - $ref: '#/components/schemas/bulkTransactionIndividualTransferAccept'
              - $ref: '#/components/schemas/transferContinuationAcceptQuote'
    partyError:
      type: object
      additionalProperties: false
      description: This object represents a Mojaloop API error received at any time during the party discovery process
      properties:
        httpStatusCode:
          type: integer
          description: The HTTP status code returned to the caller. This is the same as the actual HTTP status code returned with the response.
        mojaloopError:
          $ref: '#/components/schemas/mojaloopError'
    bulkTransactionAcceptPartyErrorResponse:
      allOf:
        - $ref: '#/components/schemas/errorResponse'
        - type: object
          additionalProperties: false
          required:
            - bulkTransferState
          properties:
            bulkTransferState:
              allOf:
                - $ref: '#/components/schemas/bulkTransactionContinuationAcceptParty'
                - $ref: '#/components/schemas/partyError'
    bulkTransactionAcceptQuoteErrorResponse:
      allOf:
        - $ref: '#/components/schemas/errorResponse'
        - type: object
          additionalProperties: false
          required:
            - bulkTansferState
          properties:
            bulkTransferState:
              allOf:
                - $ref: '#/components/schemas/bulkTransactionContinuationAcceptQuote'
                - $ref: '#/components/schemas/quoteError'
    individualTransfer:
      title: IndividualTransfer
      type: object
      additionalProperties: false
      description: Data model for the complex type 'individualTransfer'.
      properties:
        transferId:
          $ref: '#/components/schemas/CorrelationId'
        to:
          $ref: '#/components/schemas/transferParty'
        amountType:
          $ref: '#/components/schemas/AmountType'
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
        transactionType:
          $ref: '#/components/schemas/transferTransactionType'
        subScenario:
          $ref: '#/components/schemas/TransactionSubScenario'
        ilpPacket:
          $ref: '#/components/schemas/IlpPacket'
        condition:
          $ref: '#/components/schemas/IlpCondition'
        note:
          $ref: '#/components/schemas/Note'
        extensions:
          $ref: '#/components/schemas/ExtensionList'
      required:
        - transferId
        - to
        - amountType
        - currency
        - amount
        - ilpPacket
        - condition
    bulkTransferRequest:
      type: object
      additionalProperties: false
      required:
        - bulkTransferId
        - homeTransactionId
        - bulkQuoteId
        - from
        - individualTransfers
      properties:
        homeTransactionId:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        bulkTransferId:
          $ref: '#/components/schemas/CorrelationId'
        bulkQuoteId:
          $ref: '#/components/schemas/CorrelationId'
        from:
          $ref: '#/components/schemas/transferParty'
        individualTransfers:
          description: List of individual transfers in a bulk transfer.
          type: array
          minItems: 1
          maxItems: 1000
          items:
            $ref: '#/components/schemas/individualTransfer'
        extensions:
          $ref: '#/components/schemas/ExtensionList'
    individualTransferFulfilment:
      type: object
      additionalProperties: false
      description: A Mojaloop API transfer fulfilment for individual transfers in a bulk transfer
      properties:
        fulfilment:
          $ref: '#/components/schemas/IlpFulfilment'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
    bulkTransferStatusResponse:
      type: object
      required:
        - bulkTransferId
        - currentState
        - fulfils
      properties:
        bulkTransferId:
          $ref: '#/components/schemas/CorrelationId'
        currentState:
          $ref: '#/components/schemas/bulkTransferStatus'
        fulfils:
          type: array
          minItems: 1
          maxItems: 1000
          items:
            $ref: '#/components/schemas/individualTransferFulfilment'
    async2SyncCurrentState:
      type: string
      enum:
        - WAITING_FOR_ACTION
        - COMPLETED
        - ERROR_OCCURRED
    partiesByIdResponse:
      title: partiesByIdResponse
      type: object
      additionalProperties: false
      description: GET /parties/{Type}/{ID} response object
      properties:
        party:
          properties:
            body:
              $ref: '#/components/schemas/Party'
            headers:
              type: object
          required:
            - body
            - headers
        currentState:
          $ref: '#/components/schemas/async2SyncCurrentState'
      required:
        - party
        - currentState
    TransactionScenario:
      title: TransactionScenario
      type: string
      enum:
        - DEPOSIT
        - WITHDRAWAL
        - TRANSFER
        - PAYMENT
        - REFUND
      description: |-
        Below are the allowed values for the enumeration.
        - DEPOSIT - Used for performing a Cash-In (deposit) transaction. In a normal scenario, electronic funds are transferred from a Business account to a Consumer account, and physical cash is given from the Consumer to the Business User.
        - WITHDRAWAL - Used for performing a Cash-Out (withdrawal) transaction. In a normal scenario, electronic funds are transferred from a Consumer’s account to a Business account, and physical cash is given from the Business User to the Consumer.
        - TRANSFER - Used for performing a P2P (Peer to Peer, or Consumer to Consumer) transaction.
        - PAYMENT - Usually used for performing a transaction from a Consumer to a Merchant or Organization, but could also be for a B2B (Business to Business) payment. The transaction could be online for a purchase in an Internet store, in a physical store where both the Consumer and Business User are present, a bill payment, a donation, and so on.
        - REFUND - Used for performing a refund of transaction.
      example: DEPOSIT
    TransactionInitiator:
      title: TransactionInitiator
      type: string
      enum:
        - PAYER
        - PAYEE
      description: |-
        Below are the allowed values for the enumeration.
        - PAYER - Sender of funds is initiating the transaction. The account to send from is either owned by the Payer or is connected to the Payer in some way.
        - PAYEE - Recipient of the funds is initiating the transaction by sending a transaction request. The Payer must approve the transaction, either automatically by a pre-generated OTP or by pre-approval of the Payee, or by manually approving in his or her own Device.
      example: PAYEE
    RefundReason:
      title: RefundReason
      type: string
      minLength: 1
      maxLength: 128
      description: Reason for the refund.
      example: Free text indicating reason for the refund.
    Refund:
      title: Refund
      type: object
      additionalProperties: false
      description: Data model for the complex type Refund.
      properties:
        originalTransactionId:
          $ref: '#/components/schemas/CorrelationId'
        refundReason:
          $ref: '#/components/schemas/RefundReason'
      required:
        - originalTransactionId
    BalanceOfPayments:
      title: BalanceOfPayments
      type: string
      pattern: ^[1-9]\d{2}$
      description: (BopCode) The API data type [BopCode](https://www.imf.org/external/np/sta/bopcode/) is a JSON String of 3 characters, consisting of digits only. Negative numbers are not allowed. A leading zero is not allowed.
      example: '123'
    TransactionType:
      title: TransactionType
      type: object
      additionalProperties: false
      description: Data model for the complex type TransactionType.
      properties:
        scenario:
          $ref: '#/components/schemas/TransactionScenario'
        subScenario:
          $ref: '#/components/schemas/TransactionSubScenario'
        initiator:
          $ref: '#/components/schemas/TransactionInitiator'
        initiatorType:
          $ref: '#/components/schemas/TransactionInitiatorType'
        refundInfo:
          $ref: '#/components/schemas/Refund'
        balanceOfPayments:
          $ref: '#/components/schemas/BalanceOfPayments'
      required:
        - scenario
        - initiator
        - initiatorType
    QuotesPostRequest:
      title: QuotesPostRequest
      type: object
      additionalProperties: false
      description: The object sent in the POST /quotes request.
      properties:
        quoteId:
          $ref: '#/components/schemas/CorrelationId'
        transactionId:
          $ref: '#/components/schemas/CorrelationId'
        transactionRequestId:
          $ref: '#/components/schemas/CorrelationId'
        payee:
          $ref: '#/components/schemas/Party'
        payer:
          $ref: '#/components/schemas/Party'
        amountType:
          $ref: '#/components/schemas/AmountType'
        amount:
          $ref: '#/components/schemas/Money'
        fees:
          $ref: '#/components/schemas/Money'
        transactionType:
          $ref: '#/components/schemas/TransactionType'
        geoCode:
          $ref: '#/components/schemas/GeoCode'
        note:
          $ref: '#/components/schemas/Note'
        expiration:
          $ref: '#/components/schemas/DateTime'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
      required:
        - quoteId
        - transactionId
        - payee
        - payer
        - amountType
        - amount
        - transactionType
    simpleQuotesPostRequest:
      title: simpleQuotesPostRequest
      type: object
      additionalProperties: false
      properties:
        fspId:
          $ref: '#/components/schemas/FspId'
        quotesPostRequest:
          $ref: '#/components/schemas/QuotesPostRequest'
      required:
        - fspId
        - quotesPostRequest
    quotesPostResponse:
      title: QuotesPostResponse
      type: object
      additionalProperties: false
      properties:
        quotes:
          title: QuotesIDPutResponse
          type: object
          description: The object sent in the PUT /quotes/{ID} callback.
          properties:
            body:
              type: object
              properties:
                transferAmount:
                  $ref: '#/components/schemas/Money'
                payeeReceiveAmount:
                  $ref: '#/components/schemas/Money'
                payeeFspFee:
                  $ref: '#/components/schemas/Money'
                payeeFspCommission:
                  $ref: '#/components/schemas/Money'
                expiration:
                  type: string
                  description: Date and time until when the quotation is valid and can be honored when used in the subsequent transaction.
                  example: '2016-05-24T08:38:08.699-04:00'
                geoCode:
                  $ref: '#/components/schemas/GeoCode'
                ilpPacket:
                  $ref: '#/components/schemas/IlpPacket'
                condition:
                  $ref: '#/components/schemas/IlpCondition'
                extensionList:
                  $ref: '#/components/schemas/ExtensionList'
              required:
                - transferAmount
                - expiration
                - ilpPacket
                - condition
            headers:
              type: object
          required:
            - body
            - headers
        currentState:
          $ref: '#/components/schemas/async2SyncCurrentState'
      required:
        - quotes
        - currentState
    errorQuotesResponse:
      allOf:
        - $ref: '#/components/schemas/errorResponse'
        - type: object
      additionalProperties: false
    AuthenticationType:
      title: AuthenticationType
      type: string
      enum:
        - OTP
        - QRCODE
        - U2F
      description: |-
        Below are the allowed values for the enumeration AuthenticationType.
        - OTP - One-time password generated by the Payer FSP.
        - QRCODE - QR code used as One Time Password.
        - U2F - U2F is a new addition isolated to Thirdparty stream.
      example: OTP
    requestToPayRequest:
      type: object
      additionalProperties: false
      required:
        - homeR2PTransactionId
        - from
        - to
        - amountType
        - currency
        - amount
        - transactionType
      properties:
        homeR2PTransactionId:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        from:
          $ref: '#/components/schemas/transferParty'
        to:
          $ref: '#/components/schemas/transferParty'
        amountType:
          $ref: '#/components/schemas/AmountType'
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
        transactionType:
          $ref: '#/components/schemas/TransactionScenario'
        subScenario:
          $ref: '#/components/schemas/TransactionSubScenario'
        authenticationType:
          $ref: '#/components/schemas/AuthenticationType'
    requestToPayStatus:
      type: string
      enum:
        - ERROR_OCCURRED
        - WAITING_FOR_PARTY_ACCEPTANCE
        - COMPLETED
    getPartiesResponse:
      title: getPartiesResponse
      type: object
      additionalProperties: false
      description: The object sent in the GET /parties/{Type}/{ID} callback.
      properties:
        body:
          $ref: '#/components/schemas/Party'
        headers:
          type: object
      required:
        - body
        - headers
    TransactionRequestState:
      title: TransactionRequestState
      type: string
      enum:
        - RECEIVED
        - PENDING
        - ACCEPTED
        - REJECTED
      description: |-
        Below are the allowed values for the enumeration.
        - RECEIVED - Payer FSP has received the transaction from the Payee FSP.
        - PENDING - Payer FSP has sent the transaction request to the Payer.
        - ACCEPTED - Payer has approved the transaction.
        - REJECTED - Payer has rejected the transaction.
      example: RECEIVED
    TransactionRequestResponse:
      title: TransactionRequestResponse
      type: object
      additionalProperties: false
      description: The object sent in the PUT /transactionRequests/{ID} callback.
      properties:
        body:
          type: object
          properties:
            transactionId:
              $ref: '#/components/schemas/CorrelationId'
            transactionRequestState:
              $ref: '#/components/schemas/TransactionRequestState'
            extensionList:
              $ref: '#/components/schemas/ExtensionList'
          required:
            - transactionRequestState
        headers:
          type: object
      required:
        - body
        - headers
    requestToPayResponse:
      type: object
      additionalProperties: false
      required:
        - transactionRequestId
        - from
        - to
        - amountType
        - currency
        - amount
        - transactionType
        - currentState
      properties:
        transactionRequestId:
          $ref: '#/components/schemas/CorrelationId'
        from:
          $ref: '#/components/schemas/transferParty'
        to:
          $ref: '#/components/schemas/transferParty'
        amountType:
          $ref: '#/components/schemas/AmountType'
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
        transactionType:
          $ref: '#/components/schemas/TransactionScenario'
        subScenario:
          $ref: '#/components/schemas/TransactionSubScenario'
        currentState:
          $ref: '#/components/schemas/requestToPayStatus'
        getPartiesResponse:
          $ref: '#/components/schemas/getPartiesResponse'
        transactionRequestResponse:
          $ref: '#/components/schemas/TransactionRequestResponse'
        lastError:
          $ref: '#/components/schemas/transferError'
    transferStatus:
      type: string
      enum:
        - ERROR_OCCURRED
        - WAITING_FOR_PARTY_ACCEPTANCE
        - WAITING_FOR_QUOTE_ACCEPTANCE
        - COMPLETED
    QuotesIDPutResponse:
      title: QuotesIDPutResponse
      type: object
      additionalProperties: false
      description: The object sent in the PUT /quotes/{ID} callback.
      properties:
        transferAmount:
          $ref: '#/components/schemas/Money'
        payeeReceiveAmount:
          $ref: '#/components/schemas/Money'
        payeeFspFee:
          $ref: '#/components/schemas/Money'
        payeeFspCommission:
          $ref: '#/components/schemas/Money'
        expiration:
          $ref: '#/components/schemas/DateTime'
        geoCode:
          $ref: '#/components/schemas/GeoCode'
        ilpPacket:
          $ref: '#/components/schemas/IlpPacket'
        condition:
          $ref: '#/components/schemas/IlpCondition'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
      required:
        - transferAmount
        - expiration
        - ilpPacket
        - condition
    TransfersIDPutResponse:
      title: TransfersIDPutResponse
      type: object
      additionalProperties: false
      description: The object sent in the PUT /transfers/{ID} callback.
      properties:
        fulfilment:
          $ref: '#/components/schemas/IlpFulfilment'
        completedTimestamp:
          $ref: '#/components/schemas/DateTime'
        transferState:
          $ref: '#/components/schemas/TransferState'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
      required:
        - transferState
    transferResponse:
      type: object
      additionalProperties: false
      required:
        - homeTransactionId
        - from
        - to
        - amountType
        - currency
        - amount
        - transactionType
      properties:
        transferId:
          $ref: '#/components/schemas/CorrelationId'
        homeTransactionId:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        from:
          $ref: '#/components/schemas/transferParty'
        to:
          $ref: '#/components/schemas/transferParty'
        amountType:
          $ref: '#/components/schemas/AmountType'
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
        transactionType:
          $ref: '#/components/schemas/transferTransactionType'
        subScenario:
          $ref: '#/components/schemas/TransactionSubScenario'
        note:
          $ref: '#/components/schemas/Note'
        currentState:
          $ref: '#/components/schemas/transferStatus'
        quoteId:
          $ref: '#/components/schemas/CorrelationId'
        getPartiesResponse:
          type: object
          required:
            - body
          properties:
            body:
              type: object
            headers:
              type: object
        quoteResponse:
          type: object
          required:
            - body
          properties:
            body:
              $ref: '#/components/schemas/QuotesIDPutResponse'
            headers:
              type: object
        quoteResponseSource:
          type: string
          description: |
            FSPID of the entity that supplied the quote response. This may not be the same as the FSPID of the entity which owns the end user account in the case of a FOREX transfer. i.e. it may be a FOREX gateway.
        fulfil:
          type: object
          required:
            - body
          properties:
            body:
              $ref: '#/components/schemas/TransfersIDPutResponse'
            headers:
              type: object
        lastError:
          $ref: '#/components/schemas/transferError'
        skipPartyLookup:
          description: Set to true if supplying an FSPID for the payee party and no party resolution is needed. This may be useful is a previous party resolution has been performed.
          type: boolean
    errorTransferResponse:
      allOf:
        - $ref: '#/components/schemas/errorResponse'
        - type: object
          additionalProperties: false
          required:
            - transferState
          properties:
            transferState:
              $ref: '#/components/schemas/transferResponse'
    requestToPayTransferRequest:
      type: object
      additionalProperties: false
      required:
        - homeR2PTransactionId
        - transactionRequestId
        - from
        - to
        - amountType
        - currency
        - amount
        - scenario
        - initiator
        - initiatorType
      properties:
        homeR2PTransactionId:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        transactionRequestId:
          $ref: '#/components/schemas/CorrelationId'
        from:
          $ref: '#/components/schemas/transferParty'
        to:
          $ref: '#/components/schemas/transferParty'
        amountType:
          $ref: '#/components/schemas/AmountType'
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
        scenario:
          $ref: '#/components/schemas/TransactionScenario'
        subScenario:
          $ref: '#/components/schemas/TransactionSubScenario'
        initiator:
          $ref: '#/components/schemas/TransactionInitiator'
        initiatorType:
          $ref: '#/components/schemas/TransactionInitiatorType'
        note:
          $ref: '#/components/schemas/Note'
        authenticationType:
          $ref: '#/components/schemas/AuthenticationType'
    AuthenticationValue:
      title: AuthenticationValue
      anyOf:
        - title: OtpValue
          type: string
          pattern: ^\d{3,10}$
          description: The API data type OtpValue is a JSON String of 3 to 10 characters, consisting of digits only. Negative numbers are not allowed. One or more leading zeros are allowed.
        - title: QRCODE
          type: string
          minLength: 1
          maxLength: 64
          description: QR code used as a One Time Password.
        - title: U2FPinValue
          type: object
          additionalProperties: false
          description: |
            U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key.
          properties:
            pinValue:
              type: string
              pattern: ^\S{1,64}$
              minLength: 1
              maxLength: 64
              description: |
                U2F challenge-response, where payer FSP verifies if the response provided by end-user device matches the previously registered key.
            counter:
              title: Integer
              type: string
              pattern: ^[1-9]\d*$
              description: Sequential counter used for cloning detection. Present only for U2F authentication.
          required:
            - pinValue
            - counter
      pattern: ^\d{3,10}$|^\S{1,64}$
      description: Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type.
    AuthenticationInfo:
      title: AuthenticationInfo
      type: object
      additionalProperties: false
      description: Data model for the complex type AuthenticationInfo.
      properties:
        authentication:
          $ref: '#/components/schemas/AuthenticationType'
        authenticationValue:
          $ref: '#/components/schemas/AuthenticationValue'
      required:
        - authentication
        - authenticationValue
    AuthorizationResponseType:
      title: AuthorizationResponseType
      type: string
      enum:
        - ENTERED
        - REJECTED
        - RESEND
      description: |-
        Below are the allowed values for the enumeration.
        - ENTERED - Consumer entered the authentication value.
        - REJECTED - Consumer rejected the transaction.
        - RESEND - Consumer requested to resend the authentication value.
      example: ENTERED
    AuthorizationIDPutResponse:
      title: AuthorizationIDPutResponse
      type: object
      additionalProperties: false
      description: The object sent in the PUT /authorizations/{ID} callback.
      properties:
        authenticationInfo:
          $ref: '#/components/schemas/AuthenticationInfo'
        responseType:
          $ref: '#/components/schemas/AuthorizationResponseType'
      required:
        - responseType
    requestToPayTransferResponse:
      type: object
      additionalProperties: false
      required:
        - transactionRequestId
        - from
        - to
        - amountType
        - currency
        - amount
        - transactionType
      properties:
        transferId:
          $ref: '#/components/schemas/CorrelationId'
        homeR2PTransactionId:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        transactionRequestId:
          $ref: '#/components/schemas/CorrelationId'
        from:
          $ref: '#/components/schemas/transferParty'
        to:
          $ref: '#/components/schemas/transferParty'
        amountType:
          $ref: '#/components/schemas/AmountType'
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
        transactionType:
          $ref: '#/components/schemas/transferTransactionType'
        note:
          $ref: '#/components/schemas/Note'
        currentState:
          $ref: '#/components/schemas/transferStatus'
        quoteId:
          $ref: '#/components/schemas/CorrelationId'
        quoteResponse:
          type: object
          required:
            - body
          properties:
            body:
              $ref: '#/components/schemas/QuotesIDPutResponse'
            headers:
              type: object
        quoteResponseSource:
          type: string
          description: |
            FSPID of the entity that supplied the quote response. This may not be the same as the FSPID of the entity which owns the end user account in the case of a FOREX transfer. i.e. it may be a FOREX gateway.
        authorizationResponse:
          type: object
          required:
            - body
          properties:
            body:
              $ref: '#/components/schemas/AuthorizationIDPutResponse'
            headers:
              type: object
        fulfil:
          type: object
          required:
            - body
          properties:
            body:
              $ref: '#/components/schemas/TransfersIDPutResponse'
            headers:
              type: object
        lastError:
          $ref: '#/components/schemas/transferError'
    transferContinuationAcceptOTP:
      type: object
      additionalProperties: false
      required:
        - acceptOTP
      properties:
        acceptOTP:
          type: boolean
          enum:
            - true
            - false
    TransfersPostRequest:
      title: TransfersPostRequest
      type: object
      additionalProperties: false
      description: The object sent in the POST /transfers request.
      properties:
        transferId:
          $ref: '#/components/schemas/CorrelationId'
        payeeFsp:
          $ref: '#/components/schemas/FspId'
        payerFsp:
          $ref: '#/components/schemas/FspId'
        amount:
          $ref: '#/components/schemas/Money'
        ilpPacket:
          $ref: '#/components/schemas/IlpPacket'
        condition:
          $ref: '#/components/schemas/IlpCondition'
        expiration:
          $ref: '#/components/schemas/DateTime'
        extensionList:
          $ref: '#/components/schemas/ExtensionList'
      required:
        - transferId
        - payeeFsp
        - payerFsp
        - amount
        - ilpPacket
        - condition
        - expiration
    simpleTransfersPostRequest:
      title: SimpleTransfersPostRequest
      type: object
      additionalProperties: false
      properties:
        fspId:
          $ref: '#/components/schemas/FspId'
        transfersPostRequest:
          $ref: '#/components/schemas/TransfersPostRequest'
      required:
        - fspId
        - transfersPostRequest
    simpleTransfersPostResponse:
      title: SimpleTransfersPostResponse
      type: object
      additionalProperties: false
      properties:
        transfer:
          properties:
            body:
              $ref: '#/components/schemas/TransfersIDPutResponse'
            headers:
              type: object
          required:
            - body
            - headers
        currentState:
          $ref: '#/components/schemas/async2SyncCurrentState'
      required:
        - transfer
        - currentState
    errorSimpleTransfersResponse:
      allOf:
        - $ref: '#/components/schemas/errorResponse'
        - type: object
      additionalProperties: false
    transferRequest:
      type: object
      additionalProperties: false
      required:
        - homeTransactionId
        - from
        - to
        - amountType
        - currency
        - amount
        - transactionType
      properties:
        homeTransactionId:
          type: string
          description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
        from:
          $ref: '#/components/schemas/transferParty'
        to:
          $ref: '#/components/schemas/transferParty'
        amountType:
          $ref: '#/components/schemas/AmountType'
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          $ref: '#/components/schemas/Amount'
        transactionType:
          $ref: '#/components/schemas/transferTransactionType'
        subScenario:
          $ref: '#/components/schemas/TransactionSubScenario'
        note:
          $ref: '#/components/schemas/Note'
        quoteRequestExtensions:
          $ref: '#/components/schemas/extensionListEmptiable'
        transferRequestExtensions:
          $ref: '#/components/schemas/extensionListEmptiable'
        skipPartyLookup:
          description: Set to true if supplying an FSPID for the payee party and no party resolution is needed. This may be useful is a previous party resolution has been performed.
          type: boolean
    transferStatusResponse:
      type: object
      additionalProperties: false
      required:
        - transferId
        - currentState
        - fulfil
      properties:
        transferId:
          $ref: '#/components/schemas/CorrelationId'
        currentState:
          $ref: '#/components/schemas/transferStatus'
        fulfil:
          type: object
          required:
            - body
          properties:
            body:
              $ref: '#/components/schemas/TransfersIDPutResponse'
            headers:
              type: object
  responses:
    accountsCreationCompleted:
      description: Accounts creation completed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/accountsResponse'
    accountsCreationError:
      description: An error occurred creating accounts
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorAccountsResponse'
    accountsCreationTimeout:
      description: Timeout occurred creating accounts
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorAccountsResponse'
    bulkQuoteSuccess:
      description: Bulk quote completed successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/bulkQuoteResponse'
    bulkQuoteBadRequest:
      description: Malformed or missing required body, headers or parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/bulkQuoteErrorResponse'
    bulkQuoteServerError:
      description: An error occurred processing the bulk quote
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/bulkQuoteErrorResponse'
    bulkQuoteTimeout:
      description: Timeout occurred processing the bulk quote
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/bulkQuoteErrorResponse'
    bulkTransactionAccepted:
      description: Bulk transfer accepted successfully
    bulkTransferBadRequest:
      description: Malformed or missing required body, headers or parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/bulkTransferErrorResponse'
    errorResponse:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    bulkTransactionPutBadRequest:
      description: Malformed or missing required body, headers or parameters
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/bulkTransactionAcceptPartyErrorResponse'
              - $ref: '#/components/schemas/bulkTransactionAcceptQuoteErrorResponse'
    bulkTransferSuccess:
      description: Bulk transfer completed successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/bulkTransferResponse'
    partiesByIdSuccess:
      description: PartiesByIdSuccess
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/partiesByIdResponse'
    partiesByIdError404:
      description: PartiesByIdError404
      content:
        application/json:
          schema:
            type: object
            properties:
              errorInformation:
                $ref: '#/components/schemas/ErrorInformation'
    quotesPostSuccess:
      description: sync response from POST /quotes
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/quotesPostResponse'
    quotesServerError:
      description: An error occurred processing the quotes request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorQuotesResponse'
    requestToPaySuccess:
      description: Request to Pay completed successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/requestToPayResponse'
    transferServerError:
      description: An error occurred processing the transfer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorTransferResponse'
    transferTimeout:
      description: Timeout occurred processing the transfer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorTransferResponse'
    requestToPayTransferSuccess:
      description: Transfer completed successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/requestToPayTransferResponse'
    requestToPayTransferBadRequest:
      description: Malformed or missing required body, headers or parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorTransferResponse'
    transferSuccess:
      description: Transfer completed successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/transferResponse'
    simpleTransfersPostSuccess:
      description: sync response from POST /simpleTransfers
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/simpleTransfersPostResponse'
    simpleTransfersServerError:
      description: An error occurred processing the simple transfers request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorSimpleTransfersResponse'
    transferBadRequest:
      description: Malformed or missing required body, headers or parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorTransferResponse'
  parameters:
    bulkQuoteId:
      name: bulkQuoteId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/CorrelationId'
      description: Identifier of the bulk transfer to continue as returned in the response to a `POST /bulkTransfers` request.
    bulkTransactionId:
      name: bulkTransactionId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/CorrelationId'
      description: Identifier of the bulk transaction to continue as returned in the response to a `POST /bulkTransaction` request.
    bulkTransferId:
      name: bulkTransferId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/CorrelationId'
      description: Identifier of the bulk transfer to continue as returned in the response to a `POST /bulkTransfers` request.
    Type:
      name: Type
      in: path
      required: true
      schema:
        type: string
      description: The type of the party identifier. For example, `MSISDN`, `PERSONAL_ID`.
    ID:
      name: ID
      in: path
      required: true
      schema:
        type: string
      description: The identifier value.
    SubId:
      name: SubId
      in: path
      required: true
      schema:
        type: string
      description: A sub-identifier of the party identifier, or a sub-type of the party identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`.
    transactionRequestId:
      name: transactionRequestId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/CorrelationId'
      description: Identifier of the merchant request to pay to continue as returned in the response to a `POST /requestToPay` request.
    transferId:
      name: transferId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/CorrelationId'
      description: Identifier of the transfer to continue as returned in the response to a `POST /transfers` request.
