openapi: 3.0.1
x-tagGroups:
- name: AccountInformation
  tags:
  - Accounts
  - Loans
  - Transactions
- name: Payments
  tags:
  - PaymentRequests
  - Payments
  - PaymentTemplates
  - SigningBaskets
- name: Insights
  tags:
  - Insights
servers:
- url: api.finshark.io
  description: url
info:
  title: Finshark API
  description: Finshark API
  contact:
    name: ''
    email: info@finshark.io
  version: v1.0
  x-logo:
    url: https://cdn.finshark.io/logo/finshark-logo-blue.svg
    altText: FinsharkLogo
paths:
  /v1/accounts:
    get:
      tags:
      - Accounts
      summary: Get list of accounts.
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: Request was fulfilled and accounts are listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountsResponse'
        204:
          description: Indicates that the request was performed but no content is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        206:
          description: Successful response, with a partial representation of a list of accounts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        429:
          description: Error caused by exceeding unattended accesses to api due to calling to this api and account combination too many times in one day.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        504:
          description: Returned when request has been timed out in the gateway.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/accounts/{accountId}:
    get:
      tags:
      - Accounts
      summary: Detailed information about an account.
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: accountId
        in: path
        description: Internal technical account identifier
        required: true
        schema:
          type: string
      responses:
        200:
          description: Request was fulfilled and one account is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        204:
          description: Indicates that the request was performed but no content is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        429:
          description: Error caused by exceeding unattended accesses to api due to calling to this api and account combination too many times in one day.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        504:
          description: Returned when request has been timed out in the gateway.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/accounts/{accountId}/balances:
    get:
      tags:
      - Accounts
      summary: Get all types of balances for the selected account.
      parameters:
      - name: accountId
        in: path
        description: Internal technical account identifier
        required: true
        schema:
          type: string
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: Request was fulfilled and balances are listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalancesResponse'
        204:
          description: Indicates that the request was performed but no content is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        206:
          description: Successful response, with a partial representation of a list of transactions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        429:
          description: Error caused by exceeding unattended accesses to api due to calling to this api and account combination too many times in one day.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        504:
          description: Returned when request has been timed out in the gateway.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/accounts/{accountId}/holders:
    get:
      tags:
      - Accounts
      summary: Get all holders of the selected account.
      parameters:
      - name: accountId
        in: path
        description: Internal technical account identifier
        required: true
        schema:
          type: string
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: Request was fulfilled and account holders are listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountHoldersResponse'
        204:
          description: Indicates that the request was performed but no content is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        206:
          description: Successful response, with a partial representation of a list of transactions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        429:
          description: Error caused by exceeding unattended accesses to api due to calling to this api and account combination too many times in one day.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        504:
          description: Returned when request has been timed out in the gateway.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/loans:
    get:
      tags:
      - Loans
      summary: Get loans.
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: Request was fulfilled and loans are listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoansResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        504:
          description: Returned when request has been timed out in the gateway.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/loans/events:
    get:
      tags:
      - Loans
      summary: List events that effects loans.
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: Request was fulfilled and events of loans are listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoanEventsResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        504:
          description: Returned when request has been timed out in the gateway.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/loans/history:
    get:
      tags:
      - Loans
      summary: List historical rates and balances for all loans together.
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: Request was fulfilled and history of loans are listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoanTimelinesResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        504:
          description: Returned when request has been timed out in the gateway.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/accounts/{accountId}/transactions:
    get:
      tags:
      - Transactions
      summary: Get a list of transactions for the selected account.
      parameters:
      - name: accountId
        in: path
        description: Internal technical account identifier.
        required: true
        schema:
          type: string
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      - name: bookingStatus
        in: query
        description: Filter transactions by booking status
        schema:
          $ref: '#/components/schemas/BookingStatusType'
      - name: dateFrom
        in: query
        description: Filter transactions by a "from" date. Value is Unix timestamp.
        schema:
          type: integer
          format: int64
      - name: dateTo
        in: query
        description: Filter transactions by a "to" date. Value is Unix timestamp.
        schema:
          type: integer
          format: int64
      - name: sequenceNumber
        in: query
        description: Set to get next transactions page.
        schema:
          type: string
      - name: hash
        in: query
        description: Filter transactions by hash.
        schema:
          type: string
      responses:
        200:
          description: Request was fulfilled and transactions are listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
        204:
          description: Indicates that the request was performed but no content is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        206:
          description: Successful response, with a partial representation of a list of transactions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        429:
          description: Error caused by exceeding unattended accesses to api due to calling to this api and account combination too many times in one day.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        504:
          description: Returned when request has been timed out in the gateway.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/accounts/{accountId}/transactions/{transactionId}:
    get:
      tags:
      - Transactions
      summary: Get a transaction by transaction identifier.
      parameters:
      - name: accountId
        in: path
        description: Internal technical account identifier.
        required: true
        schema:
          type: string
      - name: transactionId
        in: path
        description: Transaction identifier.
        required: true
        schema:
          type: string
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: Request was fulfilled and transaction is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        204:
          description: Indicates that the request was performed but no content is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        206:
          description: Successful response, with a partial representation of a list of transactions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        429:
          description: Error caused by exceeding unattended accesses to api due to calling to this api and account combination too many times in one day.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        504:
          description: Returned when request has been timed out in the gateway.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/payments:
    post:
      tags:
      - PaymentRequests
      summary: Creating a Payment Request.
      requestBody:
        description: Payment Request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentRequest'
        required: true
      responses:
        201:
          description: The request has been fulfilled and a payment request is created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentRequestModel'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by user not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      tags:
      - PaymentRequests
      summary: Get all Payment Requests for selected organizationId.
      parameters:
      - name: searchClientId
        in: query
        description: Search by client identifier
        schema:
          type: string
      - name: searchRecipient
        in: query
        description: Search by recipient
        schema:
          type: string
      - name: searchStatus
        in: query
        description: Search by payment request status, comma separated (E.G. "AUTHORIZED, IN_PROGRESS" will fetch only payments with AUTHORIZED and IN_PROGRESS status).
        schema:
          type: string
      - name: searchClientAccess
        in: query
        description: Environment on which the call has been invoked, comma separated (e.g. "PRODUCTION, SANDBOX", or "SANDBOX"). Blank returns all.
        schema:
          type: string
      - name: sortBy
        in: query
        description: Sort response by clientId, recipient, status
        schema:
          type: string
      - name: sortDirection
        in: query
        description: Sort direction "desc" or "asc"
        schema:
          type: string
      - name: pageIndex
        in: query
        description: Page index
        schema:
          type: integer
          format: int32
          default: 0
      - name: pageSize
        in: query
        description: Items per page
        schema:
          type: integer
          format: int32
          default: 10
      responses:
        200:
          description: Request was fulfilled and Payment Requests are listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedPaymentRequestModels'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/payments/{id}:
    get:
      tags:
      - PaymentRequests
      summary: Get Payment Request details by id.
      parameters:
      - name: id
        in: path
        description: Payment Request identifier
        required: true
        schema:
          type: string
      responses:
        200:
          description: Request was fulfilled and Payment Request data is listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentRequestModel'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        204:
          description: Request was fulfilled, no object with such id found.
    delete:
      tags:
      - PaymentRequests
      summary: Delete Payment Request.
      parameters:
      - name: id
        in: path
        description: Payment Request identifier.
        required: true
        schema:
          type: string
      responses:
        204:
          description: Request was fulfilled and Payment Request is deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoContentResult'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by user not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/payments/products:
    get:
      tags:
      - Payments
      summary: Get provider's payment products.
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: Request was fulfilled and payments products are listed.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PaymentProduct'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/payments/{paymentId}/status:
    get:
      tags:
      - Payments
      summary: Get payment status.
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      - name: paymentId
        in: path
        description: Payment identifier
        required: true
        schema:
          type: string
      responses:
        200:
          description: Request was fulfilled and payment is listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentStatusResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        405:
          description: This method is currently not available for corporate access, only for payments to private individuals.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        504:
          description: Returned when request has been timed out in the gateway.
  /v1/payments/{paymentId}/initiate:
    post:
      tags:
      - Payments
      summary: Creating a request for initiating payment.
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      - name: paymentId
        in: path
        description: Payment Request identifier
        required: true
        schema:
          type: string
      requestBody:
        description: Payment innitiation request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentAuthorizationRequest'
        required: true
      responses:
        200:
          description: The request has been fulfilled and a payment is initiated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentStatusResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/payments/{paymentId}/authorize:
    post:
      tags:
      - Payments
      summary: Creating an authorization request for initiating payment.
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      - name: paymentId
        in: path
        description: Payment Request identifier
        required: true
        schema:
          type: string
      requestBody:
        description: Payment authorization request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentAuthorizationRequest'
        required: true
      responses:
        200:
          description: The request has been fulfilled and a payment is initiated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentStatusResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/payments/{paymentId}/execute:
    post:
      tags:
      - Payments
      summary: Execute payment
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      - name: paymentId
        in: path
        description: Payment identifier
        required: true
        schema:
          type: string
      responses:
        200:
          description: Request was fulfilled and payment executed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentStatusResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/payments/templates:
    post:
      tags:
      - PaymentTemplates
      summary: Creating a payment template.
      requestBody:
        description: Payment template body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentTemplate'
      responses:
        201:
          description: The request has been fulfilled and a payment template is created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentTemplate'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      tags:
      - PaymentTemplates
      summary: Get all templates.
      responses:
        200:
          description: Request was fulfilled and payment trmplates are listed.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PaymentTemplate'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/payments/templates/{id}:
    get:
      tags:
      - PaymentTemplates
      summary: Get payment template by id.
      parameters:
      - name: id
        in: path
        description: Payment template identifier.
        required: true
        schema:
          type: string
      responses:
        200:
          description: Request was fulfilled and template data is listed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentTemplate'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        204:
          description: Request was fulfilled, no object with such id found.
    put:
      tags:
      - PaymentTemplates
      summary: Creating a request to update a Payment template.
      parameters:
      - name: id
        in: path
        description: Payment template identifier.
        required: true
        schema:
          type: string
      requestBody:
        description: Payment template request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePaymentTemplate'
      responses:
        200:
          description: The request has been fulfilled and a payout is updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentTemplate'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
      - PaymentTemplates
      summary: Delete payment template.
      parameters:
      - name: id
        in: path
        description: Payment template identifier.
        required: true
        schema:
          type: string
      responses:
        204:
          description: Request was fulfilled and Payment template data is deleted.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/NoContentResult'
            application/json:
              schema:
                $ref: '#/components/schemas/NoContentResult'
            text/json:
              schema:
                $ref: '#/components/schemas/NoContentResult'
        400:
          description: Error caused by invalid or missing data.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/payments/templates/{id}/initiate:
    post:
      tags:
      - PaymentTemplates
      summary: Creating a payment request from a template.
      parameters:
      - name: id
        in: path
        description: Template identifier
        required: true
        schema:
          type: string
      requestBody:
        description: Payment template body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentRequestInit'
      responses:
        201:
          description: The request has been fulfilled and a payment request is created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentRequestModel'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by end user (PSU) not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/signing-baskets:
    post:
      tags:
      - SigningBaskets
      summary: Create a new signing basket.
      requestBody:
        description: Create Signing Basket Request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SigningBasketCreateRequest'
        required: true
      responses:
        201:
          description: The request has been fulfilled and signing basket is created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SigningBasketResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by user not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/signing-baskets/{id}:
    get:
      tags:
      - SigningBaskets
      summary: Get Signing Basket details.
      parameters:
      - name: id
        in: path
        description: Signing Basket identifier
        required: true
        schema:
          type: string
      responses:
        200:
          description: The request has been fulfilled and Signing Basket is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SigningBasketResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by user not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
      - SigningBaskets
      summary: Delete Signing Basket. Signing Basket can be cancelled
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        204:
          description: The request has been fulfilled and Signing Basket is deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoContentResult'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by user not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/signing-baskets/{id}/initiate:
    post:
      tags:
      - SigningBaskets
      summary: Initiate Signing Basket.
      parameters:
      - name: id
        in: path
        description: Signing Basket identifier
        required: true
        schema:
          type: string
      - name: sessionId
        in: header
        description: The session identifier from the authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      requestBody:
        description: Signing Basket initiation request
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/SigningBasketInitiationRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/SigningBasketInitiationRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/SigningBasketInitiationRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/SigningBasketInitiationRequest'
        required: true
      responses:
        200:
          description: The request has been fulfilled and Signing Basket is initiated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SigningBasketResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by user not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/signing-baskets/{id}/authorize:
    post:
      tags:
      - SigningBaskets
      summary: Create an authorization request for initiated Signing Basket.
      parameters:
      - name: id
        in: path
        description: Signing Basket identifier
        required: true
        schema:
          type: string
      - name: sessionId
        in: header
        description: The session identifier from the authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from authorization response.
        schema:
          type: string
          format: uuid
      requestBody:
        description: Signing Basket authorization request
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/SigningBasketAuthorizationRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/SigningBasketAuthorizationRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/SigningBasketAuthorizationRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/SigningBasketAuthorizationRequest'
        required: true
      responses:
        200:
          description: The request has been fulfilled and authorization process is started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SigningBasketResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by user not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/signing-baskets/{id}/execute:
    post:
      tags:
      - SigningBaskets
      summary: Execute previously authorized Signing Basket.
      parameters:
      - name: id
        in: path
        description: Signing Basket identifier
        required: true
        schema:
          type: string
      - name: sessionId
        in: header
        description: The session identifier from the authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier from the authorization response
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: The request has been fulfilled and signing basket is executed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SigningBasketResponse'
        400:
          description: Error caused by invalid or missing data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Authentication failed due to missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        403:
          description: Error caused by user not permitted access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Endpoint does not exist or URL is not constructed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Returned when service is unavailable due to scheduled reasons, such as maintenance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/insights/request:
    post:
      tags:
      - Insights
      summary: Creating an insights request.
      parameters:
      - name: sessionId
        in: header
        description: The session identifier from authorization response
        schema:
          type: string
          format: uuid
      - name: authorizationId
        in: header
        description: The Authorization identifier
        schema:
          type: string
          format: uuid
      - name: sandbox
        in: query
        description: ''
        schema:
          type: boolean
          default: false
      - name: callbackUri
        in: query
        description: ''
        schema:
          type: string
          default: ''
      requestBody:
        description: ''
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/CreateInsightsRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInsightsRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateInsightsRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateInsightsRequest'
        required: true
      responses:
        201:
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/InsightsRequestStatus'
            application/json:
              schema:
                $ref: '#/components/schemas/InsightsRequestStatus'
            text/json:
              schema:
                $ref: '#/components/schemas/InsightsRequestStatus'
        400:
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/insights/{requestId}:
    get:
      tags:
      - Insights
      summary: Get an insights report.
      parameters:
      - name: requestId
        in: path
        description: request identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        200:
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/InsightsResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/InsightsResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/InsightsResponse'
        400:
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        404:
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        500:
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    AccountDetails:
      type: object
      properties:
        fixationPeriod:
          type: integer
          description: The interest rate fixation period determines the period for which the interest rate agreed in the loan agreement is applicable. This period is expressed in months.
          format: int32
          nullable: true
        interestRate:
          type: number
          description: Interest rate of the loans and savings accounts.
          format: double
          nullable: true
        nextTermsModificationDay:
          type: integer
          description: A terms modification day is a point in time when the initial fixed interest rate changes after the defined period.
          format: int64
          nullable: true
        type:
          $ref: '#/components/schemas/LoanType'
      additionalProperties: false
      description: Account details contain information only applicable for loan and saving accounts.
    AccountHolderRoleType:
      enum:
      - AUTHORIZED_USER
      - HOLDER
      type: string
      description: Currently available roles of the account holder.
    AccountHoldersResponse:
      type: object
      properties:
        accountId:
          type: string
          description: The internal technical identifier of th account.
          nullable: true
        holders:
          type: array
          items:
            $ref: '#/components/schemas/AccountHolder'
          description: List of the persons or companies who have access to the selected account.
          nullable: true
        type:
          $ref: '#/components/schemas/AccountHolderType'
      additionalProperties: false
      description: Object with a list of holders and holder's type.
    AccountHolderType:
      enum:
      - BUSINESS
      - CORPORATE
      - PERSONAL
      - UNKNOWN
      type: string
      description: Currently available accounts types.
    AccountsResponse:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/Account'
          description: List of Finshark.Connections.Core.Accounts.Account.
          nullable: true
      additionalProperties: false
      description: The list of accounts.
    AccountType:
      enum:
      - BUSINESS
      - CHECKING
      - CREDIT_CARD
      - EXTERNAL
      - INVESTMENT
      - LOAN
      - MORTGAGE
      - OTHER
      - PENSION
      - SAVINGS
      type: string
      description: Available types of the account.
    Amount:
      type: object
      properties:
        currency:
          type: string
          description: The currency code. This must be a valid ISO 4217 currency code. See the ASPSPs' documentation for details of supported currencies.
          nullable: true
        value:
          type: number
          description: 'The amount given with fractional digits, where fractions must be compliant to the currency definition. Up to 14 significant figures. Negative amounts are signed by minus. The decimal separator is a dot.: -?[0-9]{1,14}(\\.[0-9]{1,3})?.'
          format: double
          nullable: true
      additionalProperties: false
      description: Amount with value and currency.
    BalancesDetails:
      type: object
      properties:
        available:
          $ref: '#/components/schemas/Amount'
        booked:
          $ref: '#/components/schemas/Amount'
        creditLimit:
          $ref: '#/components/schemas/Amount'
        current:
          $ref: '#/components/schemas/Amount'
      additionalProperties: false
      description: Represents the details of the different types of balances.
    BalancesResponse:
      type: object
      properties:
        accountId:
          type: string
          description: The internal technical identifier of the account.
          nullable: true
        balances:
          $ref: '#/components/schemas/BalancesDetails'
      additionalProperties: false
      description: The object with the account's balances.
    BookingStatusType:
      enum:
      - ALL
      - BOOKED
      - PENDING
      type: string
      description: Currently available booking statuses of the transactions.
    LoanEvent:
      type: object
      properties:
        accountId:
          type: string
          description: The internal technical identifier of the account which has the loans in some of the banks or other financial institutions.
          nullable: true
        balance:
          type: number
          description: The current balance of the account loan.
          format: double
          nullable: true
        interestRate:
          type: number
          description: The interest rate is the percentage of the loan amount charged for borrowing the principal. It is a re-occurring fee the borrower must pay, in addition to the principal. The rate at which interest is charged is always recorded in the promissory note.
          format: double
          nullable: true
        interestRateChange:
          type: number
          description: The change of the interest rate.
          format: double
          nullable: true
        loanName:
          type: string
          description: Loan display name.
          nullable: true
        loanType:
          $ref: '#/components/schemas/LoanType'
        name:
          type: string
          description: Name of the loan event.
          nullable: true
        nextTermsModificationDay:
          type: integer
          description: A terms modification day is a point in time when the initial fixed interest rate changes after the defined period.
          format: int64
          nullable: true
        providerId:
          type: string
          description: Bank or other financial institution identifier which approved the loan.
          nullable: true
        timestamp:
          type: integer
          description: A timestamp of the loan event.
          format: int64
          nullable: true
        type:
          type: string
          description: Type of the event.
          nullable: true
      additionalProperties: false
      description: The loan event represents the event in time when the properties of a loan is changing.
    LoanEventsResponse:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/LoanEvent'
          description: Lists of the events that affect the properties of a loan.
          nullable: true
      additionalProperties: false
      description: The cumulative response of the loans events.
    LoansResponse:
      type: object
      properties:
        loans:
          type: array
          items:
            $ref: '#/components/schemas/Loan'
          description: List of all loans that user has in selected bank or financial institution.
          nullable: true
        overallAmount:
          type: number
          description: The overall amount of all loans.
          format: double
          nullable: true
        weightedAverageInterestRate:
          type: number
          description: A weighted average interest rate is an average that is adjusted to reflect the contribution of each loan to the total debt. The weighted average multiplies each loan’s interest rate by the loan balance and divides the sum by the total loan balance.
          format: double
          nullable: true
      additionalProperties: false
      description: The cumulative response of the loans.
    LoanTimeline:
      type: object
      properties:
        accountId:
          type: string
          description: The internal technical identifier of the account which has the loans in the bank or other financial institution.
          nullable: true
        balanceTimeline:
          type: array
          items:
            $ref: '#/components/schemas/PairLongDateDoubleValue'
          description: List of balances on date of their changes.
          nullable: true
        interestRateTimeline:
          type: array
          items:
            $ref: '#/components/schemas/PairLongDateDoubleValue'
          description: List of interest rates on date of their changes.
          nullable: true
      additionalProperties: false
      description: Timeline with interest rates and balances of all loans.
    LoanTimelinesResponse:
      type: object
      properties:
        timelines:
          type: array
          items:
            $ref: '#/components/schemas/LoanTimeline'
          description: List of loan timelines.
          nullable: true
        weightedAverageTimeline:
          type: array
          items:
            $ref: '#/components/schemas/PairStringKeyDoubleValue'
          description: A weighted average interest rate during time for all loans. The key is in format "yyyy-MM".
          nullable: true
      additionalProperties: false
      description: The cumulative response of the loans timelines including rate changes, balances and weighted average calculations.
    LoanType:
      enum:
      - BLANCO
      - CREDIT
      - LAND
      - MEMBERSHIP
      - MORTGAGE
      - OTHER
      - STUDENT
      - VEHICLE
      type: string
      description: The possible types of loans.
    MetaData:
      type: object
      properties:
        download:
          type: string
          description: Link which is used to download transaction details in different formats.
          nullable: true
        nextLink:
          type: string
          description: Used in long transaction response as page next link, where is required to return next page to get more information of transaction details. It is filled with sequence number, date from and date to of the transactions.
          nullable: true
      additionalProperties: false
      description: Meta data object with information of page pagination.
    PairLongDateDoubleValue:
      type: object
      properties:
        date:
          type: integer
          description: Unix epoch timestamp milliseconds.
          format: int64
          nullable: true
        value:
          type: number
          description: Value in that moment.
          format: double
          nullable: true
      additionalProperties: false
      description: Represents date and value pair.
    PairStringKeyDoubleValue:
      type: object
      properties:
        key:
          type: string
          description: The key name.
          nullable: true
        value:
          type: number
          description: Value of the selected key.
          format: double
          nullable: true
      additionalProperties: false
      description: Represents the key and double value pair.
    RemittanceInformation:
      type: object
      properties:
        reference:
          type: string
          description: The remittance reference number for the payment.
          nullable: true
        referenceType:
          $ref: '#/components/schemas/RemittanceInformationType'
      additionalProperties: false
      description: Remittance information.
    RemittanceInformationType:
      enum:
      - OCR
      - REFERENCE
      - SCOR
      - UNSTRUCTURED
      type: string
      description: The remittance information type for the payments and transactions.
    TransactionCategory:
      enum:
      - EXPENSES
      - INCOME
      - TRANSFERS
      type: string
      description: The available categories of the transactions.
    TransactionsResponse:
      type: object
      properties:
        metaData:
          $ref: '#/components/schemas/MetaData'
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
          description: The transactions resulting from the query.
          nullable: true
      additionalProperties: false
      description: The response that contains the information about transactions.
    TransactionStatus:
      enum:
      - BOOKED
      - PENDING
      type: string
      description: The possible status of the transaction.
    TransactionType:
      enum:
      - CARD
      - PAYMENT
      - OTHER
      - TRANSFER
      - WITHDRAWAL
      type: string
      description: Type of the transaction.
    CreatePaymentRequest:
      required:
      - amount
      - creditor
      - paymentProductId
      - region
      - remittanceInformation
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/PaymentRequestAmount'
        creditor:
          $ref: '#/components/schemas/PaymentCreditor'
        debtor:
          $ref: '#/components/schemas/PaymentDebtor'
        executionDate:
          type: integer
          format: int64
          nullable: true
        remittanceInformation:
          $ref: '#/components/schemas/PaymentRequestRemittanceInformation'
        region:
          type: string
        paymentProductId:
          type: string
        paymentTemplateId:
          type: string
          nullable: true
      additionalProperties: false
    CreatePaymentTemplate:
      required:
      - creditor
      - name
      - paymentProductId
      - region
      type: object
      properties:
        name:
          type: string
        description:
          type: string
          nullable: true
        creditor:
          $ref: '#/components/schemas/PaymentCreditor'
        amount:
          $ref: '#/components/schemas/PaymentTemplateAmount'
        remittanceInformation:
          $ref: '#/components/schemas/PaymentRequestRemittanceInformation'
        region:
          type: string
        paymentProductId:
          type: string
      additionalProperties: false
    Debtor:
      required:
      - account
      type: object
      properties:
        account:
          $ref: '#/components/schemas/Account'
        message:
          type: string
          description: Own message to be on the debtor's transaction. Max length 12 characters.
          nullable: true
        name:
          type: string
          description: Name of the debtor.
          nullable: true
      additionalProperties: false
      description: Debtor information.
    NoContentResult:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
      additionalProperties: false
    PagedPaymentRequestModels:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PaymentRequestModel'
          nullable: true
        totalItemsCount:
          type: integer
          format: int64
      additionalProperties: false
    PaymentAccount:
      required:
      - accountNumber
      - accountType
      type: object
      properties:
        accountNumber:
          type: string
        accountType:
          $ref: '#/components/schemas/PaymentAccountType'
        bic:
          type: string
          nullable: true
        currencyCode:
          type: string
          nullable: true
      additionalProperties: false
    PaymentAccountType:
      enum:
      - IBAN
      - BBAN
      - BG
      - PG
      type: string
    PaymentAuthorizationRequest:
      required:
      - selectedScaMethod
      type: object
      properties:
        qrCodeRequired:
          type: boolean
          description: Set only when selected SCA method is decoupled and if want to generate QR code from the authorization response.
        debtor:
          $ref: '#/components/schemas/Debtor'
        redirectUri:
          type: string
          description: Mandatory if chosen PSU_REDIRECT authorization method. Customer will be redirected to this url after payment authorization is completed. Supports only HTTPS.
          nullable: true
        selectedScaMethod:
          $ref: '#/components/schemas/ScaMethodType'
      additionalProperties: false
      description: Request for the payment authorization.
    PaymentCreditor:
      required:
      - account
      - name
      type: object
      properties:
        account:
          $ref: '#/components/schemas/PaymentAccount'
        message:
          type: string
          nullable: true
        name:
          type: string
      additionalProperties: false
    PaymentDebtor:
      required:
      - account
      type: object
      properties:
        account:
          $ref: '#/components/schemas/PaymentAccount'
        message:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
      additionalProperties: false
    PaymentProduct:
      type: object
      properties:
        id:
          type: string
          description: Product identifier.
          nullable: true
        name:
          type: string
          description: Name of the product.
          nullable: true
      additionalProperties: false
      description: Information about payment product.
    PaymentRequestAmount:
      required:
      - currency
      - value
      type: object
      properties:
        currency:
          type: string
        value:
          type: number
          format: double
      additionalProperties: false
    PaymentRequestInit:
      required:
      - debtor
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/PaymentRequestAmount'
        remittanceInformation:
          $ref: '#/components/schemas/PaymentRequestRemittanceInformation'
        debtor:
          $ref: '#/components/schemas/PaymentDebtor'
        executionDate:
          type: integer
          format: int64
          nullable: true
      additionalProperties: false
    PaymentRequestModel:
      required:
      - amount
      - creditor
      - id
      - paymentProductId
      - region
      - remittanceInformation
      type: object
      properties:
        id:
          type: string
          format: uuid
        clientId:
          type: string
          nullable: true
        ClientAccess:
          type: string
          nullable: true
        status:
          type: string
          nullable: true
        amount:
          $ref: '#/components/schemas/PaymentRequestAmount'
        creditor:
          $ref: '#/components/schemas/PaymentCreditor'
        debtor:
          $ref: '#/components/schemas/PaymentDebtor'
        executionDate:
          type: integer
          format: int64
          nullable: true
        remittanceInformation:
          $ref: '#/components/schemas/PaymentRequestRemittanceInformation'
        region:
          type: string
        paymentProductId:
          type: string
        paymentTemplateId:
          type: string
          nullable: true
      additionalProperties: false
    PaymentRequestRemittanceInformation:
      required:
      - type
      - value
      type: object
      properties:
        value:
          type: string
        type:
          $ref: '#/components/schemas/PaymentRequestRemittanceInformationType'
      additionalProperties: false
    PaymentRequestRemittanceInformationType:
      enum:
      - UNSTRUCTURED
      - OCR
      type: string
    PaymentStatusResponse:
      required:
      - id
      - status
      type: object
      properties:
        id:
          type: string
          description: Payment identifier.
        status:
          $ref: '#/components/schemas/PaymentStatusType'
        psuMessage:
          type: string
          description: Message for the PSU, included if an action needs to be taken by the user during a pending signing.
          nullable: true
        scaMethods:
          type: array
          items:
            $ref: '#/components/schemas/ScaMethod'
          description: List of available SCA methods.
          nullable: true
        tppMessages:
          type: array
          items:
            type: string
          description: Message for the TPP, e.g. if an action needs to be taken by the user during a pending signing or an error message.
          nullable: true
      additionalProperties: false
      description: Response on the payment status an authorization request.
    PaymentStatusType:
      enum:
      - CREATED
      - RECEIVED
      - CANCELED
      - FAILED
      - REJECTED
      - RECIPIENT_AUTHORIZATION_REQUIRED
      - AUTHORIZATION_REQUIRED
      - IN_PROGRESS_CODE
      - IN_PROGRESS
      - RECIPIENT_AUTHORIZED
      - AUTHORIZED
      - COMPLETED
      - DELETED
      type: string
      description: Available payment statuses.
    PaymentTemplate:
      required:
      - creditor
      - id
      - name
      - paymentProductId
      - region
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        creditor:
          $ref: '#/components/schemas/PaymentCreditor'
        amount:
          $ref: '#/components/schemas/PaymentTemplateAmount'
        remittanceInformation:
          $ref: '#/components/schemas/PaymentRequestRemittanceInformation'
        region:
          type: string
        paymentProductId:
          type: string
      additionalProperties: false
    PaymentTemplateAmount:
      required:
      - currency
      - value
      type: object
      properties:
        currency:
          type: string
        value:
          type: number
          format: double
        isAmountEditable:
          type: boolean
      additionalProperties: false
    ScaMethod:
      required:
      - scaMethodType
      type: object
      properties:
        href:
          type: string
          description: Redirect link for redirect or decoupled SCA methods.
          nullable: true
        downloadLink:
          type: string
          description: >-
            Download link used to get image that contains dynamic QR code.

            Supported formats:

                PNG.
          nullable: true
        downloadInterval:
          type: integer
          description: Download interval represents the period of changing the content of the downloadLink.
          format: int32
          nullable: true
        scaMethodType:
          $ref: '#/components/schemas/ScaMethodType'
      additionalProperties: false
      description: Strong customer authentication method.
    ScaMethodType:
      enum:
      - PSU_DECOUPLED
      - PSU_REDIRECT
      type: string
      description: Strong customer authentication methods.
    SigningBasketAuthorizationRequest:
      required:
      - selectedScaMethod
      type: object
      properties:
        redirectUri:
          type: string
          nullable: true
        selectedScaMethod:
          $ref: '#/components/schemas/ScaMethodType'
      additionalProperties: false
    SigningBasketCreateRequest:
      required:
      - paymentIds
      type: object
      properties:
        paymentIds:
          type: array
          items:
            type: string
      additionalProperties: false
    SigningBasketInitiationRequest:
      required:
      - debtor
      type: object
      properties:
        debtor:
          $ref: '#/components/schemas/PaymentDebtor'
        redirectUri:
          type: string
          nullable: true
      additionalProperties: false
    SigningBasketResponse:
      required:
      - amount
      - currency
      - id
      - paymentIds
      - status
      type: object
      properties:
        amount:
          type: number
          format: double
        currency:
          type: string
        id:
          type: string
        paymentIds:
          type: array
          items:
            type: string
        scaMethods:
          type: array
          items:
            $ref: '#/components/schemas/ScaMethod'
          nullable: true
        status:
          $ref: '#/components/schemas/SigningBasketStatus'
      additionalProperties: false
    SigningBasketStatus:
      enum:
      - CREATED
      - RECEIVED
      - CANCELED
      - FAILED
      - REJECTED
      - AUTHORIZATION_REQUIRED
      - IN_PROGRESS_CODE
      - IN_PROGRESS
      - AUTHORIZED
      - COMPLETED
      - DELETED
      type: string
    UpdatePaymentTemplate:
      type: object
      properties:
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        creditor:
          $ref: '#/components/schemas/PaymentCreditor'
        amount:
          $ref: '#/components/schemas/PaymentTemplateAmount'
        remittanceInformation:
          $ref: '#/components/schemas/PaymentRequestRemittanceInformation'
        region:
          type: string
          nullable: true
        paymentProductId:
          type: string
          nullable: true
      additionalProperties: false
    Account:
      type: object
      properties:
        accountNumber:
          type: string
          nullable: true
        bank:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        currencies:
          type: array
          items:
            $ref: '#/components/schemas/Currency'
          nullable: true
        holders:
          type: array
          items:
            $ref: '#/components/schemas/AccountHolder'
          nullable: true
        iban:
          type: string
          nullable: true
        isJointOwnership:
          type: boolean
          nullable: true
        isSharedOwnership:
          type: boolean
          nullable: true
        periodEnd:
          type: string
          nullable: true
        periodStart:
          type: string
          nullable: true
      additionalProperties: false
    AccountHolder:
      type: object
      properties:
        name:
          type: string
          nullable: true
      additionalProperties: false
    BalanceDetails:
      type: object
      properties:
        calendarMonthEndBalance:
          type: number
          format: double
          nullable: true
        calendarMonthStartBalance:
          type: number
          format: double
          nullable: true
        netCashFlow:
          type: number
          format: double
          nullable: true
        statementEndBalance:
          type: number
          format: double
          nullable: true
        statementStartBalance:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    CashDetails:
      type: object
      properties:
        averageCountOfCashDepositAMonth:
          type: number
          format: double
          nullable: true
        averageCountOfCashWithdrawalAMonth:
          type: number
          format: double
          nullable: true
        averageSumOfCashDepositAMonth:
          type: number
          format: double
          nullable: true
        averageSumOfCashWithdrawalAMonth:
          type: number
          format: double
          nullable: true
        cashDepositMonthlyTrend:
          type: number
          format: double
          nullable: true
        cashDepositToIncome:
          type: number
          format: double
          nullable: true
        cashWithdrawalMonthlyTrend:
          type: number
          format: double
          nullable: true
        cashWithdrawalToExpenses:
          type: number
          format: double
          nullable: true
        cashWithdrawalToIncome:
          type: number
          format: double
          nullable: true
        stableMonthlyCashDeposits:
          type: boolean
          nullable: true
      additionalProperties: false
    Categorisation:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/Account'
          nullable: true
        categoryTreeVersion:
          type: string
          nullable: true
      additionalProperties: false
    CategoryId:
      type: object
      properties:
        expense:
          type: string
          nullable: true
        income:
          type: string
          nullable: true
      additionalProperties: false
    Country:
      enum:
      - se
      type: string
    CreateInsightsRequest:
      required:
      - country
      type: object
      properties:
        country:
          $ref: '#/components/schemas/Country'
        dropSharedAccounts:
          type: boolean
          nullable: true
        dropJointAccounts:
          type: boolean
          nullable: true
        period:
          type: integer
          format: int32
          nullable: true
        currency:
          type: string
          nullable: true
      additionalProperties: false
    Currency:
      type: object
      properties:
        code:
          type: string
          nullable: true
        creditTurnover:
          type: number
          format: double
          nullable: true
        debitTurnover:
          type: number
          format: double
          nullable: true
        endBalance:
          type: number
          format: double
          nullable: true
        startBalance:
          type: number
          format: double
          nullable: true
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
          nullable: true
      additionalProperties: false
    Definition:
      type: object
      properties:
        expenses:
          type: array
          items:
            $ref: '#/components/schemas/DefinitionDetails'
          nullable: true
        income:
          type: array
          items:
            $ref: '#/components/schemas/DefinitionDetails'
          nullable: true
      additionalProperties: false
    DefinitionDetails:
      type: object
      properties:
        categoryId:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
      additionalProperties: false
    GamblingDetails:
      type: object
      properties:
        averageCountAMonth:
          type: number
          format: double
          nullable: true
        averageSumAMonth:
          type: number
          format: double
          nullable: true
        daysSinceLastTransaction:
          type: integer
          format: int32
          nullable: true
        gamblingToAllExpenses:
          type: number
          format: double
          nullable: true
        monthlyRegularityOfGambling:
          type: number
          format: double
          nullable: true
        ratioOfCasino:
          type: number
          format: double
          nullable: true
        ratioOfLottery:
          type: number
          format: double
          nullable: true
        ratioOfSportsBetting:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    Income:
      type: object
      properties:
        averageDaysBetweenIncomePayments:
          type: integer
          format: int32
          nullable: true
        averageMonthlyDiscretionaryIncome:
          type: number
          format: double
          nullable: true
        averageMonthlyIncome:
          type: number
          format: double
          nullable: true
        calendarMonths:
          type: integer
          format: int32
          nullable: true
        calendarMonthsWithIncome:
          type: integer
          format: int32
          nullable: true
        daysSinceLastIncomePayment:
          type: integer
          format: int32
          nullable: true
        debtToIncomeRatio:
          type: number
          format: double
          nullable: true
        definitions:
          $ref: '#/components/schemas/Definition'
        incomeByCategory:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/IncomeDetails'
          nullable: true
        lastIncompleteMonth:
          $ref: '#/components/schemas/MonthlyIncome'
        monthlyRegularity:
          type: number
          format: double
          nullable: true
        monthlyStability:
          type: number
          format: double
          nullable: true
        monthlyTrend:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    IncomeDetails:
      type: object
      properties:
        averageIncomePayment:
          type: number
          format: double
          nullable: true
        averageMonthlyIncome:
          type: number
          format: double
          nullable: true
        daysSinceLastIncomePayment:
          type: integer
          format: int32
          nullable: true
        medianIncomePayment:
          type: number
          format: double
          nullable: true
        numberOfIncomePayments:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    InsightsCurrency:
      type: object
      properties:
        displayCurrency:
          type: string
          nullable: true
        appliedCurrencyConversions:
          type: array
          items:
            $ref: '#/components/schemas/InsightsCurrencyDetails'
          nullable: true
      additionalProperties: false
    InsightsCurrencyDetails:
      type: object
      properties:
        currency:
          type: string
          nullable: true
        rate:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    InsightsDetails:
      type: object
      properties:
        currency:
          $ref: '#/components/schemas/InsightsCurrency'
      additionalProperties: false
    InsightsRequestStatus:
      required:
      - id
      - requestStatus
      type: object
      properties:
        id:
          type: string
          format: uuid
        requestStatus:
          $ref: '#/components/schemas/RequestStatus'
      additionalProperties: false
    InsightsResponse:
      required:
      - id
      - requestStatus
      type: object
      properties:
        id:
          type: string
          format: uuid
        requestStatus:
          $ref: '#/components/schemas/RequestStatus'
        rejectReason:
          type: string
          nullable: true
        report:
          $ref: '#/components/schemas/InsightsResponseDetails'
      additionalProperties: false
    InsightsResponseDetails:
      type: object
      properties:
        categorisation:
          $ref: '#/components/schemas/Categorisation'
        creditScores:
          type: object
          additionalProperties:
            type: number
            format: double
          nullable: true
        features:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: number
              format: double
          nullable: true
        insightsDetails:
          $ref: '#/components/schemas/InsightsDetails'
        insightsIncome:
          $ref: '#/components/schemas/Income'
        insightsLoans:
          $ref: '#/components/schemas/Loan'
        insightsRisk:
          $ref: '#/components/schemas/Risk'
        kyc:
          type: array
          items:
            $ref: '#/components/schemas/KycDetails'
          nullable: true
        observations:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Observation'
          nullable: true
        marketing:
          $ref: '#/components/schemas/Marketing'
        simpleScore:
          type: integer
          format: int32
          nullable: true
        metadata:
          $ref: '#/components/schemas/Metadata'
      additionalProperties: false
    KycDetails:
      type: object
      properties:
        address:
          type: string
          nullable: true
        bank:
          type: string
          nullable: true
        dateOfBirth:
          type: string
          nullable: true
        emailAddress:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        fullName:
          type: string
          nullable: true
        iban:
          type: string
          nullable: true
        personIdentification:
          type: array
          items:
            $ref: '#/components/schemas/PersonIdentification'
          nullable: true
        phoneNumber:
          type: string
          nullable: true
      additionalProperties: false
    Loan:
      type: object
      properties:
        averageMonthlyOutgoingLoanPayment:
          type: number
          format: double
          nullable: true
        calendarMonths:
          type: integer
          format: int32
          nullable: true
        calendarMonthsWithIncomingLoans:
          type: integer
          format: int32
          nullable: true
        calendarMonthsWithOutgoingLoans:
          type: integer
          format: int32
          nullable: true
        daysSinceLastIncomingLoan:
          type: integer
          format: int32
          nullable: true
        loansByCategory:
          type: array
          items:
            $ref: '#/components/schemas/LoanDetails'
          nullable: true
        monthlyIncomingLoanTrend:
          type: number
          format: double
          nullable: true
        monthlyOutgoingLoanTrend:
          type: number
          format: double
          nullable: true
        ratioOfIncomingLoansToAllIncome:
          type: number
          format: double
          nullable: true
        ratioOfOutgoingLoansToAllExpenses:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    LoanDetails:
      type: object
      properties:
        averageMonthlyOutgoingLoanPayment:
          type: number
          format: double
          nullable: true
        categoryId:
          $ref: '#/components/schemas/CategoryId'
        categoryTitle:
          type: string
          nullable: true
        daysSinceLastIncomingLoan:
          type: integer
          format: int32
          nullable: true
        monthlyIncomingLoanTrend:
          type: number
          format: double
          nullable: true
        monthlyOutgoingLoanTrend:
          type: number
          format: double
          nullable: true
        numberOfIncomingLoanSources:
          type: integer
          format: int32
          nullable: true
        numberOfOutgoingLoanSources:
          type: integer
          format: int32
          nullable: true
        ratioOfOutgoingLoanCategoryToLoans:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    Marketing:
      type: object
      properties:
        segments:
          $ref: '#/components/schemas/Segments'
      additionalProperties: false
    Metadata:
      type: object
      properties:
        statementDetails:
          $ref: '#/components/schemas/StatementDetails'
        insightsDetails:
          $ref: '#/components/schemas/InsightsDetails'
      additionalProperties: false
    MonthlyIncome:
      type: object
      properties:
        expectedRemainingIncome:
          type: number
          format: double
          nullable: true
        month:
          type: string
          nullable: true
        receivedIncome:
          type: number
          format: double
          nullable: true
        remainingMonthlyDiscretionaryIncome:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    Observation:
      type: object
      properties:
        description:
          type: string
          nullable: true
        severity:
          type: string
          nullable: true
      additionalProperties: false
    PaymentDetails:
      type: object
      properties:
        averageCountAMonth:
          type: number
          format: double
          nullable: true
        averageSumAMonth:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    PersonIdentification:
      type: object
      properties:
        _type:
          type: string
          nullable: true
        id:
          type: string
          nullable: true
      additionalProperties: false
    RequestStatus:
      enum:
      - PENDING
      - PROCESSING
      - PROCESSED
      - REJECTED
      type: string
    Risk:
      type: object
      properties:
        alimonyPayments:
          $ref: '#/components/schemas/PaymentDetails'
        bailiffs:
          $ref: '#/components/schemas/PaymentDetails'
        balance:
          $ref: '#/components/schemas/BalanceDetails'
        cash:
          $ref: '#/components/schemas/CashDetails'
        debtCollection:
          $ref: '#/components/schemas/PaymentDetails'
        dishonours:
          $ref: '#/components/schemas/PaymentDetails'
        gambling:
          $ref: '#/components/schemas/GamblingDetails'
        loanFines:
          $ref: '#/components/schemas/PaymentDetails'
      additionalProperties: false
    Segment:
      type: object
      properties:
        triggered:
          type: boolean
          nullable: true
        details:
          type: string
          nullable: true
      additionalProperties: false
    Segments:
      type: object
      properties:
        hasChildren:
          $ref: '#/components/schemas/Segment'
        hasCar:
          $ref: '#/components/schemas/Segment'
        hasHouse:
          $ref: '#/components/schemas/Segment'
        hasPets:
          $ref: '#/components/schemas/Segment'
        hasLifeInsurance:
          $ref: '#/components/schemas/Segment'
        isDigital:
          $ref: '#/components/schemas/Segment'
        interestedInClothing:
          $ref: '#/components/schemas/Segment'
        interestedInSports:
          $ref: '#/components/schemas/Segment'
        interestedInTraveling:
          $ref: '#/components/schemas/Segment'
        interestedInBeauty:
          $ref: '#/components/schemas/Segment'
        interestedInCulture:
          $ref: '#/components/schemas/Segment'
        interestedInGambling:
          $ref: '#/components/schemas/Segment'
      additionalProperties: false
    StatementDetails:
      type: object
      properties:
        countOfAnalysedAccounts:
          type: integer
          format: int32
          nullable: true
        countOfUploadedAccounts:
          type: integer
          format: int32
          nullable: true
        dropJointAccounts:
          type: boolean
          nullable: true
        dropSharedAccounts:
          type: boolean
          nullable: true
      additionalProperties: false
    Transaction:
      type: object
      properties:
        amount:
          type: number
          format: double
          nullable: true
        categoryId:
          type: integer
          format: int32
        title:
          type: string
          nullable: true
        date:
          type: string
          nullable: true
        info:
          type: string
          nullable: true
        transactionId:
          type: string
          nullable: true
        partner:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: Please enter into field the word 'Bearer' following by space and JWT
      name: Authorization
      in: header
security:
- Bearer: []
