openapi: 3.1.0
info:
  title: Atlar API (v2)
  description: Atlar API (v2)
  version: '0.1'
  contact:
    email: support@atlar.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.txt
servers:
  - url: https://api.atlar.com
tags:
  - name: Connections
    description: Connections represent your technical connections set up by Atlar to your third-party providers such as banks, PSPs, and ERPs.
    x-displayName: Connections
  - name: Credit Transfers
    description: Credit transfers are payments initiated by a debtor to transfer funds to a creditor's account.
    x-displayName: Credit Transfers
  - name: Direct Debits
    description: Direct debits are payments initiated by a creditor to collect funds from a debtor's account.
    x-displayName: Direct Debits
  - name: External Accounts
    description: External accounts are financial accounts held by counterparties at financial institutions.
    x-displayName: External Accounts
  - name: Counterparties
    description: Counterparties are entities that the account holder has a relationship with.
    x-displayName: Counterparties
  - name: Mandates
    description: Mandates are authorizations given by a debtor to a creditor to collect funds from the account.
    x-displayName: Mandates
  - name: Events (webhooks)
    description: Webhooks are automated notifications sent to a specified URL in response to events or changes.
    x-displayName: Events (webhooks)
  - name: Accounts
    description: Accounts are financial accounts held by your organization.
    x-displayName: Accounts
  - name: Transactions
    description: Transactions are movements of funds that have been booked on an account.
    x-displayName: Transactions
  - name: Pending Transactions
    description: Pending transactions are indications of movement of funds that may be booked on an account.
    x-displayName: Pending Transactions
  - name: Entities
    description: Entities are legal entities, e.g. companies.
    x-displayName: Entities
  - name: OAuth
    description: OAuth 2.0 endpoints.
    x-displayName: OAuth
paths:
  /connectivity/v2beta/connections:
    get:
      summary: List connections
      description: Returns a list of connections. For further details on Pagination, see general section above.
      tags:
        - Connections
      parameters:
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of connections.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Connection'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - connections:read
  /connectivity/v2beta/connections/{cid}/reports:
    get:
      summary: List connection reports
      description: Retrieve all connection reports.
      tags:
        - Connections
      parameters:
        - $ref: '#/components/parameters/ConnectionID'
          description: Connection ID
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
        - in: query
          name: type
          description: The report type to filter for.
          schema:
            $ref: '#/components/schemas/ReportType'
        - in: query
          name: statementType
          description: The statement type to filter for. Only applicable if type is STATEMENT.
          schema:
            $ref: '#/components/schemas/StatementType'
      responses:
        '200':
          description: List of connection reports.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/ConnectionReport'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - connections:read
            - connection_reports:read
  /connectivity/v2beta/connections/{cid}/reports/{id}/bank-statements:
    get:
      summary: List bank statements
      description: List bank statements.
      tags:
        - Connections
      parameters:
        - $ref: '#/components/parameters/ConnectionID'
          description: Connection ID
        - $ref: '#/components/parameters/ResourceID'
          description: Report ID
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
        - in: query
          name: account_id
          description: The account ID to filter for.
          schema:
            $ref: '#/components/schemas/ResourceID'
        - in: query
          name: type
          description: The statement period type to filter for.
          schema:
            $ref: '#/components/schemas/StatementPeriodType'
        - in: query
          name: from
          description: The from date to filter for. Returns all statements that contain transactions after or equal to this date.
          schema:
            $ref: '#/components/schemas/Date'
        - in: query
          name: to
          description: The to date to filter for. Returns all statements that contain transactions before or equal to this date.
          schema:
            $ref: '#/components/schemas/Date'
      responses:
        '200':
          description: List of bank statements.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/BankStatement'
                        type: array
                    type: object
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - connections:read
            - connection_reports:read
  /connectivity/v2beta/connections/{cid}/reports/{id}/content:
    get:
      summary: Get raw report content
      description: Download the raw connection report content as retrieved from the third-party.
      tags:
        - Connections
      parameters:
        - $ref: '#/components/parameters/ConnectionID'
          description: Connection ID
        - $ref: '#/components/parameters/ResourceID'
          description: Report ID
      responses:
        '200':
          description: The raw bytes.
          content:
            application/octet-stream: {}
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - connections:read
            - connection_reports:read
            - connection_reports_content:read
  /connectivity/v2beta/connections/{cid}/reports/{rid}/bank-statements/{id}/content:
    get:
      summary: Get raw bank statement content
      description: Download the raw statement content in ISO20022 format.
      tags:
        - Connections
      parameters:
        - $ref: '#/components/parameters/ConnectionID'
          description: Connection ID
        - $ref: '#/components/parameters/ReportID'
          description: Report ID
        - $ref: '#/components/parameters/ResourceID'
          description: Bank statement ID
      requestBody:
        content:
          application/vnd.iso20022.camt.053.001.02+xml: {}
      responses:
        '200':
          description: The bank statement content in ISO20022 format.
          content:
            application/vnd.iso20022.camt.053.001.02+xml: {}
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - connections:read
            - connection_reports:read
            - connection_reports_content:read
  /payments/v2/credit-transfers:
    post:
      summary: Create credit transfer
      description: Create a credit transfer payment.
      tags:
        - Credit Transfers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCreditTransferRequest'
            examples:
              createCreditTransfer_SCT_request:
                $ref: '#/components/examples/CreateCreditTransfer_SCT_Request'
      responses:
        '201':
          description: The created credit transfer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTransfer'
              examples:
                createCreditTransfer_SCT_Response:
                  $ref: '#/components/examples/CreateCreditTransfer_SCT_Response'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - credit_transfers:create
            - accounts:read
            - entities:read
            - external_accounts:read
            - counterparties:read
    get:
      summary: List credit transfers
      description: Returns a list of credit transfers. Sort order is always descending on date.
      tags:
        - Credit Transfers
      parameters:
        - description: Include only credit transfers for the given source account.
          in: query
          name: accountId
          schema:
            type: string
        - description: Include only credit transfers with the given status.
          in: query
          name: status
          schema:
            type: string
            enum:
              - CREATED
              - APPROVED
          example: APPROVED
        - description: Include only credit transfers with property `date` matching the given value. The parameter value may be either a string for equality matching, or an object for range-like matching criteria.
          in: query
          name: date
          explode: true
          style: deepObject
          schema:
            oneOf:
              - type: string
                format: date
                example: '2022-01-15'
                description: Include only credit transfers with `date` equal to the given value.
              - type: object
                properties:
                  gte:
                    type: string
                    format: date
                    example: '2022-01-01'
                    description: Include only credit transfers with `date` after or equal to given date.
                  lte:
                    type: string
                    format: date
                    example: '2022-01-31'
                    description: Include only credit transfers with `date` before or equal to given date.
                  eq:
                    type: string
                    format: date
                    example: '2022-01-15'
                    description: Include only credit transfers with `date` equal to given date.
        - description: Include only credit transfers that are part of the payment batch with the given batch ID.
          in: query
          name: batchId
          schema:
            type: string
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: A list of credit transfers.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/CreditTransfer'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - credit_transfers:read
  /payments/v2/credit-transfers/{id}:
    get:
      summary: Get credit transfer
      description: Retrieve a specific credit transfer.
      tags:
        - Credit Transfers
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
      responses:
        '200':
          description: A credit transfer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTransfer'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - credit_transfers:read
    patch:
      summary: Update credit transfer
      description: |-
        Update a credit transfer.

        The credit transfer execution date can only be changed if the
        credit transfer has not been scheduled for submission yet.
      tags:
        - Credit Transfers
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/CreditTransferJSONPatchRequest'
            examples:
              UpdateDate:
                summary: Change payment execution date.
                value:
                  - op: replace
                    path: /date
                    value: '2022-05-08'
              UpdateStatus:
                summary: Change payment status.
                value:
                  - op: replace
                    path: /status
                    value: RETURNED
      responses:
        '202':
          description: The updated credit transfer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTransfer'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - credit_transfers:update
  /payments/v2/credit-transfers/{id}/events:
    get:
      summary: List credit transfer events
      description: Retrieve events for a specific credit transfer. Returns a list of events. For further details on Pagination, see the section above.
      tags:
        - Credit Transfers
      parameters:
        - $ref: '#/components/parameters/ResourceID'
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of credit transfer events.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Event'
                        type: array
                    type: object
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - credit_transfers:read
  /payments/v2/credit-transfers/{id}:approve:
    post:
      summary: Approve credit transfer
      description: Approve the specified credit transfer.
      tags:
        - Credit Transfers
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovePaymentRequest'
      responses:
        '202':
          description: The now approved credit transfer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTransfer'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - credit_transfers:update
  /payments/v2/credit-transfers/{id}:reject:
    post:
      summary: Reject credit transfer
      description: Reject the specified credit transfer.
      tags:
        - Credit Transfers
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RejectPaymentRequest'
      responses:
        '202':
          description: The now rejected credit transfer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTransfer'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - credit_transfers:update
  /payments/v2beta/credit-transfer-batches:
    post:
      summary: Create credit transfer batch
      description: |-
        Create a batch of credit transfer payments.

        See https://docs.atlar.com/docs/batch-payments for more information.
      tags:
        - Credit Transfers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCreditTransferBatchRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateCreditTransferBatchRequestFormData'
      responses:
        '201':
          description: The created credit transfer batch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTransferBatch'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - credit_transfers:create
            - accounts:read
            - external_accounts:read
            - counterparties:read
    get:
      summary: List credit transfer batches
      description: Returns a list of credit transfer batches.
      tags:
        - Credit Transfers
      parameters:
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: A list of credit transfer batches.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/CreditTransferBatch'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - credit_transfers:read
  /payments/v2beta/credit-transfer-batches/{id}:
    get:
      summary: Get credit transfer batch
      description: Retrieve a specific credit transfer batch.
      tags:
        - Credit Transfers
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
      responses:
        '200':
          description: A credit transfer batch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTransferBatch'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth: []
  /payments/v2beta/credit-transfer-batches/{id}/results:
    get:
      summary: List credit transfer batch results
      description: |-
        List processing results for individual credit transfer requests that were part of a credit transfer batch.
        The result items represent the result(s) of processing the batch request input but doesn't <b>not</b> represent the end-to-end processing of the payment.
      tags:
        - Credit Transfers
      parameters:
        - $ref: '#/components/parameters/ResourceID'
        - description: |
            Filter based on presence of `errors`. If `true`, only
            results with at least one error will be included. If `false`, only
            results with no errors will be included.
          in: query
          name: errors
          schema:
            type: boolean
        - description: |
            Filter based on `skipped`. If `true`, only results related
            to input record that were skipped will be included. If
            `false`, only results that are not related to skipped
            input records will be included.
          in: query
          name: skipped
          schema:
            type: boolean
      responses:
        '200':
          description: A list of payment batch results.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/BatchResult'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          description: |
            Not found will be returned if no payment batch with given
            id exists or if the payment batch is not yet in status
            `COMPLETED`.
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth: []
  /payments/v2/credit-transfer-batches/{id}:approve:
    post:
      summary: Approve credit transfer batch
      description: |-
        Approve the batch of credit transfers.

        Approval of a batch is only applicable when the batch `treatment` is `BATCH`.
      tags:
        - Credit Transfers
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApproveBatchRequest'
      responses:
        '202':
          description: |-
            The request to approve the batch and all the payments it
            contains has been accepted.

            Note that the approval status of the individual payments
            may be processed asynchronous.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTransferBatch'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - credit_transfers:update
  /payments/v2/credit-transfer-batches/{id}:reject:
    post:
      summary: Reject credit transfer batch
      description: |-
        Reject the batch of credit transfers.

        Rejection of a batch is only applicable when the batch `treatment` is `BATCH`.
      tags:
        - Credit Transfers
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RejectPaymentRequest'
      responses:
        '202':
          description: |-
            The request to reject the batch and all the payments it
            contains has been accepted.

            Note that the rejection status of the individual payments
            may be processed asynchronous.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditTransferBatch'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - credit_transfers:update
  /payments/v2/direct-debits:
    post:
      summary: Create direct debit
      description: Create a direct debit payment.
      tags:
        - Direct Debits
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDirectDebitRequest'
      responses:
        '201':
          description: The created direct debit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectDebit'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - direct_debits:create
            - accounts:read
            - external_accounts:read
            - counterparties:read
    get:
      summary: List direct debits
      description: Returns a list of direct debits. For further details on Pagination, see general section above. Sort order is always descending on date.
      tags:
        - Direct Debits
      parameters:
        - description: Include only direct debits for the given destination account.
          in: query
          name: accountId
          schema:
            type: string
        - description: Include only direct debits with the given status.
          in: query
          name: status
          schema:
            $ref: '#/components/schemas/PaymentStatus'
        - description: Include only direct debits with property `date` matching the given value. The parameter value may be either a string for equality matching, or an object for range-like matching criteria.
          in: query
          name: date
          explode: true
          style: deepObject
          schema:
            oneOf:
              - type: string
                format: date
                example: '2022-01-15'
                description: Include only direct debits with `date` equal to the given value.
              - type: object
                properties:
                  gte:
                    type: string
                    format: date
                    example: '2022-01-01'
                    description: Include only direct debits with `date` after or equal to given date.
                  lte:
                    type: string
                    format: date
                    example: '2022-01-31'
                    description: Include only direct debits with `date` before or equal to given date.
                  eq:
                    type: string
                    format: date
                    example: '2022-01-15'
                    description: Include only direct debits with `date` equal to given date.
        - description: Include only direct debits with the given direct debit scheme.
          in: query
          name: scheme
          schema:
            $ref: '#/components/schemas/DirectDebitSchemeType'
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of direct debits.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/DirectDebit'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - direct_debits:read
  /payments/v2/direct-debits/{id}:
    get:
      summary: Get direct debit
      description: Retrieve a specific direct debit.
      tags:
        - Direct Debits
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
      responses:
        '200':
          description: Direct debit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectDebit'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - direct_debits:read
  /payments/v2/direct-debits/{id}/events:
    get:
      summary: List direct debit events
      description: Retrieve events for a specific direct debit. Returns a list of events. For further details on Pagination, see the section above.
      tags:
        - Direct Debits
      parameters:
        - $ref: '#/components/parameters/ResourceID'
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of direct debit events.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Event'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - direct_debits:read
  /payments/v2/direct-debits/{id}:approve:
    post:
      summary: Approve direct debit
      description: Approve the specified direct debit.
      tags:
        - Direct Debits
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovePaymentRequest'
      responses:
        '202':
          description: The now approved direct debit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectDebit'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - direct_debits:update
  /payments/v2/direct-debits/{id}:reject:
    post:
      summary: Reject direct debit
      description: Reject the specified direct debit.
      tags:
        - Direct Debits
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RejectPaymentRequest'
      responses:
        '202':
          description: The now rejected direct debit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectDebit'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - direct_debits:update
  /payments/v2/external-accounts/{id}:
    get:
      summary: Get external account
      description: Retrieve a specific external account.
      tags:
        - External Accounts
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
      responses:
        '200':
          description: An external account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalAccount'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - external_accounts:read
    patch:
      summary: Update external account
      description: Update external account.
      tags:
        - External Accounts
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ExternalAccountJSONPatchRequest'
            examples:
              addIdentifier:
                summary: Add an account identifier
                value:
                  - op: add
                    path: /identifiers/-
                    value:
                      type: IBAN
                      market: DE
                      number: DE75512108001245126199
              addRouting:
                summary: Add routing identifier (e.g. a BIC)
                value:
                  - op: add
                    path: /routing/-
                    value:
                      type: BIC
                      number: DEUTDEFFXXX
              assignAlias:
                summary: Assign an alias
                value:
                  - op: replace
                    path: /alias
                    value: My Account
      responses:
        '200':
          description: Updated account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalAccount'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - external_accounts:update
    delete:
      summary: Delete external account
      description: Deletes the specified external account.
      tags:
        - External Accounts
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - external_accounts:delete
  /payments/v2/external-accounts:
    post:
      summary: Create external account
      description: Create an external account associated with a Counterparty. A maximum of 10 accounts can be created per counterparty.
      tags:
        - External Accounts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateExternalAccountRequest'
      responses:
        '201':
          description: Created account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalAccount'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - external_accounts:create
    get:
      summary: List external accounts
      description: Returns a list of external accounts. For further details on Pagination, see general section above.
      tags:
        - External Accounts
      parameters:
        - description: Free text search of external account identifiers.
          in: query
          name: query
          schema:
            type: string
            minLength: 3
            maxLength: 255
        - description: The ID of a counterparty.
          in: query
          name: counterpartyId
          schema:
            type: string
        - in: query
          name: entityIdsIn
          explode: true
          schema:
            type: array
            items:
              type: string
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of external accounts.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/ExternalAccount'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - external_accounts:read
  /payments/v2/counterparties:
    post:
      summary: Create counterparty
      description: Create a new counterparty.
      tags:
        - Counterparties
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCounterpartyRequest'
      responses:
        '201':
          description: The created counterparty.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Counterparty'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - counterparties:create
    get:
      summary: List counterparties
      description: Returns a list of counterparties. For further details on Pagination, see general section above.
      tags:
        - Counterparties
      parameters:
        - description: Free text search query term for counterparty name, account identifiers and external metadata. Must be at least 3 characters.
          in: query
          name: query
          schema:
            type: string
            minLength: 3
            maxLength: 255
        - in: query
          name: entityIdsIn
          explode: true
          schema:
            type: array
            items:
              type: string
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of counterparties.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Counterparty'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - counterparties:read
  /payments/v2/counterparties/{id}:
    get:
      summary: Get counterparty
      description: Retrieve a specific counterparty.
      tags:
        - Counterparties
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
      responses:
        '200':
          description: A counterparty.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Counterparty'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - counterparties:read
    patch:
      summary: Update counterparty
      description: Update a counterparty.
      tags:
        - Counterparties
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/CounterpartyJSONPatchRequest'
            examples:
              UpdateLegalName:
                summary: Update legal name
                value:
                  - op: replace
                    path: /legalName
                    value: Acme Inc
              UpdateNationalID:
                summary: Update national identifier
                value:
                  - op: replace
                    path: /nationalIdentifier
                    value:
                      market: SE
                      type: CIVIC
                      number: '2012121212'
              UpdateEmail:
                summary: Update email address
                value:
                  - op: replace
                    path: /email
                    value: john.smith@example.com
              UpdatePhone:
                summary: Update phone number
                value:
                  - op: replace
                    path: /phone
                    value: '+12505550199'
              UpdateAddress:
                summary: Update postal address
                value:
                  - op: replace
                    path: /address
                    value:
                      country: US
                      city: New York
                      postalCode: '10017'
                      streetName: E 42nd St
                      streetNumber: '89'
              UpdateExternalID:
                summary: Update external ID.
                value:
                  - op: replace
                    path: /externalId
                    value: my-counterparty-id
      responses:
        '200':
          description: The updated counterparty.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Counterparty'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - counterparties:update
    delete:
      summary: Delete counterparty
      description: Deletes the specified counterparty.
      tags:
        - Counterparties
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - counterparties:delete
            - external_accounts:delete
  /payments/v2/counterparties/{id}/events:
    get:
      summary: List counterparty events
      description: Retrieve events for a specific counterparty. Returns a list of events. For further details on Pagination, see the section above.
      tags:
        - Counterparties
      parameters:
        - $ref: '#/components/parameters/ResourceID'
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of counterparty events.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Event'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - mandates:read
  /payments/v2/mandates:
    post:
      summary: Create mandate
      description: Create a new direct debit mandate.
      tags:
        - Mandates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMandateRequest'
      responses:
        '201':
          description: The created mandate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mandate'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - mandates:create
            - external_accounts:read
            - counterparties:read
    get:
      summary: List mandates
      description: Returns a list of mandates. For further details on Pagination, see general section above.
      tags:
        - Mandates
      parameters:
        - description: Include only mandates associated with the given external account.
          in: query
          name: externalAccountId
          schema:
            type: string
        - description: Include only mandates associated with the given counterparty.
          in: query
          name: counterpartyId
          schema:
            type: string
        - description: Include only mandates with the given status.
          in: query
          name: status
          schema:
            $ref: '#/components/schemas/MandateStatus'
        - description: Include only mandates with the payment scheme.
          in: query
          name: scheme
          schema:
            $ref: '#/components/schemas/DirectDebitSchemeType'
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of mandates.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Mandate'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - mandates:read
  /payments/v2/mandates/{id}:
    get:
      summary: Get mandate
      description: Retrieve a specific mandate.
      tags:
        - Mandates
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
      responses:
        '200':
          description: A mandate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mandate'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - mandates:read
  /payments/v2/mandates/{id}/events:
    get:
      summary: List mandate events
      description: Retrieve events for a specific mandate. Returns a list of events. For further details on Pagination, see the section above.
      tags:
        - Mandates
      parameters:
        - $ref: '#/components/parameters/ResourceID'
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of mandate events.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Event'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - mandates:read
  /payments/v2/mandates/{id}:cancel:
    post:
      summary: Cancel mandate
      description: Cancel a specific mandate.
      tags:
        - Mandates
      parameters:
        - $ref: '#/components/parameters/ResourceIDOrExternalID'
        - $ref: '#/components/parameters/IfMatchETag'
      responses:
        '202':
          description: The cancelled mandate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mandate'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - mandates:update
  /financial-data/v2/accounts/{id}:
    get:
      summary: Get account
      description: Retrieve a specific account.
      tags:
        - Accounts
      parameters:
        - $ref: '#/components/parameters/ResourceID'
          description: Account ID
      responses:
        '200':
          description: An account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - accounts:read
    patch:
      summary: Update account
      description: Update an account.
      tags:
        - Accounts
      parameters:
        - $ref: '#/components/parameters/ResourceID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/AccountJSONPatchRequest'
            examples:
              assignAlias:
                summary: Assign an alias
                value:
                  - op: replace
                    path: /alias
                    value: My Account
              addMetadataKey:
                summary: Add metadata key & value
                value:
                  - op: replace
                    path: /metadata/my_metadata_key
                    value: 2a9a79b9-601c-449b-aa05-432f41dbbc4a
      responses:
        '200':
          description: The updated account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - accounts:update
  /financial-data/v2/accounts:
    get:
      summary: List accounts
      description: Returns a list of accounts. For further details on Pagination, see general section above.
      tags:
        - Accounts
      parameters:
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of accounts.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Account'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - accounts:read
  /financial-data/v2/transactions:
    get:
      summary: List transactions
      description: Returns a list of transactions. For further details on Pagination, see general section above.
      tags:
        - Transactions
      parameters:
        - description: Include only transactions associated with a given account.
          in: query
          name: accountId
          schema:
            type: string
            examples:
              - 31d593d7-fff9-4783-aa1d-92acb7b21a19
        - description: Include only transactions with the given reconcilation status.
          in: query
          name: reconciliationStatus
          schema:
            $ref: '#/components/schemas/TransactionReconciliationStatus'
        - description: Include only transactions with property `date` matching the given value. The parameter value may be either a string for equality matching, or an object for range-like matching criteria.
          in: query
          name: date
          explode: true
          style: deepObject
          schema:
            oneOf:
              - type: string
                format: date
                example: '2022-01-15'
                description: Include only transactions with `date` equal to the given value.
              - type: object
                properties:
                  gte:
                    type: string
                    format: date
                    example: '2022-01-01'
                    description: Include only transactions with `date` after or equal to given date.
                  lte:
                    type: string
                    format: date
                    example: '2022-01-31'
                    description: Include only transactions with `date` before or equal to given date.
                  eq:
                    type: string
                    format: date
                    example: '2022-01-15'
                    description: Include only transactions with `date` equal to given date.
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of transactions.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Transaction'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - transactions:read
  /financial-data/v2/transactions/{id}:
    get:
      summary: Get transaction
      description: Retrieve a specific transaction.
      tags:
        - Transactions
      parameters:
        - description: Transaction ID.
          in: path
          name: id
          required: true
          schema:
            type: string
            example: e37235aa-adab-11ec-8029-96ac651c9332
      responses:
        '200':
          description: Transaction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - transactions:read
    patch:
      summary: Update transaction
      description: Update a transaction.
      tags:
        - Transactions
      parameters:
        - $ref: '#/components/parameters/ResourceID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/TransactionJSONPatchRequest'
            examples:
              addMetadataKey:
                summary: Add metadata key & value
                value:
                  - op: replace
                    path: /metadata/my_metadata_key
                    value: 2a9a79b9-601c-449b-aa05-432f41dbbc4a
      responses:
        '200':
          description: The updated transaction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - transactions:update
  /financial-data/v2/pending-transactions:
    get:
      summary: List pending transactions
      description: Returns a list of pending transactions. For further details on Pagination, see general section above.
      tags:
        - Pending Transactions
      parameters:
        - description: Include only pending transactions associated with a given account.
          in: query
          name: accountId
          schema:
            type: string
            examples:
              - 31d593d7-fff9-4783-aa1d-92acb7b21a19
        - description: Include only pending transactions with property `date` matching the given value. The parameter value may be either a string for equality matching, or an object for range-like matching criteria.
          in: query
          name: date
          explode: true
          style: deepObject
          schema:
            oneOf:
              - type: string
                format: date
                example: '2022-01-15'
                description: Include only pending transactions with `date` equal to the given value.
              - type: object
                properties:
                  gte:
                    type: string
                    format: date
                    example: '2022-01-01'
                    description: Include only pending transactions with `date` after or equal to given date.
                  lte:
                    type: string
                    format: date
                    example: '2022-01-31'
                    description: Include only pending transactions with `date` before or equal to given date.
                  eq:
                    type: string
                    format: date
                    example: '2022-01-15'
                    description: Include only pending transactions with `date` equal to given date.
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of pending transactions.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/PendingTransaction'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - pending_transactions:read
  /financial-data/v2/pending-transactions/{id}:
    get:
      summary: Get transaction
      description: Retrieve a specific pending transaction.
      tags:
        - Pending Transactions
      parameters:
        - description: PendingTransaction ID.
          in: path
          name: id
          required: true
          schema:
            type: string
            example: e37235aa-adab-11ec-8029-96ac651c9332
      responses:
        '200':
          description: PendingTransaction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingTransaction'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - pending_transactions:read
  /financial-data/v2/pending-transactions/{id}/events:
    get:
      summary: List pending transaction events
      description: Retrieve events for a specific pending transaction. Returns a list of events. For further details on Pagination, see the section above.
      tags:
        - Pending Transactions
      parameters:
        - $ref: '#/components/parameters/ResourceID'
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of pending transaction events.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Event'
                        type: array
                    type: object
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - pending_transactions:read
  /financial-data/v2/accounts/{id}/balances:
    get:
      summary: List balances
      description: Returns a list of account balances. For further details on Pagination, see general section above.
      tags:
        - Accounts
      parameters:
        - description: Include only balances associated with the account identified by `id`. If value `-` is specified, balances across all accounts will be queried.
          in: path
          name: id
          required: true
          schema:
            type: string
          examples:
            id:
              value: 31d593d7-fff9-4783-aa1d-92acb7b21a19
              summary: By account identifier.
            hyphen:
              value: '-'
              summary: All accounts.
        - description: Include only balances of specified balance type (`BOOKED` or `AVAILABLE`).
          in: query
          name: type
          schema:
            $ref: '#/components/schemas/BalanceType'
        - description: Include only the most recent balance.
          in: query
          name: mostRecent
          schema:
            type: boolean
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of balances.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Balance'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - accounts:read
            - account_balances:read
  /financial-data/v2/entities:
    post:
      summary: Create entity
      description: Create entity.
      tags:
        - Entities
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEntityRequest'
      responses:
        '200':
          description: Already existing equvivalent entity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entity'
        '201':
          description: The created entity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entity'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - entities:create
    get:
      summary: List entities
      description: Returns a list of entities. For further details on Pagination, see general section above.
      tags:
        - Entities
      parameters:
        - $ref: '#/components/parameters/QueryLimit'
        - $ref: '#/components/parameters/PaginationToken'
      responses:
        '200':
          description: List of entities.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResponse'
                  - properties:
                      items:
                        items:
                          $ref: '#/components/schemas/Entity'
                        type: array
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - entities:read
  /financial-data/v2/entities/{id}:
    get:
      summary: Get entity
      description: Retrieve a specific entity.
      tags:
        - Entities
      parameters:
        - $ref: '#/components/parameters/ResourceID'
          description: Entity ID
      responses:
        '200':
          description: An entity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entity'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - entities:read
    delete:
      summary: Delete entity
      description: Deletes the specified entity. It is only possible to delete an entity if it has no children or has no associated accounts.
      tags:
        - Entities
      parameters:
        - $ref: '#/components/parameters/ResourceID'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - basicAuth:
            - entities:delete
    patch:
      summary: Update entity
      description: Update an entity.
      tags:
        - Entities
      parameters:
        - $ref: '#/components/parameters/ResourceID'
        - $ref: '#/components/parameters/IfMatchETag'
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/EntityJSONPatchRequest'
            examples:
              changeLegalName:
                summary: Change legal name
                value:
                  - op: replace
                    path: /legalName
                    value: Acme Ltd.
      responses:
        '200':
          description: The updated entity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entity'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - basicAuth:
            - entities:update
  /iam/v2beta/oauth2/token:
    post:
      summary: Create OAuth 2.0 access token
      description: |
        This endpoint is an OAuth 2.0 <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-3.2">token endpoint</a> and can be used by a client to obtain an access token.

        Use <a href="https://app.atlar.com/users/all">programmatic access user</a> credentials as OAuth 2.0 client credentials.
        Use the <i>access key</i> as <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-2.2">client identifier (`client_id`)</a>.
        Use the <i>secret</i> as <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1">client password (`client_secret`)</a>.

        This endpoint supports <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1">authentication using HTTP Basic auth</a>.

        This endpoint only supports the OAuth 2.0 <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-4.4">client credentials grant type</a>.
      security:
        - basicAuth: []
      tags:
        - OAuth
      requestBody:
        description: OAuth 2.0 request parameters.
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
              required:
                - grant_type
      responses:
        '200':
          description: Successful OAuth 2.0 <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-4.4.3">access token response</a>.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuth2AccessTokenResponse'
        '400':
          description: Invalid access token request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuth2ErrorResponse'
        '401':
          description: Client authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuth2ErrorResponse'
webhooks:
  resourceEvent:
    post:
      summary: Resource event
      description: Resource event delivered as a webhook request.
      security: []
      tags:
        - Events (webhooks)
      parameters:
        - in: header
          name: Webhook-Signature
          description: |-
            Atlar Webhook request signature.
            Purpose: Makes it possible for your app to verify that the webhook was sent from Atlar (authenticity), and that the message hasn't been altered (integrity).
            See details at https://docs.atlar.com/v2.0/docs/webhooks#webhook-security
          schema:
            type: string
        - in: header
          name: Webhook-Request-Timestamp
          description: |-
            A timestamp specifying when the HTTP request was sent (by Atlar).
            Purpose: Used to mitigate replay attacks.
            See details at https://docs.atlar.com/v2.0/docs/webhooks#webhook-security
          schema:
            type: string
            format: date-time
            example: '2022-10-11T10:13:14.000000015Z'
      requestBody:
        description: Resource event webhook payload.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventWebhookPayload'
            examples:
              WebhookRequestPayload_ResourceEvent_CreditTransfer_Approval:
                $ref: '#/components/examples/WebhookRequestPayload_ResourceEvent_CreditTransfer_Approval'
      responses:
        '200':
          description: Return a 200 OK status to indicate that the data was received and processed successfully.
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  parameters:
    ResourceID:
      in: path
      name: id
      description: Atlar resource ID.
      schema:
        type: string
        pattern: ^[a-zA-Z0-9\-]{1,256}$
      required: true
    IfMatchETag:
      in: header
      name: If-Match
      description: ETag (version) of resource to be updated.
      schema:
        type: string
        pattern: ^version:\d{1,4}$
      examples:
        versionNumberETag:
          value: version:1
    QueryLimit:
      in: query
      name: limit
      description: Limit the number of items in resulting query response.
      schema:
        type: integer
        default: 100
        minimum: 1
        maximum: 500
    PaginationToken:
      in: query
      name: token
      description: If a query response contains a non-empty `nextToken`, use that value as `token` query parameter to continue pagination.
      schema:
        type: string
    ResourceIDOrExternalID:
      in: path
      name: id
      description: Atlar resource ID or External ID. Prefix External IDs with `external:`.
      schema:
        type: string
        pattern: ^external:[a-zA-Z0-9._\-+=]{1,64}$|^[a-zA-Z0-9\-]{1,256}$
      required: true
    ConnectionID:
      in: path
      name: cid
      description: Atlar connection ID.
      schema:
        type: string
        pattern: ^[a-zA-Z0-9\-]{1,256}$
      required: true
    ReportID:
      in: path
      name: rid
      description: Atlar report ID.
      schema:
        type: string
        pattern: ^[a-zA-Z0-9\-]{1,256}$
      required: true
  schemas:
    CreatedTimestamp:
      type: string
      format: date-time
      description: Time at which the resource was created.
      example: '2022-05-04T18:31:12.889104898Z'
      readOnly: true
    UpdatedTimestamp:
      type: string
      format: date-time
      description: Time at which the resource was last updated.
      example: '2022-05-04T18:47:32.213842599Z'
      readOnly: true
    ResourceID:
      type: string
      description: Unique resource identifier.
      readOnly: true
      minLength: 32
      maxLength: 64
      examples:
        - 2ed9a3ee-60aa-4f9f-a858-2eed4eefbbc8
    ResourceVersion:
      type: integer
      description: |-
        Resource version. Starts at value `1` when the resource is
        created and increases by one for each successive update.
      example: 1
      minimum: 1
      readOnly: true
    ETag:
      type: string
      description: |-
        [ETag](https://en.wikipedia.org/wiki/HTTP_ETag) based on the
        resource version. This can be passed along in `If-Match` HTTP
        header when updating a resource to perform a conditional
        update.
      pattern: ^version:\d{1,4}$
      example: version:3
      readOnly: true
      externalDocs:
        url: https://en.wikipedia.org/wiki/HTTP_ETag
    OrganizationID:
      type: string
      description: Unique resource identifier for an Organization.
      readOnly: true
      examples:
        - 0160f6ab-5741-49e1-af46-9138927e547e
    ListResponse:
      type: object
      properties:
        items:
          description: A list of resources.
        nextToken:
          description: |-
            Pagination token for next page.
            The value will be a non-empty string if there are more resources to be fetched.
            The value will be an empty string if there are no more resources to be fetched.
          type: string
          example: eyIxIjogIlRoaXMgaXMgYSBkdW1teSBwYWdpbmF0aW9uIHRva2VuLiJ9
        token:
          description: |-
            The pagination token that was used for this request.
            The value will be an empty string if no `token` query parameter was provided with the request.
          type: string
          example: eyIwIjogIlRoaXMgaXMgYSBkdW1teSBwYWdpbmF0aW9uIHRva2VuLiJ9
        limit:
          description: The page limit that was used for this request.
          example: 100
          type: integer
      required:
        - items
        - nextToken
        - token
        - limit
    Event:
      type: object
      description: A resource event.
      properties:
        id:
          type: integer
          description: The ID of the event.
          example: 1
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        entityId:
          description: The ID of the API resource that this event belongs to.
          $ref: '#/components/schemas/ResourceID'
        type:
          $ref: '#/components/schemas/EventType'
        name:
          type: string
          description: The event name. Different resources have different sets of event names.
          example: CREATED
        timestamp:
          description: When the event happened.
          type: string
          format: date-time
          example: '2022-08-20T12:20:40.866061374Z'
        details:
          description: Additional details describing this event.
          type: object
          additionalProperties:
            type: string
          examples:
            - approvalStepId: e741c062-19f6-46a0-be31-63dded5b0341
        message:
          type: string
          description: A message which could either be a message from the bank or an explanation of the event.
        originator:
          description: The originator of the event which could be either a user ID, BANK or ATLAR.
          type: string
          example: ATLAR
      required:
        - id
        - organizationId
        - entityId
        - type
        - name
        - originator
        - timestamp
    CurrencyCode:
      type: string
      description: Three-letter ISO 4217 currency code.
      example: EUR
      minLength: 3
      maxLength: 3
      pattern: ^[A-Z]{3,3}$
    ExternalID:
      type: string
      pattern: ^[a-zA-Z0-9._\-+=]{1,64}$
      description: External ID is optional to use, but if used, the Atlar platform will persist it, index it, as well as require it to be unique across all resources. It is possible to retrieve a resource using the external ID using the prefix `external:`.
      example: walVNuin6X5Mvte4xhg1ibTAVSACfN4Q9hl
      x-omitempty: true
    AmountInput:
      oneOf:
        - $ref: '#/components/schemas/AmountIntegerValueInput'
        - $ref: '#/components/schemas/AmountStringValueInput'
    Amount:
      type: object
      properties:
        currency:
          $ref: '#/components/schemas/CurrencyCode'
        stringValue:
          description: |-
            A string representation of the amount value. This will be
            a decimal number if the currency has decimals. The number
            is not formatted for display purposes (e.g. with locale
            specific thousand separator) and always contains the dot
            `.` character as decimal separator.
          example: '15.02'
          type: string
        value:
          description: |-
            The amount value as an integer (int64) represented in
            currency minor units (e.g. 15.02 EUR is represented as the
            value 1502).
          example: 1502
          type: integer
          format: int64
      required:
        - currency
        - stringValue
        - value
    Date:
      type: string
      format: date
      description: '`full-date` notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), for example, `2017-07-21`.'
      example: '2022-05-07'
    AccountIdentifier:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AccountIdentifierType'
        market:
          $ref: '#/components/schemas/MarketCode'
          description: |-
            The market of the `AccountIdentifier` specifies in which market-context the identifier should be treated.

            A `NUMBER` from Sweden does not look and does not validate in the same way as a `NUMBER` from GB. The market
            code is, in most cases, the same as where the account itself is domiciled, but not necessarily. An examples
            of this discrepancy is Jersey which may have domiciled accounts with market `JE`, but the account identifier
            would be an `IBAN` with country code `GB`.
        number:
          type: string
          description: The unformatted identifier itself. For type `NUMBER` the structure of the account number is country-specific.
          minLength: 1
          maxLength: 255
        invalid:
          type: boolean
          description: Will be `true` if the account identifier is invalid according to Atlar account identifier validation rules.
          readOnly: true
      required:
        - type
        - market
        - number
      examples:
        - type: IBAN
          market: DE
          number: DE75512108001245126199
        - type: NUMBER
          market: GB
          number: 12345678
        - type: NUMBER
          market: SE
          number: 6114517182351
        - type: IBAN
          market: DE
          number: 123
          invalid: true
    AmountIntegerValueInput:
      type: object
      properties:
        currency:
          $ref: '#/components/schemas/CurrencyCode'
        value:
          description: The amount value as an integer (int64) represented in currency minor units (e.g. 15.02 EUR is represented as the value 1502).
          example: 1502
          type: integer
          format: int64
      required:
        - currency
        - value
    AmountStringValueInput:
      type: object
      properties:
        currency:
          $ref: '#/components/schemas/CurrencyCode'
        stringValue:
          description: A string representation of the amount value, which will be a decimal number if the currency has decimals. The number is not formatted for display purposes (e.g. with thousand separator) and always contains the dot `.` character as decimal separator.
          example: '15.02'
          type: string
      required:
        - currency
        - stringValue
    MarketCode:
      type: string
      description: Two-letter ISO 3166-1 alpha2 country code.
      example: DE
      minLength: 2
      maxLength: 2
      pattern: ^[A-Z]{2,2}$
    NationalIdentifier:
      type: object
      properties:
        type:
          type: string
          description: Type of the national identifier.
          enum:
            - CIVIC
            - COMPANY
          example: CIVIC
        market:
          $ref: '#/components/schemas/MarketCode'
        number:
          type: string
          description: The identifier itself.
          example: '2012121212'
      required:
        - type
        - market
        - number
    CountryCode:
      type: string
      description: Two-letter ISO 3166-1 alpha2 country code.
      example: DE
      minLength: 2
      maxLength: 2
      pattern: ^[A-Z]{2,2}$
    CountrySubdivision:
      type: string
      description: |-
        Country subdivision code (second part of the ISO 3166-2 code).
        E.g. state code `CA` for the state of California in the USA, `ON` for the province of Ontario in Canada, `NSW` for the state of New South Wales in Australia.
        ISO 3166-2 codes can be found on the ISO website, for example, for the USA: https://www.iso.org/obp/ui/#iso:code:3166:US.
        In the USA the state code is required for domestic payments, in Canada the province code is required for domestic payments.
      example: US-CA
      maxLength: 6
      pattern: ^[A-Z]{2,2}-[A-Z0-9]{1,3}$
    AccountIdentifierType:
      type: string
      description: |
        Account Identifier type. Choose among:
        <ul>
          <li><code>IBAN</code> International Bank Account Number</li>
          <li><code>NUMBER</code> A <code>NUMBER</code> is a domestic account number. Different markets will have different look & feel of account numbers. For instance a Swedish <code>NUMBER</code> will be a clearing number (4-5 digits) plus account number concatenated, while a UK <code>NUMBER</code> will only be the 8-digit account number, no sort-code.</li>
          <li><code>SE_BANKGIRO</code> (<a href="https://www.bankgirot.se/en/">Swedish BankGiro number</a>)</li>
          <li><code>SE_PLUSGIRO</code> (<a href="https://www.nordea.se/foretag/produkter/betala/plusgirot.html">Swedish PlusGiro number</a>)</li>
          <li><code>DK_FIK</code> Danish FIK creditor number</li>
          <li><code>AU_BPAY_BILLER_CODE</code> Australian BPAY biller code</li>
          <li><code>ADYEN</code> Adyen specific account identifier</li>
          <li><code>PAYPAL</code> PayPal specific account identifier</li>
          <li><code>SOLDO</code> Soldo specific account identifier</li>
          <li><code>WALLET_SWISSQUOTE</code> Swissquote specific wallet account identifier</li>
          <li><code>WALLET_AIRWALLEX</code> Airwallex specific wallet account identifier</li>
          <li><code>WALLET_HYPERWALLET</code> Hyperwallet specific wallet account identifier</li>
          <li><code>WALLET_PAYHAWK</code> Payhawk specific wallet account identifier</li>
          <li><code>WALLET_STRIPE</code> Stripe specific wallet account identifier</li>
          <li><code>WALLET_FREEMARKET</code> Freemarket specific wallet account identifier</li>
          <li><code>WALLET_CURRENCYCLOUD</code> Currencycloud specific wallet account identifier</li>
          <li><code>INVESTMENT_NUMBER</code> Investment account identifier</li>
          <li><code>PROPRIETARY</code> Proprietary identifier</li>
          <li><code>WALLET_SKRILL</code> Skrill specific wallet account identifier</li>
          <li><code>WALLET_INPAY</code> Inpay specific wallet account identifier</li>
          <li><code>WALLET_ADYEN_BALANCE_PLATFORM</code> Adyen balance platform specific wallet account identifier</li>
        </ul>

        For further information please refer to <a href="https://docs.atlar.com/v2.0/docs/payment-details#account-identifiers">Account Identifiers</a>
      enum:
        - IBAN
        - NUMBER
        - SE_BANKGIRO
        - SE_PLUSGIRO
        - DK_FIK
        - AU_BPAY_BILLER_CODE
        - ADYEN
        - PAYPAL
        - SOLDO
        - WALLET_SWISSQUOTE
        - WALLET_AIRWALLEX
        - WALLET_HYPERWALLET
        - WALLET_PAYHAWK
        - WALLET_STRIPE
        - WALLET_FREEMARKET
        - WALLET_CURRENCYCLOUD
        - INVESTMENT_NUMBER
        - PROPRIETARY
        - WALLET_SKRILL
        - WALLET_INPAY
        - WALLET_ADYEN_BALANCE_PLATFORM
      example: IBAN
    RoutingIdentifierType:
      type: string
      description: A routing identifier of type `BIC` must be provided to support cross-border/SWIFT payments.
      enum:
        - BIC
        - AT_BLZ
        - AU_BSB
        - CA_CPA
        - CH_BCC
        - CH_SIC
        - CN_APS
        - DE_BLZ
        - ES_NCC
        - GB_DSC
        - GR_BIC
        - HK_NCC
        - IE_NCC
        - IN_FSC
        - IT_NCC
        - JP_ZGN
        - NZ_NCC
        - PL_KNR
        - PT_NCC
        - RU_CBC
        - SE_SBA
        - SG_IBG
        - TH_CBC
        - TW_NCC
        - US_ABA
        - US_PID
        - ZA_NCC
        - IL_NCC
      example: BIC
    RoutingConstraints:
      description: Constraints on a `RoutingIdentifier`.
      type: object
      properties:
        accountNumberType:
          $ref: '#/components/schemas/AccountIdentifierType'
          x-go-type-skip-optional-pointer: true
        scheme:
          type: string
    RoutingIdentifier:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/RoutingIdentifierType'
        number:
          type: string
          description: The form of the routing number depends on `type`. E.g. for `BIC` the value should be an 8 or 11 character BIC/SWIFT code. For `GB_DSC` (UK domestic routing) the value should be a six digit sort code.
          minLength: 1
          maxLength: 255
        invalid:
          type: boolean
          description: Will be `true` if the routing identifier is invalid according to Atlar validation rules.
          readOnly: true
        constraints:
          $ref: '#/components/schemas/RoutingConstraints'
      required:
        - type
        - number
      examples:
        - type: BIC
          number: BUKBGB22
        - type: US_ABA
          number: 123456789
        - type: DE_BLZ
          number: 12345678
        - type: SE_SBA
          number: 9960
        - type: BIC
          number: 123
          invalid: true
    CounterpartyAccount:
      type: object
      description: Account information about the counterparty in the transaction.
      properties:
        market:
          $ref: '#/components/schemas/MarketCode'
          readOnly: true
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/AccountIdentifier'
          uniqueItems: true
          readOnly: true
        routing:
          type: array
          items:
            $ref: '#/components/schemas/RoutingIdentifier'
          uniqueItems: true
          readOnly: true
          x-omitempty: true
        rawIdentifier:
          type: string
          readOnly: true
      required:
        - identifiers
        - rawIdentifier
    CounterpartyDetails:
      type: object
      properties:
        partyType:
          type: string
          description: The legal type of the counterparty.
          readOnly: true
          enum:
            - INDIVIDUAL
            - COMPANY
          example: INDIVIDUAL
        name:
          type: string
          description: Name of the counterparty.
          readOnly: true
          example: 'Customer #312'
        nationalIdentifier:
          $ref: '#/components/schemas/NationalIdentifier'
          readOnly: true
        address:
          description: Address details of the counterparty.
          type: object
          properties:
            country:
              $ref: '#/components/schemas/CountryCode'
              x-go-type-skip-optional-pointer: true
            countrySubdivision:
              $ref: '#/components/schemas/CountrySubdivision'
              x-go-type-skip-optional-pointer: true
            city:
              example: Stockholm
              type: string
              maxLength: 64
            postalCode:
              example: '11111'
              type: string
              maxLength: 16
            streetName:
              example: Example street
              type: string
              maxLength: 64
            streetNumber:
              example: '47'
              type: string
              maxLength: 16
            rawAddressLines:
              type: array
              description: International unstructured address lines, as they might appear on a mailing label.
              items:
                type: string
                maxLength: 255
              maxItems: 5
          readOnly: true
        account:
          $ref: '#/components/schemas/CounterpartyAccount'
          readOnly: true
    ErrorDetails:
      type: object
      description: Error detail.
      properties:
        code:
          description: An error code for this error. Not always present.
          example: invalid_value
          type: string
        error:
          description: A description of this specific error.
          example: Must be one of [direct_debits mandates payments]
          type: string
        field:
          description: The field which has an error. This only set if the error has to do with a specific field, such as for validation errors. Nested fields are concatenated with `.`, as well as indexed fields in lists.
          example: filter.0.resource
          type: string
    ErrorResponse:
      type: object
      description: Error response.
      properties:
        status:
          description: The HTTP status code.
          example: 400
          type: integer
          readOnly: true
        message:
          description: A top-level message describing the error(s).
          example: There is some problem with the data you submitted.
          type: string
          readOnly: true
        details:
          description: A list of details for each error that occurred.
          items:
            $ref: '#/components/schemas/ErrorDetails'
          type: array
          readOnly: true
          x-omitempty: true
    EventType:
      type: string
      description: Event type.
      enum:
        - CREATED
        - UPDATED
        - DELETED
    BatchAmountSums:
      type: array
      description: |
        The total amount sum per each currency of resources in this batch.

        Note that batch amount sums reported on the batch input metadata
        refer to the total amount sums of the input records (resources)
        while the batch amount sums reported on the batch result refer
        to the total amount sums of the successfully processed records (resources).
        This means that there may be a difference in the total sum for the input
        vs the result, due to skipped records (resources).
      items:
        $ref: '#/components/schemas/Amount'
      readOnly: true
    BatchInputContent:
      description: Metadata describing the input contents that was used to create this batch.
      type: object
      readOnly: true
      properties:
        contentType:
          type: string
        recordCount:
          type: integer
          description: Total count of input records (resources) in the input batch.
          readOnly: true
        size:
          type: integer
          format: int64
          description: |
            The size of the input content in bytes.

            If the batch was created by uploading a file using `multipart/form-data` the `contentSize` will be the file size.

            If the batch was created with JSON input this will be the raw JSON size.
          example: 4711
        checksum:
          type: string
          description: |
            A checksum of the batch input contents.

            The checksum digest value will be prefixed by an
            identifier of the hash algorithm used, e.g. `sha256`. A
            colon `:` is used as separator between the algorithm
            identifier and the digest value.
          example: sha256:08343d976a896e8563b4915c84878207199b5fa139d3edde1bd77d99339bd18c
        filename:
          type: string
          description: |
            The name of the file that was used as input to create the batch.

            Filename will only available if the batch input was provided using `multipart/form-data`.
          example: batch-2022-05-07.csv
      required:
        - recordCount
        - contentType
        - size
        - checksum
    BatchErrors:
      description: A list of error details if the batch failed. Only populated once the batch has reached status `COMPLETED`. Only the first 255 errors (if any) will be present in this list. If there are more errors, the complete list can be retrieved using the results endpoint for the batch.
      type: array
      items:
        $ref: '#/components/schemas/ErrorDetails'
      maxItems: 255
    BatchResultSummary:
      description: Aggregate summary of batch processing results.
      type: object
      properties:
        total:
          type: integer
          description: Number of input records that were attempted to be processed.
        succeeded:
          type: integer
          description: Number of input records that resulted in a successfully created resource.
        failed:
          type: integer
          description: Number of failed records.
        skipped:
          type: integer
          description: Number of input records that were skipped.
      required:
        - total
        - succeeded
        - failed
        - skipped
    BatchStatus:
      type: string
      description: |
        The status of this batch. The status only refers to the
        processing of the input, not the processing or success of
        the resources themselves.

        `COMPLETED` is the only end-state. Failure is indicated by a non-empty list of `errors`.
      example: COMPLETED
      enum:
        - CREATED
        - PROCESSING_STARTED
        - COMPLETED
    Metadata:
      type:
        - object
        - 'null'
      additionalProperties:
        type: string
      description: |-
        Metadata is a `string-string` key-value container that
        can be used to store information known at the time of resource
        creation. This can be retrieved later on, for instance when a
        payment or expected transaction is reconciled with the booked
        transaction on the bank statement.

        Metadata can have at most 12 entries. Keys may have a
        maximum length of 64 chars and values a maximum length of 512
        chars.

        By default, this field is optional. It is possible to make it
        required in the Atlar Dashboard by visiting the [Metadata keys
        page](https://app.atlar.com/metadata-keys). Requirement rules
        can be specified per API resource. Both the Dashboard and the
        API will then enforce these rules and give validation errors
        when the required fields are not set.
      maxProperties: 12
      example:
        my_metadata_key: 2a9a79b9-601c-449b-aa05-432f41dbbc4a
      x-omitempty: true
    ForecastedTransactionBatch:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        inputContent:
          $ref: '#/components/schemas/BatchInputContent'
        resultSummary:
          $ref: '#/components/schemas/BatchResultSummary'
        status:
          $ref: '#/components/schemas/BatchStatus'
        errors:
          $ref: '#/components/schemas/BatchErrors'
        externalId:
          $ref: '#/components/schemas/ExternalID'
        metadata:
          $ref: '#/components/schemas/Metadata'
        creatorUserId:
          $ref: '#/components/schemas/ResourceID'
        creatorRoleId:
          $ref: '#/components/schemas/ResourceID'
        etag:
          $ref: '#/components/schemas/ETag'
        version:
          $ref: '#/components/schemas/ResourceVersion'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
      required:
        - id
        - organizationId
        - etag
        - status
        - inputDetails
        - inputContent
        - creatorUserId
        - creatorRoleId
        - version
        - created
        - updated
        - input
    PreviewableForecastedTransactionBatch:
      allOf:
        - $ref: '#/components/schemas/ForecastedTransactionBatch'
        - type: object
          properties:
            records:
              type: array
    Connection:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
          readOnly: true
          example: c15a6000-c510-4e3a-99b8-1b5fe71b2a37
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
          readOnly: true
          example: 520ddc44-e948-44b5-946d-f7e8eae96919
        connectionTypeId:
          description: ID of the associated connection type.
          example: 0a951c88-3313-472a-b312-ca2e47769670
          type: string
          readOnly: true
        thirdPartyId:
          description: ID of the associated third-party.
          example: 7afef9b2-b078-4485-b76c-f4cf1d69024d
          type: string
          readOnly: true
        affiliationId:
          description: ID of the affiliation. An affiliation is and describes the relationship between the legal entity owning this connection.
          type: string
          readOnly: true
          example: b9a931ce-9606-495d-95b0-8da8251c008a
        alias:
          description: Optional alias of the connection
          type: string
          example: my connection
        inactive:
          description: True if connection has been inactivated
          type: boolean
        version:
          $ref: '#/components/schemas/ResourceVersion'
        etag:
          $ref: '#/components/schemas/ETag'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
      required:
        - id
        - organizationId
        - connectionTypeId
        - thirdPartyId
        - affiliationId
        - configuration
        - deprecatedConfiguration
        - inactive
        - created
        - updated
        - version
        - etag
    ReportType:
      type: string
      description: The type of the report.
      enum:
        - STATEMENT
        - INVESTMENT
    ConnectionReport:
      type: object
      properties:
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
          readOnly: true
          example: 520ddc44-e948-44b5-946d-f7e8eae96919
        connectionId:
          $ref: '#/components/schemas/ResourceID'
          readOnly: true
          example: c15a6000-c510-4e3a-99b8-1b5fe71b2a37
        id:
          $ref: '#/components/schemas/ResourceID'
          readOnly: true
          example: 21d9daa8-3341-4152-8b02-aa978bf68823
        details:
          $ref: '#/components/schemas/ConnectionReportDetails'
        content:
          $ref: '#/components/schemas/ContentMetadata'
        version:
          $ref: '#/components/schemas/ResourceVersion'
        etag:
          $ref: '#/components/schemas/ETag'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
      required:
        - organizationId
        - connectionId
        - id
        - type
        - details
        - content
        - created
        - updated
        - version
        - etag
    ConnectionReportDetails:
      type: object
      discriminator:
        propertyName: type
        mapping: {}
    ContentMetadata:
      description: Metadata describing the contents that was retrieved over the Connection.
      type: object
      readOnly: true
      properties:
        contentType:
          $ref: '#/components/schemas/ContentType'
        size:
          type: integer
          format: int64
          description: |
            The size of the input content in bytes.
          example: 4711
        checksum:
          type: string
          description: |
            A checksum of the batch input contents.

            The checksum digest value will be prefixed by an
            identifier of the hash algorithm used, e.g. `sha256`. A
            colon `:` is used as separator between the algorithm
            identifier and the digest value.
          example: sha256:08343d976a896e8563b4915c84878207199b5fa139d3edde1bd77d99339bd18c
        name:
          type: string
          description: |
            The name of the content that retrieved over the connection.

            If the connection is a file transfer, the filename will be used.

            If the third-party does not provide a name, Atlar will create one.
          example: camt053_20240105.xml
      required:
        - name
        - contentType
        - size
        - checksum
    StatementType:
      type: string
      enum:
        - BOOKED
        - PENDING
    StatementPeriodType:
      type: string
      enum:
        - EODY
        - NONE
    BankStatement:
      type: object
      properties:
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        connectionId:
          type: string
          description: Unique resource identifier for a Connection.
          readOnly: true
        reportId:
          type: string
          description: Unique resource identifier for the ConnectionReport.
          readOnly: true
        accountId:
          $ref: '#/components/schemas/ResourceID'
          description: Unique resource identifier for a connection account.
          readOnly: true
          x-atlar-inline-ref: true
        id:
          $ref: '#/components/schemas/ResourceID'
        type:
          $ref: '#/components/schemas/StatementType'
        version:
          $ref: '#/components/schemas/ResourceVersion'
        etag:
          $ref: '#/components/schemas/ETag'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
      required:
        - organizationId
        - connectionId
        - reportId
        - id
        - type
        - created
        - updated
        - version
        - etag
    ContentType:
      type: string
      description: The content type of the data.
      enum:
        - application/vnd.iso20022.pain.001.001.03+xml
        - application/vnd.iso20022.pain.001.001.03.ch.02+xml
        - application/vnd.iso20022.pain.001.001.09+xml
        - application/vnd.iso20022.pain.001.001.09.ch.03+xml
        - application/vnd.iso20022.pain.002.001.03+xml
        - application/vnd.iso20022.pain.002.001.10+xml
        - application/vnd.iso20022.pain.008.001.02+xml
        - application/vnd.iso20022.camt.052.001.02+xml
        - application/vnd.iso20022.camt.052.001.03+xml
        - application/vnd.iso20022.camt.052.001.04+xml
        - application/vnd.iso20022.camt.052.001.08+xml
        - application/vnd.iso20022.camt.053.001.02+xml
        - application/vnd.iso20022.camt.053.001.03+xml
        - application/vnd.iso20022.camt.053.001.04+xml
        - application/vnd.iso20022.camt.053.001.08+xml
        - application/vnd.iso20022.camt.053.001.11+xml
        - application/vnd.iso20022.camt.054.001.02+xml
        - application/vnd.iso20022.pacs.008.001.02+xml
        - application/vnd.iso20022.pacs.008.001.08+xml
        - application/vnd.swift.mt.940
        - application/vnd.swift.mt.942
        - application/vnd.bai.bai2
        - application/vnd.bgc.autogiro.payee
        - application/vnd.bgc.autogiro.payments.rejected
        - application/vnd.bgc.autogiro.payments.spec
        - application/vnd.bgc.autogiro.mandate
        - application/vnd.bgc.payins.bgmax
        - application/vnd.nacha.ach
        - application/vnd.atlar.testbank.mandate+json
        - application/vnd.atlar.testbank.transaction+json
        - application/vnd.atlar.connectivity.proprietary
        - application/vnd.atlar.connectivity.proprietary+json
        - application/vnd.atlar.connectivity.proprietary+xml
        - application/vnd.atlar.connectivity.proprietary+csv
        - application/vnd.atlar.connectivity.v2.investment-statement+json
        - application/vnd.atlar.connectivity.v2.statement+json
        - application/vnd.atlar.connectivity.v2.statement+csv
        - application/vnd.ms-excel
      example: application/vnd.iso20022.camt.053.001.02+xml
    BankAccountType:
      type: string
      enum:
        - WALLET
        - SAVINGS
        - CHECKING
        - INVESTMENT
    PartyType:
      type: string
      description: The legal type of a party
      enum:
        - INDIVIDUAL
        - COMPANY
      example: INDIVIDUAL
    Address:
      description: Postal address.
      type: object
      properties:
        country:
          $ref: '#/components/schemas/CountryCode'
          x-go-type-skip-optional-pointer: true
        countrySubdivision:
          $ref: '#/components/schemas/CountrySubdivision'
          x-go-type-skip-optional-pointer: true
        city:
          example: Stockholm
          type: string
          maxLength: 64
        postalCode:
          example: '11111'
          type: string
          maxLength: 16
        streetName:
          example: Example street
          type: string
          maxLength: 64
        streetNumber:
          example: '47'
          type: string
          maxLength: 16
    ProprietaryBankTransactionCode:
      type: object
      description: Proprietary bank transaction codes are provided when the bank provides a proprietary transaction code. This field will be set as the code provided by the bank.
      properties:
        code:
          type:
            - string
            - 'null'
          maxLength: 35
          x-omitempty: true
        issuer:
          type:
            - string
            - 'null'
          maxLength: 35
          x-omitempty: true
    BankTransactionCode:
      type: object
      description: ISO 20022 Bank Transaction Code
      externalDocs:
        url: https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets
      properties:
        domain:
          type: string
          description: ISO 20022 BTC Domain - Defines the business area of the underlying transaction, e.g. payments or cash management.
          example: PMNT
          maxLength: 4
        family:
          type:
            - string
            - 'null'
          description: ISO 20022 BTC Family - May for example define the type of transaction, e.g. credit transfer or direct debit.
          example: IDDT
          maxLength: 4
          x-omitempty: true
        subfamily:
          type:
            - string
            - 'null'
          description: ISO 20022 BTC Subfamily - May for example specify a scheme specific transaction type, e.g. SEPA credit transfer, or a Cross-Border credit transfer.
          example: ESCT
          maxLength: 4
          x-omitempty: true
        proprietary:
          $ref: '#/components/schemas/ProprietaryBankTransactionCode'
          nullable: true
        description:
          type:
            - string
            - 'null'
          description: Free-form textual description of the Bank Transaction Code.
          example: SEPA Credit Transfer
          x-omitempty: true
      required:
        - domain
    ReturnReason:
      type: object
      properties:
        code:
          type: string
          readOnly: true
        description:
          type: string
          readOnly: true
        originalBankTransactionCode:
          description: Bank transaction code (BTC) of original transaction.
          $ref: '#/components/schemas/BankTransactionCode'
          readOnly: true
    CurrencyExchange:
      type: object
      properties:
        exchangeRate:
          type: string
          description: The exchange rate that was reported by the bank. Atlar will not try to calculate this in cases where the information isn't present.
          example: '11.21320'
          readOnly: true
        sourceCurrency:
          description: The currency from which the amount was converted.
          $ref: '#/components/schemas/CurrencyCode'
          readOnly: true
        targetCurrency:
          description: The currency to which the amount was converted.
          $ref: '#/components/schemas/CurrencyCode'
          readOnly: true
        unitCurrency:
          description: One unit of this currency multiplied by the exchange rate will equal the target currency.
          $ref: '#/components/schemas/CurrencyCode'
          readOnly: true
      required:
        - sourceCurrency
        - exchangeRate
      example:
        sourceCurrency: EUR
        targetCurrency: SEK
        unitCurrency: EUR
        exchangeRate: '11.21320'
    CreditTransferSchemeType:
      type: string
      description: |-
        Payment scheme. Choose among: <ul>
          <li><code>SCT</code> (<a href="https://www.europeanpaymentscouncil.eu/what-we-do/sepa-credit-transfer">SEPA Credit
        Transfer</a>)</li>
          <li><code>SCT_INST</code> (<a href="https://www.europeanpaymentscouncil.eu/what-we-do/sepa-instant-credit-transfer">SEPA Instant
        Credit Transfer</a>)</li>
          <li><code>CROSS_BORDER</code> (<a href="https://www.swift.com">Swift</a>)</li>
          <li><code>GB_CT_BACS</code> (UK account-to-account <a href="https://www.bacs.co.uk">BACS</a>)
          <li><code>GB_CT_CHAPS</code> (UK account-to-account <a
        href="https://www.bankofengland.co.uk/payment-and-settlement/chaps">CHAPS</a>)</li>
          <li><code>GB_CT_FPS</code> (UK account-to-account <a
        href="https://www.wearepay.uk/what-we-do/payment-systems/faster-payment-system/">Faster Payments</a>)</li>
          <li><code>SE_A2A</code> (Swedish account-to-account)</li>
          <li><code>SE_GIRO</code> (Swedish <a href="https://www.bankgirot.se">Bankgiro</a> and/or <a
        href="https://en.wikipedia.org/wiki/PlusGirot">PlusGiro</a>)</li>
          <li><code>DK_A2A</code> (Danish account-to-account)</li>
          <li><code>DK_CT_SAMEDAY</code> (Danish same-day credit transfer)</li>
          <li><code>DK_CT_INST</code> (Danish instant credit transfer)</li>
          <li><code>DK_CT_FIK71</code> (Danish FIK71 credit transfer)</li>
          <li><code>DK_CT_FIK73</code> (Danish FIK73 credit transfer)</li>
          <li><code>DK_CT_FIK75</code> (Danish FIK75 credit transfer)</li>
          <li><code>CH_CT</code> (Swiss account-to-account)</li>
          <li><code>NO_CT</code> (Norwegian account-to-account)</li>
          <li><code>NO_CT_KID</code> (Norwegian KID payment)</li>
          <li><code>US_CT_ACH</code> (US ACH)</li>
          <li><code>US_CT_WIRE</code> (US Wire)</li>
          <li><code>IS_CT</code> (Icelandic account-to-account)</li>
          <li><code>AU_CT</code> (Australian account-to-account)</li>
          <li><code>AU_CT_BPAY</code> (Australian <a href="https://www.bpay.com.au/">BPAY</a>)</li>
          <li><code>HK_CT</code> (Hong Kong account-to-account)</li>
          <li><code>IL_CT</code> (Israel account-to-account)</li>
          <li><code>SG_CT</code> (Singapore account-to-account)</li>
          <li><code>BG_CT</code> (Bulgarian account-to-account)</li>
          <li><code>MX_CT</code> (Mexican account-to-account)</li>
          <li><code>KR_CT</code> (South Korean account-to-account)</li>
          <li><code>TH_CT</code> (Thai account-to-account)</li>
          <li><code>CA_CT_LYNX</code> (Canadian Lynx credit transfer)</li>
          <li><code>CA_CT_ACSS</code> (Canadian ACSS credit transfer)</li>
          <li><code>PL_CT</code> (Polish account-to-account)</li>
          <li><code>RO_CT</code> (Romanian account-to-account)</li>
          <li><code>TR_CT</code> (Turkish account-to-account)</li>
          <li><code>DE_CT</code> (Legacy German account-to-account)</li>
          <li><code>FR_CT</code> (Legacy French account-to-account)</li>
          <li><code>BOOK_TRANSFER</code> (Book Transfer)</li>
        </ul>
      enum:
        - SCT
        - SCT_INST
        - CROSS_BORDER
        - GB_CT_BACS
        - GB_CT_CHAPS
        - GB_CT_FPS
        - SE_A2A
        - SE_GIRO
        - DK_A2A
        - DK_CT_SAMEDAY
        - DK_CT_INST
        - DK_CT_FIK71
        - DK_CT_FIK73
        - DK_CT_FIK75
        - CH_CT
        - NO_CT
        - NO_CT_KID
        - US_CT_ACH
        - US_CT_WIRE
        - IS_CT
        - AU_CT
        - AU_CT_BPAY
        - HK_CT
        - IL_CT
        - SG_CT
        - BG_CT
        - MX_CT
        - KR_CT
        - TH_CT
        - CA_CT_LYNX
        - CA_CT_ACSS
        - PL_CT
        - RO_CT
        - TR_CT
        - DE_CT
        - FR_CT
        - BOOK_TRANSFER
      example: SCT
    DirectDebitSchemeType:
      type: string
      description: |-
        Direct debit payment scheme. Choose among: <ul>
          <li><code>SDD_CORE</code> (<a
        href="https://www.europeanpaymentscouncil.eu/what-we-do/epc-payment-schemes/sepa-direct-debit/sepa-direct-debit-core-rulebook-and-implementation">SEPA Direct Debit Core</a>)</li>
          <li><code>SDD_B2B</code> (<a
        href="https://www.europeanpaymentscouncil.eu/what-we-do/epc-payment-schemes/sepa-direct-debit/sepa-direct-debit-b2b-rulebook-and-implementation">SEPA Direct Debit B2B</a>)</li>
          <li><code>AUTOGIRO</code> (Swedish <a href="https://www.bankgirot.se/autogiro">Bg AutoGiro</a>)</li>
        </ul>
      enum:
        - SDD_CORE
        - SDD_B2B
        - AUTOGIRO
      example: SDD_CORE
    SchemeDetailsUrgency:
      type: string
      description: The urgency of the payment.
      enum:
        - HIGH
    AccountType:
      type: string
      enum:
        - ACCOUNT
        - EXTERNAL_ACCOUNT
        - INLINE
      description: Account type specifier. `ACCOUNT` for internal _Account_ resources. `EXTERNAL_ACCOUNT` for _External Account_ resources.
    MandateSnapshot:
      type: object
      description: Mandate information about the mandate to be used for a Direct Debit. This mandate data is a snapshot of the state of the mandate at the time when the Direct Debit was created.
      properties:
        id:
          description: The unique identifier of this mandate.
          $ref: '#/components/schemas/ResourceID'
          example: be7e04fe-3fa0-48f5-a993-2008409255f2
        creditorReference:
          description: The customer number that you have received from the bank.
          type: string
        mandateReference:
          type: string
          description: A unique reference to the mandate that you have signed with the debtor.
          minLength: 1
          maxLength: 35
        finalCollection:
          type: boolean
          readOnly: true
          description: |
            Whether to consider this Direct Debit collection the final one for this mandate.
            This field is set automatically by the Atlar platform if the mandate has been cancelled prior to the creation of the Direct Debit.
            This field only affects certain direct debit schemes (e.g. SEPA DDs),
            where the bank is notified about the mandate cancellation in relation to the final collection.
        signatureDate:
          description: The date that this mandate was signed by the end user.
          $ref: '#/components/schemas/Date'
          examples:
            - '2022-08-01'
        version:
          $ref: '#/components/schemas/ResourceVersion'
      required:
        - id
        - creditorReference
        - mandateReference
        - finalCollection
        - version
    InstrumentType:
      type: string
      description: The type of the payment instrument.
      enum:
        - US_ACH
        - CITI_WORLDLINK
      example: CITI_WORLDLINK
    CitiWorldlinkInstrument:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/InstrumentType'
        citiWorldlinkId:
          type: string
          description: The WorldLink ID assigned to the account to initiate payments.
          example: '123456789'
      required:
        - type
        - citiWorldlinkId
    USACHInstrument:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/InstrumentType'
        usAchCompanyId:
          type: string
          description: The US ACH Company ID assigned to the account to initiate US ACH payments.
          example: '1234567890'
      required:
        - type
        - usAchCompanyId
    Instrument:
      type: object
      description: The payment instrument used to initiate the payment. For example Citi has a proprietary payment instrument called WorldLink, which can be used to initiate payments.
      oneOf:
        - $ref: '#/components/schemas/CitiWorldlinkInstrument'
        - $ref: '#/components/schemas/USACHInstrument'
      discriminator:
        propertyName: type
        mapping:
          CITI_WORLDLINK: '#/components/schemas/CitiWorldlinkInstrument'
          US_ACH: '#/components/schemas/USACHInstrument'
    SchemeDetails:
      type: object
      properties:
        instrument:
          $ref: '#/components/schemas/Instrument'
        intraCompany:
          type: boolean
          description: Whether the payment is between companies within the same group.
        initiatorId:
          type: string
        urgency:
          $ref: '#/components/schemas/SchemeDetailsUrgency'
    CategoryPurpose:
      type: string
      description: ISO 20022 Category Purpose Code (ExternalCategoryPurpose1Code).
      example: SALA
    ChargeBearer:
      type: string
      description: Charge bearer specifies which party should bear the charges of the transaction.
      enum:
        - SHARED
        - DEBTOR
        - CREDITOR
        - SERVICE_LEVEL
      example: SHARED
    RegulatoryReportingIndicator:
      type: string
      description: Determines which side of the payment the regulatory reporting code applies to. When making a payment _to_ Thailand, one should supply a `CREDITOR` code (equivalent to iso20022 `CRED`), while making a payment _out of_ Sweden or Norway may require a `DEBTOR` code (equivalent to iso20022 `DEBT`).
      enum:
        - CREDITOR
        - DEBTOR
        - BOTH
      example: CREDITOR
    RegulatoryReportingDetails:
      type: object
      properties:
        market:
          $ref: '#/components/schemas/MarketCode'
        indicator:
          $ref: '#/components/schemas/RegulatoryReportingIndicator'
        code:
          description: The actual code to report. Codes are market-specific and found on https://docs.atlar.com
          type: string
      required:
        - market
        - indicator
        - code
    ExternalAccountRef:
      type: object
      description: A reference to an External Account.
      properties:
        type:
          $ref: '#/components/schemas/AccountType'
        id:
          type: string
          description: ID or External ID of an External Account. Prefix External IDs with `external:`.
      required:
        - type
        - id
      example:
        type: EXTERNAL_ACCOUNT
        id: 86faeacd-05f0-4836-a86c-51b871e10299
    InternalAccountRef:
      type: object
      description: A reference to an (internal) Account.
      properties:
        type:
          $ref: '#/components/schemas/AccountType'
        id:
          type: string
          description: ID of an (internal) Account.
      required:
        - type
        - id
      examples:
        - type: ACCOUNT
          id: 31d593d7-fff9-4783-aa1d-92acb7b21a19
    InlineExternalAccount:
      type: object
      description: An inline-defined (from the point of the payment) Account. This is used in the context of payment initiation.
      properties:
        type:
          $ref: '#/components/schemas/AccountType'
        market:
          $ref: '#/components/schemas/MarketCode'
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/AccountIdentifier'
          minItems: 1
          maxItems: 1
          uniqueItems: true
        routing:
          type: array
          items:
            $ref: '#/components/schemas/RoutingIdentifier'
          uniqueItems: true
          maxItems: 2
          x-omitempty: true
        externalId:
          $ref: '#/components/schemas/ExternalID'
        holder:
          $ref: '#/components/schemas/InlineAccountHolder'
      required:
        - type
        - market
        - identifiers
        - holder
      examples:
        - type: INLINE
          market: DE
    InlineAccountHolder:
      type: object
      description: Information about the legal holder of an account.
      properties:
        externalId:
          $ref: '#/components/schemas/ExternalID'
        legalName:
          type: string
          description: The legal name of the account holder. Some banks, and for some payment schemes, the correctness of the legal name will be validated and payments may be rejected if legal names do not match.
        partyType:
          description: The party type of the account holder.
          $ref: '#/components/schemas/PartyType'
        address:
          description: Postal address of the account holder.
          $ref: '#/components/schemas/Address'
      required:
        - legalName
      examples:
        - legalName: Example Company GmbH
          address:
            country: DE
            city: Berlin
            postalCode: '10115'
            streetName: Friedrichstrasse
            streetNumber: '123'
    AccountHolder:
      type: object
      description: Information about the legal holder of an account.
      properties:
        type:
          type: string
          enum:
            - COUNTERPARTY
            - ENTITY
          readOnly: true
        id:
          type: string
          description: Resource ID of either a `Counterparty` or an `Entity`.
          readOnly: true
        externalId:
          $ref: '#/components/schemas/ExternalID'
          description: External ID of either a `Counterparty` or an `Entity`.
        legalName:
          type: string
          description: The legal name of the account holder. Some banks, and for some payment schemes, the correctness of the legal name will be validated and payments may be rejected if legal names do not match.
          readOnly: true
        address:
          description: Postal address of the account holder.
          $ref: '#/components/schemas/Address'
          readOnly: true
        nationalIdentifier:
          description: The national identifier of the account holder.
          $ref: '#/components/schemas/NationalIdentifier'
          readOnly: true
        partyType:
          description: The party type of the account holder.
          $ref: '#/components/schemas/PartyType'
          readOnly: true
      required:
        - type
        - id
        - legalName
      examples:
        - type: ENTITY
          id: 29a4555b-99b2-4de7-9062-47c8ebc03f56
          legalName: Example Company GmbH
          address:
            country: DE
            city: Munich
            postalCode: 123456
        - type: COUNTERPARTY
          id: f3efbb73-4e5b-4b22-adeb-918bbf1dfbd8
          legalName: John Smith
          address:
            country: US
            city: New York
            postalCode: 123456
    AccountSnapshot:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AccountType'
        id:
          description: ID of the (internal) Account.
          $ref: '#/components/schemas/ResourceID'
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        market:
          $ref: '#/components/schemas/MarketCode'
          readOnly: true
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/AccountIdentifier'
          minItems: 1
          uniqueItems: true
          readOnly: true
        routing:
          type: array
          items:
            $ref: '#/components/schemas/RoutingIdentifier'
          uniqueItems: true
          maxItems: 5
          readOnly: true
        currency:
          $ref: '#/components/schemas/CurrencyCode'
          readOnly: true
      required:
        - type
        - id
        - organizationId
        - market
        - currency
        - identifiers
        - routing
      examples:
        - id: ac1963d7-fff9-4783-aa1d-92acb7b21a19
          type: ACCOUNT
          organizationId: 0160f6ab-5741-49e1-af46-9138927e547e
          market: DE
          currency: EUR
          identifiers:
            - market: DE
              type: IBAN
              number: DE89370400440532013000
          routing:
            - type: BIC
              number: COBADEFFXXX
    ExternalAccountSnapshot:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AccountType'
          readOnly: true
        id:
          description: ID of the External Account.
          $ref: '#/components/schemas/ResourceID'
        externalId:
          $ref: '#/components/schemas/ExternalID'
          description: External ID of the External Account.
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        market:
          $ref: '#/components/schemas/MarketCode'
          readOnly: true
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/AccountIdentifier'
          minItems: 1
          uniqueItems: true
          readOnly: true
        routing:
          type: array
          items:
            $ref: '#/components/schemas/RoutingIdentifier'
          uniqueItems: true
          readOnly: true
          x-omitempty: true
      required:
        - type
        - id
        - organizationId
        - market
        - identifiers
      example:
        id: 31d593d7-fff9-4783-aa1d-92acb7b21a19
        organizationId: 605e26fc-4fce-495a-a92f-2c3592d7287e
        type: EXTERNAL_ACCOUNT
        identifiers:
          - type: IBAN
            market: GB
            number: GB33BUKB20201555555555
        routing:
          - type: BIC
            number: BUKBGB22XXX
    ExternalAccount:
      type: object
      description: An `ExternalAccount` represents an account that does not belong to your organization. A `Counterparty` can have multiple external accounts.
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
          examples:
            - eac2d761-c984-4072-ae39-018d6e77c24e
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        counterpartyId:
          example: c151b61e-33cc-4f89-ac8d-328f9efa59e9
          type: string
          description: The ID of the counterparty to which this external account belongs.
          readOnly: true
        entityIds:
          type: array
          items:
            $ref: '#/components/schemas/ResourceID'
          maxItems: 100
          uniqueItems: true
          readOnly: true
          x-omitempty: true
        market:
          $ref: '#/components/schemas/MarketCode'
          readOnly: true
        name:
          description: |-
            Name of the account.

            This is a read-only derived property. It will take the value of `alias` if `alias` is set, otherwise it will be a display name derived from the account number(s).
          example: My Business Account
          type: string
          maxLength: 255
          readOnly: true
        alias:
          description: An additional name, an alias, for the account.
          example: My Business Account
          type: string
          maxLength: 255
          readOnly: true
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/AccountIdentifier'
          minItems: 1
          uniqueItems: true
          readOnly: true
        routing:
          type: array
          items:
            $ref: '#/components/schemas/RoutingIdentifier'
          uniqueItems: true
          readOnly: true
          x-omitempty: true
        externalId:
          $ref: '#/components/schemas/ExternalID'
          readOnly: true
        metadata:
          $ref: '#/components/schemas/Metadata'
          readOnly: true
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
        version:
          $ref: '#/components/schemas/ResourceVersion'
        etag:
          $ref: '#/components/schemas/ETag'
      required:
        - id
        - organizationId
        - counterpartyId
        - market
        - name
        - identifiers
        - created
        - updated
        - version
        - etag
    CreateExternalAccountRequest:
      type: object
      properties:
        counterpartyId:
          example: c151b61e-33cc-4f89-ac8d-328f9efa59e9
          type: string
          description: The ID of the counterparty to which this external account belongs.
        market:
          $ref: '#/components/schemas/MarketCode'
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/AccountIdentifier'
          minItems: 1
          maxItems: 1
          uniqueItems: true
        routing:
          type: array
          items:
            $ref: '#/components/schemas/RoutingIdentifier'
          maxItems: 5
          uniqueItems: true
          x-omitempty: true
        alias:
          description: An additional name, an alias, for the account.
          type: string
          maxLength: 255
        externalId:
          $ref: '#/components/schemas/ExternalID'
        metadata:
          $ref: '#/components/schemas/Metadata'
      required:
        - counterpartyId
        - market
        - identifiers
    ExternalAccountJSONPatchRequest:
      description: JSON Patch request to update an external account.
      externalDocs:
        url: https://jsonpatch.com/
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/ExternalAccountJSONPatchRemoveAlias'
          - $ref: '#/components/schemas/ExternalAccountJSONPatchReplaceAlias'
          - $ref: '#/components/schemas/ExternalAccountJSONPatchAddIdentifiers'
          - $ref: '#/components/schemas/ExternalAccountJSONPatchAddRouting'
    ExternalAccountJSONPatchRemoveAlias:
      description: Remove alias.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /alias
      additionalProperties: false
      required:
        - op
        - path
    ExternalAccountJSONPatchReplaceAlias:
      description: Set alias.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /alias
        value:
          type: string
          minLength: 1
          maxLength: 255
      additionalProperties: false
      required:
        - op
        - path
        - value
    ExternalAccountJSONPatchAddIdentifiers:
      description: Adds an account identifier.
      type: object
      properties:
        op:
          type: string
          enum:
            - add
        path:
          type: string
          enum:
            - /identifiers/-
        value:
          $ref: '#/components/schemas/AccountIdentifier'
      additionalProperties: false
      required:
        - op
        - path
        - value
    ExternalAccountJSONPatchAddRouting:
      description: Adds a routing identifier.
      type: object
      properties:
        op:
          type: string
          enum:
            - add
        path:
          type: string
          enum:
            - /routing/-
        value:
          $ref: '#/components/schemas/RoutingIdentifier'
      additionalProperties: false
      required:
        - op
        - path
        - value
    Counterparty:
      type: object
      description: A counterparty represents a person or a legal business entity.
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
          example: f3efbb73-4e5b-4b22-adeb-918bbf1dfbd8
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        legalName:
          description: Legal name of the counterparty. E.g. a company's legal business name, or an individual's full legal name.
          type: string
          readOnly: true
          examples:
            - Example Company GmbH
            - John Smith
        partyType:
          $ref: '#/components/schemas/PartyType'
          readOnly: true
        alias:
          description: An additional name, an alias, for the counterparty.
          example: 'Customer #123'
          type: string
          readOnly: true
        address:
          description: Address details for the counterparty.
          $ref: '#/components/schemas/Address'
          readOnly: true
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/ExternalAccount'
          maxItems: 10
          readOnly: true
          x-omitempty: true
        email:
          description: Email of the counterparty.
          example: john.smith@example.com
          type: string
          readOnly: true
        phone:
          description: Phone number of the counterparty.
          example: '+46123456789'
          type: string
          readOnly: true
        nationalIdentifier:
          description: The national identifier of the counterparty.
          $ref: '#/components/schemas/NationalIdentifier'
        externalId:
          $ref: '#/components/schemas/ExternalID'
          readOnly: true
        metadata:
          $ref: '#/components/schemas/Metadata'
          readOnly: true
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
        version:
          $ref: '#/components/schemas/ResourceVersion'
        etag:
          $ref: '#/components/schemas/ETag'
        entityIds:
          type: array
          description: An optional list of entity IDs that this counterparty belongs to. If empty, the counterparty is not associated with any specific entity and can be used by all in the organization.
          items:
            $ref: '#/components/schemas/ResourceID'
          maxItems: 100
          uniqueItems: true
          readOnly: true
          x-omitempty: true
      required:
        - id
        - organizationId
        - legalName
        - created
        - updated
        - version
        - etag
    CreateCounterpartyRequest:
      type: object
      properties:
        legalName:
          description: Legal name of the counterparty. E.g. a company's legal business name, or an individual's full legal name.
          type: string
          maxLength: 96
          example: Example Company GmbH
        alias:
          description: An additional name, an alias, for the counterparty.
          type: string
          maxLength: 255
          example: 'Customer #123'
        partyType:
          $ref: '#/components/schemas/PartyType'
        address:
          description: Address details for the counterparty.
          $ref: '#/components/schemas/Address'
        email:
          description: Email of the counterparty.
          example: john.smith@example.com
          type: string
          maxLength: 256
        phone:
          description: Phone number of the counterparty.
          example: '+46123456789'
          type: string
          maxLength: 64
        accounts:
          type: array
          description: An optional list of external accounts to create for this counterparty. Note that external account is a separate API resource. One counterparty can have multiple external accounts.
          items:
            $ref: '#/components/schemas/CreateEmbeddedExternalAccountRequest'
          x-omitempty: true
        externalId:
          $ref: '#/components/schemas/ExternalID'
        metadata:
          $ref: '#/components/schemas/Metadata'
        nationalIdentifier:
          description: The national identifier of the counterparty.
          $ref: '#/components/schemas/NationalIdentifier'
        entityIds:
          type: array
          description: An optional list of entity IDs that this counterparty belongs to. If empty, the counterparty is not associated with any specific entity and can be used by all in the organization.
          items:
            $ref: '#/components/schemas/ResourceID'
          maxItems: 100
          uniqueItems: true
          x-omitempty: true
      required:
        - legalName
    CounterpartyJSONPatchRequest:
      description: JSON Patch request to update a counterparty.
      externalDocs:
        url: https://jsonpatch.com/
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/CounterpartyJSONPatchReplaceLegalName'
          - $ref: '#/components/schemas/CounterpartyJSONPatchReplaceAlias'
          - $ref: '#/components/schemas/CounterpartyJSONPatchRemoveAlias'
          - $ref: '#/components/schemas/CounterpartyJSONPatchReplaceNationalIdentifier'
          - $ref: '#/components/schemas/CounterpartyJSONPatchRemoveNationalIdentifier'
          - $ref: '#/components/schemas/CounterpartyJSONPatchReplaceEmail'
          - $ref: '#/components/schemas/CounterpartyJSONPatchRemoveEmail'
          - $ref: '#/components/schemas/CounterpartyJSONPatchReplaceAddress'
          - $ref: '#/components/schemas/CounterpartyJSONPatchReplacePhone'
          - $ref: '#/components/schemas/CounterpartyJSONPatchRemovePhone'
          - $ref: '#/components/schemas/CounterpartyJSONPatchReplacePartyType'
          - $ref: '#/components/schemas/CounterpartyJSONPatchRemovePartyType'
          - $ref: '#/components/schemas/CounterpartyJSONPatchReplaceEntityIds'
          - $ref: '#/components/schemas/CounterpartyJSONPatchRemoveEntityIds'
          - $ref: '#/components/schemas/CounterpartyJSONPatchReplaceExternalId'
          - $ref: '#/components/schemas/CounterpartyJSONPatchRemoveExternalId'
    CounterpartyJSONPatchReplaceLegalName:
      description: Set legal name.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /legalName
        value:
          type: string
          minLength: 1
          maxLength: 255
      additionalProperties: false
      required:
        - op
        - path
        - value
    CounterpartyJSONPatchReplaceAlias:
      description: Set alias.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /alias
        value:
          type: string
          minLength: 1
          maxLength: 255
      additionalProperties: false
      required:
        - op
        - path
        - value
    CounterpartyJSONPatchRemoveAlias:
      description: Remove alias.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /alias
      additionalProperties: false
      required:
        - op
        - path
    CounterpartyJSONPatchReplaceNationalIdentifier:
      description: Set national identifier.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /nationalIdentifier
        value:
          $ref: '#/components/schemas/NationalIdentifier'
      additionalProperties: false
      required:
        - op
        - path
        - value
    CounterpartyJSONPatchRemoveNationalIdentifier:
      description: Remove national identifier.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /nationalIdentifier
      additionalProperties: false
      required:
        - op
        - path
    CounterpartyJSONPatchReplaceEmail:
      description: Set email address.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /email
        value:
          type: string
          maxLength: 256
      additionalProperties: false
      required:
        - op
        - path
        - value
    CounterpartyJSONPatchRemoveEmail:
      description: Remove email.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /email
      additionalProperties: false
      required:
        - op
        - path
    CounterpartyJSONPatchReplacePhone:
      description: Set phone number.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /phone
        value:
          type: string
          maxLength: 64
      additionalProperties: false
      required:
        - op
        - path
        - value
    CounterpartyJSONPatchRemovePhone:
      description: Remove phone number.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /phone
      additionalProperties: false
      required:
        - op
        - path
    CounterpartyJSONPatchReplacePartyType:
      description: Set party type.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /partyType
        value:
          type: string
          $ref: '#/components/schemas/PartyType'
      additionalProperties: false
      required:
        - op
        - path
        - value
    CounterpartyJSONPatchRemovePartyType:
      description: Remove party type.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /partyType
      additionalProperties: false
      required:
        - op
        - path
    CounterpartyJSONPatchReplaceAddress:
      description: Set postal address.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /address
        value:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
      required:
        - op
        - path
        - value
    CounterpartyJSONPatchReplaceEntityIds:
      description: Set entities.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /entityIds
        value:
          type: array
          items:
            $ref: '#/components/schemas/ResourceID'
          maxItems: 100
          uniqueItems: true
      additionalProperties: false
      required:
        - op
        - path
        - value
    CounterpartyJSONPatchRemoveEntityIds:
      description: Remove entities.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /entityIds
      additionalProperties: false
      required:
        - op
        - path
    CounterpartyJSONPatchReplaceExternalId:
      description: Set external ID.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /externalId
        value:
          type: string
      additionalProperties: false
      required:
        - op
        - path
        - value
    CounterpartyJSONPatchRemoveExternalId:
      description: Remove external ID.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /externalId
      additionalProperties: false
      required:
        - op
        - path
    CreateEmbeddedExternalAccountRequest:
      type: object
      properties:
        market:
          $ref: '#/components/schemas/MarketCode'
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/AccountIdentifier'
          minItems: 1
          maxItems: 1
          uniqueItems: true
        routing:
          type: array
          items:
            $ref: '#/components/schemas/RoutingIdentifier'
          maxItems: 5
          uniqueItems: true
          x-omitempty: true
        externalId:
          $ref: '#/components/schemas/ExternalID'
        metadata:
          $ref: '#/components/schemas/Metadata'
      required:
        - market
        - identifiers
    Mandate:
      type: object
      description: A mandate is a contract between the debtor and the creditor that authorizes debit collections from the debtors account. Different mandate types exist for different debit schemes.
      properties:
        id:
          description: The unique identifier of this mandate.
          $ref: '#/components/schemas/ResourceID'
          example: be7e04fe-3fa0-48f5-a993-2008409255f2
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        counterpartyId:
          type: string
          description: The ID of the counterparty which owns this mandate.
          example: f3efbb73-4e5b-4b22-adeb-918bbf1dfbd8
          readOnly: true
        externalAccountId:
          type: string
          description: The ID of the external account to which this mandate is associated with.
          example: ba0ad236-2904-4b01-8e85-a4ef3a73c353
        destinationAccountId:
          type: string
          description: The ID of the destination account where money will be collected for this mandate. This is only required for `AUTOGIRO` mandates.
          example: 31d593d7-fff9-4783-aa1d-92acb7b21a19
        connectionInstructionId:
          type: string
          description: The ID of the instruction that was sent to the bank where this mandate was included when it was created. Subsequent instructions, such as mandate cancellations, won't update this ID. It will always refer to the instruction which created the resource.
          example: c1d6502c-07c7-4c77-bee5-963f9464c7d8
          readOnly: true
        source:
          description: Source account from which funds will be collected. This account will be debited.
          $ref: '#/components/schemas/ExternalAccountSnapshot'
          readOnly: true
        sourceHolder:
          $ref: '#/components/schemas/AccountHolder'
          readOnly: true
        creditorReference:
          description: The customer number that you have received from the bank.
          type: string
        scheme:
          $ref: '#/components/schemas/DirectDebitSchemeType'
        mandateReference:
          type: string
          description: A unique reference to the mandate that you have signed with the debtor.
          minLength: 1
          maxLength: 35
        signatureDate:
          description: The date that this mandate was signed by the end user.
          $ref: '#/components/schemas/Date'
          examples:
            - '2022-08-01'
        status:
          $ref: '#/components/schemas/MandateStatus'
          description: The current status of a mandate.
        externalId:
          $ref: '#/components/schemas/ExternalID'
        metadata:
          $ref: '#/components/schemas/Metadata'
        version:
          $ref: '#/components/schemas/ResourceVersion'
        etag:
          $ref: '#/components/schemas/ETag'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
      required:
        - id
        - organizationId
        - counterpartyId
        - externalAccountId
        - source
        - sourceHolder
        - scheme
        - creditorReference
        - mandateReference
        - status
        - version
        - etag
        - created
        - updated
    CreateMandateRequest:
      type: object
      properties:
        active:
          description: Set this to true if this mandate is already known by the bank. This is for example a good option if you're migrating a lot of mandates that you know are already active. The actual outcome of using this flag depends on the direct debit scheme, since all schemes work in slightly different ways. For example, for `AUTOGIRO`, it means that Atlar won't send the mandate prior to making the collection. For other schemes, it could have an effect on how quickly the collection can be executed.
          type: boolean
          example: false
        scheme:
          $ref: '#/components/schemas/DirectDebitSchemeType'
        externalAccountId:
          type: string
          description: The ID of the external account to which this mandate is associated with.
          example: ba0ad236-2904-4b01-8e85-a4ef3a73c353
        destinationAccountId:
          type: string
          description: The ID of the destination account where money will be collected for this mandate. This is only required for `AUTOGIRO` mandates.
          example: 31d593d7-fff9-4783-aa1d-92acb7b21a19
        creditorReference:
          description: |
            The customer number that you have received from the bank.
            For `AUTOGIRO` this is your 6 digit customer number.
          type: string
          minLength: 1
          maxLength: 35
        mandateReference:
          type: string
          description: |
            A unique reference to the mandate that you have signed with the debtor.
            For `AUTOGIRO` this is used as payer number associated with the mandate and validated as 1-16 digits. For `AUTOGIRO`, this reference must not contain leading 0's.
          minLength: 1
          maxLength: 35
        signatureDate:
          $ref: '#/components/schemas/Date'
          description: The date that this mandate was signed by the end user.
        externalId:
          $ref: '#/components/schemas/ExternalID'
        metadata:
          $ref: '#/components/schemas/Metadata'
      required:
        - scheme
        - externalAccountId
        - creditorReference
        - mandateReference
    MandateStatus:
      type: string
      enum:
        - CREATED
        - PENDING_CANCELLATION
        - PENDING_CANCELLATION_SUBMISSION
        - CANCELLATION_SENT
        - PENDING_SUBMISSION
        - SENT
        - ACCEPTED
        - ACTIVE
        - FAILED
        - CANCELLED
        - UNKNOWN
      example: SENT
    PaymentReference:
      type: string
      description: This reference will be sent to the destination bank and recipient. (This type of reference is sometimes also referred to as remittance information.)
      maxLength: 140
    BatchTreatmentType:
      type: string
      deprecated: true
      description: |
        Deprecated: You can approve or reject on batch and individual level regardless of the treatment type.
      enum:
        - INDIVIDUAL_PAYMENTS
        - BATCH
      example: INDIVIDUAL_PAYMENTS
    BatchResult:
      description: |
        Result of processing an individual payment request as part of
        a batch request.
      type: object
      properties:
        paymentId:
          description: |
            ID of the payment (a credit transfer or direct debit
            resource). Present if the result represent the successful
            creation of a credit transfer or direct debit resource.
          type: string
          $ref: '#/components/schemas/ResourceID'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetails'
            minItems: 0
          x-omitempty: true
        skipped:
          description: |
            Indicates whether a given payment request was skipped when
            processed as part of a batch.
          type: boolean
        recordIndex:
          description: |
            0-based index specifying which record in the batch input that
            this result is associated with. If the batch input was a
            CSV file the `recordIndex` will refer to rows (lines) in
            the file. If the batch input was JSON it will refer to
            JSON array indicies.

            If the error(s) are not directly related to a specific
            record/row/line the `recordIndex` will not be present.
          type: integer
        externalId:
          $ref: '#/components/schemas/ExternalID'
          description: External ID of the payment, if any.
      examples:
        - paymentId: a0285f2e-f0c8-11ee-bae7-aa94e258a7ae
          recordIndex: 1
        - errors:
            - message: Account not found
              field: file.123.source.id
              code: account_not_found
          recordIndex: 123
        - skipped: true
          errors:
            - message: Invalid account number type
              field: file.456.destination.identifiers.0.type
              code: invalid_accountnumber_type_for_market
          recordIndex: 456
        - errors:
            - message: General processing failure
    BatchResultsSummary:
      description: Aggregate summary of payment batch processing results.
      type: object
      properties:
        total:
          type: integer
          description: Deprecated. Moved to `processed`. Number of input records that were attempted to be processed.
        succeeded:
          type: integer
          description: Deprecated. Moved to `processed`. Number of input records that resulted in a successfully created payment.
        failed:
          type: integer
          description: Deprecated. Moved to `processed`. Number of failed records.
        skipped:
          type: integer
          description: Deprecated. Moved to `processed`. Number of input records that were skipped.
        processed:
          $ref: '#/components/schemas/BatchResultSummary'
        sums:
          $ref: '#/components/schemas/BatchAmountSums'
      required:
        - total
        - succeeded
        - failed
        - skipped
        - processed
        - sums
    PaymentApprovalStep:
      type: object
      properties:
        id:
          description: The ID of this step. Used when approving/rejecting.
          example: 735c7b8c-ef29-456a-8caf-113be117d131
          type: string
          readOnly: true
        approvalChainId:
          description: The ID of the approval chain that triggered this approval step.
          type: string
          readOnly: true
        requiredRoleIds:
          type: array
          description: IDs of the Roles that can approve/reject. Not specified if the step was automatically approved based on an auto-approval chain.
          items:
            type: string
          maxItems: 10
          uniqueItems: true
          readOnly: true
          x-omitempty: true
        status:
          description: The status of the approval step. `PENDING` if step is not yet interacted with.
          $ref: '#/components/schemas/ApprovalStatus'
          readOnly: true
        approver:
          description: User information about the user who approved/rejected. Omitted if step is not yet approved/rejected.
          $ref: '#/components/schemas/UserAuditInfo'
          readOnly: true
        updated:
          description: Timestamp when approved/rejected. Omitted if the step is not yet approved/rejected.
          type: string
          format: date-time
          readOnly: true
        autoApproved:
          type: boolean
        allowCreatorApproval:
          description: Allow approval by the user creating this resource if they have the role required for this step. By default, this is not allowed to conform with a four-eyes principle where approval by another person is required.
          type: boolean
          readOnly: true
        sequentialApproval:
          type: boolean
          description: If true, the approval steps for this approval chain, specified by `approvalChainId`, need to be approved in the the order specified by `sequenceNumber`.
          readOnly: true
        sequenceNumber:
          type: integer
          description: The sequence number of this step in the approval chain.
          readOnly: true
      required:
        - id
        - status
        - approvalChainId
        - autoApproved
    ApprovalStatus:
      type: string
      description: The status of the approval step.
      enum:
        - PENDING
        - APPROVED
        - REJECTED
      examples:
        - APPROVED
    ApprovePaymentRequest:
      type: object
      properties:
        approvalStepId:
          type: string
          description: The id of the approval step to be approved.
      required:
        - approvalStepId
      examples:
        - approvalStepId: 52699442-e06f-4cda-b2a8-cdeca08ff9d3
    ApproveBatchRequest:
      type: object
      properties:
        approvalStepId:
          type: string
          description: The id of the approval step to be approved.
      required:
        - approvalStepId
      examples:
        - approvalStepId: 2cf21abd-afab-4a3c-a0e8-c973ec8181f2
    RejectPaymentRequest:
      type: object
      properties:
        reason:
          type: string
          description: An optional rejection reason that will propagate to the reject event on the payment.
          maxLength: 255
      examples:
        - reason: This has been classified as a fraudulent payment
    UserAuditInfo:
      type: object
      description: User information for audit trail.
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
          description: User ID
          example: 54528335-739e-4de9-bdb3-28f96c98785d
        username:
          type: string
          example: john.smith@example.com
          readOnly: true
        name:
          type: string
          description: User given name(s) information. May be a concatenation of firstname, lastname etc.
          example: John Smith
          readOnly: true
        roleId:
          type: string
          description: Role ID
          example: 2a1e16eb-2f83-4597-99e2-cffbc4311df2
          readOnly: true
      required:
        - id
        - username
    PaymentStatus:
      description: Status of a payment. Applicable to both credit transfer payments and direct debit payments.
      type: string
      enum:
        - CREATED
        - APPROVED
        - REJECTED
        - PENDING_SUBMISSION
        - SENT
        - PENDING_AT_BANK
        - ACCEPTED
        - EXECUTED
        - FAILED
        - RETURNED
        - UNKNOWN
      example: SENT
    PaymentStatusReason:
      description: Reason for the status of a payment.
      type: object
      externalDocs:
        url: https://docs.atlar.com/docs/errors-return-reasons
      properties:
        code:
          description: Failure reason code. If present, this is a <a href="https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets">ISO 20022 error code</a>.
          type: string
          readOnly: true
          examples:
            - DS02
            - DS24
        description:
          description: Human readable description of the reason. Can be presented to an end-user.
          type: string
          readOnly: true
      examples:
        - code: DS02
          description: EBICS VEU/EDS signature cancelled by user
        - code: DS24
          description: Waiting time for EBICS VEU/EDS signature expired
    AttachedTransactionRef:
      type: object
      description: An association between a _transactable_ payment resource, e.g. a _Credit Transfer_, _Direct Debit_, or _Expected Transaction_, and an account _Transaction_.
      properties:
        type:
          type: string
          description: The resource type of the attached transaction
          enum:
            - TRANSACTION
          readOnly: true
        id:
          type: string
          description: ID of the attached transaction resource.
          readOnly: true
      examples:
        - type: TRANSACTION
          id: 27abf7cb-3867-4119-bfa7-ee3fb667ecf3
      required:
        - type
        - id
    CreditTransfer:
      type: object
      properties:
        id:
          description: ID of the credit transfer.
          $ref: '#/components/schemas/ResourceID'
          example: 76992987-48fc-4b03-b609-ea6fdc3045b4
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        creatorUserId:
          $ref: '#/components/schemas/ResourceID'
          description: ID of the user that created the credit transfer.
          readOnly: true
        amount:
          $ref: '#/components/schemas/Amount'
          readOnly: true
        scheme:
          $ref: '#/components/schemas/CreditTransferSchemeType'
          readOnly: true
        schemeDetails:
          $ref: '#/components/schemas/SchemeDetails'
          readOnly: true
        date:
          description: Requested payment execution date.
          $ref: '#/components/schemas/Date'
          example: '2022-05-07'
          readOnly: true
        status:
          $ref: '#/components/schemas/PaymentStatus'
          readOnly: true
        statusReason:
          $ref: '#/components/schemas/PaymentStatusReason'
          readOnly: true
        source:
          $ref: '#/components/schemas/AccountSnapshot'
          description: Source account from which funds will be withdrawn. This account will be debited.
          readOnly: true
        sourceHolder:
          $ref: '#/components/schemas/AccountHolder'
          readOnly: true
        destination:
          description: Destination account to which funds will be sent. This account will be credited.
          oneOf:
            - $ref: '#/components/schemas/ExternalAccountSnapshot'
            - $ref: '#/components/schemas/AccountSnapshot'
          discriminator:
            propertyName: type
            mapping:
              ACCOUNT: '#/components/schemas/AccountSnapshot'
              EXTERNAL_ACCOUNT: '#/components/schemas/ExternalAccountSnapshot'
          readOnly: true
        destinationHolder:
          $ref: '#/components/schemas/AccountHolder'
          readOnly: true
        approvalSteps:
          type: array
          items:
            $ref: '#/components/schemas/PaymentApprovalStep'
          readOnly: true
        attachedTransactions:
          type: array
          items:
            $ref: '#/components/schemas/AttachedTransactionRef'
          readOnly: true
        reference:
          $ref: '#/components/schemas/PaymentReference'
        categoryPurpose:
          $ref: '#/components/schemas/CategoryPurpose'
        chargeBearer:
          $ref: '#/components/schemas/ChargeBearer'
        regulatoryReporting:
          type: array
          x-omitempty: true
          items:
            $ref: '#/components/schemas/RegulatoryReportingDetails'
          maxItems: 10
          readOnly: true
        connectionInstructionId:
          type: string
          description: The ID of the instruction that was sent to the bank in which this credit transfer was included when it was created.
          example: c1d6502c-07c7-4c77-bee5-963f9464c7d8
          readOnly: true
        batch:
          description: Details of the associated payments batch if the credit transfer was created as part of a batch.
          $ref: '#/components/schemas/BatchDetails'
        etag:
          $ref: '#/components/schemas/ETag'
        externalId:
          $ref: '#/components/schemas/ExternalID'
          readOnly: true
        metadata:
          $ref: '#/components/schemas/Metadata'
          readOnly: true
        version:
          $ref: '#/components/schemas/ResourceVersion'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
      required:
        - id
        - organizationId
        - amount
        - scheme
        - date
        - status
        - source
        - sourceHolder
        - destination
        - destinationHolder
        - reference
        - approvalSteps
        - version
        - etag
        - created
        - updated
        - attachedTransactions
    CreditTransferDestination:
      description: A reference identifying the destination account. Can be either an internal or an external account.
      oneOf:
        - $ref: '#/components/schemas/InternalAccountRef'
        - $ref: '#/components/schemas/ExternalAccountRef'
        - $ref: '#/components/schemas/InlineExternalAccount'
      discriminator:
        propertyName: type
        mapping:
          ACCOUNT: '#/components/schemas/InternalAccountRef'
          EXTERNAL_ACCOUNT: '#/components/schemas/ExternalAccountRef'
          INLINE: '#/components/schemas/InlineExternalAccount'
    BatchDetails:
      type: object
      properties:
        id:
          description: ID of the batch.
          $ref: '#/components/schemas/ResourceID'
        treatment:
          $ref: '#/components/schemas/BatchTreatmentType'
      required:
        - id
        - treatment
    CreateCreditTransferRequest:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountInput'
        scheme:
          $ref: '#/components/schemas/CreditTransferSchemeType'
        schemeDetails:
          $ref: '#/components/schemas/SchemeDetailsInput'
        date:
          description: Requested payment execution date. It is a local date from the source account's point-of-view. Cannot be set to before the current date, and not more than 60 days into the future.
          $ref: '#/components/schemas/Date'
          example: '2022-05-07'
        source:
          description: A reference identifying the source account (as found from `/financial-data/v2/accounts`).
          $ref: '#/components/schemas/InternalAccountRef'
        destination:
          $ref: '#/components/schemas/CreditTransferDestination'
        reference:
          $ref: '#/components/schemas/PaymentReference'
        categoryPurpose:
          $ref: '#/components/schemas/CategoryPurpose'
        chargeBearer:
          $ref: '#/components/schemas/ChargeBearer'
        regulatoryReporting:
          description: Regulatory reporting can be used to provide additional information when needed due to regulatory and statutory requirements.
          type: array
          maxItems: 10
          x-omitempty: true
          items:
            $ref: '#/components/schemas/RegulatoryReportingDetails'
        externalId:
          $ref: '#/components/schemas/ExternalID'
        metadata:
          $ref: '#/components/schemas/Metadata'
      required:
        - amount
        - scheme
        - date
        - source
        - destination
        - reference
    CreditTransferJSONPatchRequest:
      description: JSON Patch request to update a credit transfer.
      externalDocs:
        url: https://jsonpatch.com/
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/PaymentJSONPatchReplaceDate'
          - $ref: '#/components/schemas/PaymentJSONPatchReplaceStatus'
          - $ref: '#/components/schemas/PaymentJSONPatchReplaceStatusReasonCode'
    PaymentJSONPatchReplaceDate:
      description: Change payment execution date.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /date
        value:
          $ref: '#/components/schemas/Date'
          example: '2022-05-08'
      additionalProperties: false
      required:
        - op
        - path
        - value
    PaymentJSONPatchReplaceStatus:
      description: Change payment status. This is forcing a status change and is by-passing the standard Atlar payment state/status machine.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /status
        value:
          $ref: '#/components/schemas/PaymentStatus'
          example: RETURNED
      additionalProperties: false
      required:
        - op
        - path
        - value
    PaymentJSONPatchReplaceStatusReasonCode:
      description: Set payment status reason (code). This can only be used toghether with `replace` path `/status`.
      externalDocs:
        url: https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /statusReason/code
        value:
          type: string
          description: A ISO 20022 status reason code in the <a href="https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets">external code set</a> _ExternalStatusReason1Code_.
          minLength: 4
          maxLength: 4
      additionalProperties: false
      required:
        - op
        - path
        - value
    CreditTransferBatch:
      type: object
      properties:
        id:
          description: ID of the batch.
          $ref: '#/components/schemas/ResourceID'
          example: e284485b-e41b-4237-a115-5a02507eacec
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        treatment:
          $ref: '#/components/schemas/BatchTreatmentType'
        inputContent:
          $ref: '#/components/schemas/BatchInputContent'
        results:
          description: |
            Deprecated - use `resultSummary` and `resultDetails`. Summary of processing results.

            The summary is only populated when the batch `status` is `COMPLETED`.

            Detailed processing results can be retrieved using
            https://docs.atlar.com/v2.0/reference/get_payments-v2beta-credit-transfer-batches-id-results.
          $ref: '#/components/schemas/BatchResultsSummary'
          readOnly: true
        resultSummary:
          $ref: '#/components/schemas/BatchResultSummary'
        status:
          $ref: '#/components/schemas/BatchStatus'
          readOnly: true
        errors:
          $ref: '#/components/schemas/BatchErrors'
        approvalSteps:
          description: |
            Batch approval steps.

            Approval steps will only be available once the the batch
            `status` is `COMPLETED`. I.e. no action must be taken
            based on the absence of approval steps (empty array).
          type: array
          items:
            $ref: '#/components/schemas/PaymentApprovalStep'
          readOnly: true
        externalId:
          $ref: '#/components/schemas/ExternalID'
        approvalResults:
          $ref: '#/components/schemas/ApprovalResults'
        creatorUserId:
          $ref: '#/components/schemas/ResourceID'
          description: ID of the user that created the batch.
          readOnly: true
        metadata:
          $ref: '#/components/schemas/Metadata'
        etag:
          $ref: '#/components/schemas/ETag'
        version:
          $ref: '#/components/schemas/ResourceVersion'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
      required:
        - treatment
        - id
        - organizationId
        - etag
        - status
        - version
        - created
        - updated
        - input
        - inputContent
        - inputDetails
        - approvalSteps
        - approvalResults
    ApprovalResults:
      type: object
      properties:
        approved:
          type: integer
          description: Number of fully approved credit transfers.
        rejected:
          type: integer
          description: Number of rejected credit transfers.
      required:
        - approved
        - rejected
    PreviewableCreditTransferBatch:
      allOf:
        - $ref: '#/components/schemas/CreditTransferBatch'
        - type: object
          properties:
            records:
              type: array
              items:
                $ref: '#/components/schemas/CreateCreditTransferRequest'
    CreditTransferBatchContentType:
      type: string
      description: |-
        The content type of the batch.

        See https://docs.atlar.com/docs/batch-payments#csv-format for details on the CSV format for credit transfer batches.
      enum:
        - application/vnd.atlar.payments.v2.credit-transfer.batch+csv
        - application/vnd.atlar.payments.v2.credit-transfer.batch+json
      example: application/vnd.atlar.payments.v2.credit-transfer.batch+csv
    CreateCreditTransferBatchRequest:
      type: object
      properties:
        treatment:
          $ref: '#/components/schemas/BatchTreatmentType'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/CreateCreditTransferRequest'
          minItems: 1
          maxItems: 1000
        externalId:
          $ref: '#/components/schemas/ExternalID'
        skipValidationErrors:
          type: boolean
          description: Skip/ignore input records that contain validation errors.
      required:
        - treatment
        - payments
    CreateCreditTransferBatchRequestFormData:
      type: object
      properties:
        treatment:
          $ref: '#/components/schemas/BatchTreatmentType'
        fileContentType:
          $ref: '#/components/schemas/CreditTransferBatchContentType'
        skipValidationErrors:
          type: boolean
          description: Skip/ignore input records that contain validation errors.
        file:
          type: string
          format: binary
      required:
        - treatment
        - fileContentType
        - file
    DirectDebit:
      type: object
      properties:
        id:
          description: ID of the direct debit.
          $ref: '#/components/schemas/ResourceID'
          example: 76992987-48fc-4b03-b609-ea6fdc3045b4
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        creatorUserId:
          $ref: '#/components/schemas/ResourceID'
          description: ID of the user that created the direct debit.
          readOnly: true
        amount:
          $ref: '#/components/schemas/Amount'
          readOnly: true
        scheme:
          $ref: '#/components/schemas/DirectDebitSchemeType'
          readOnly: true
        date:
          description: Requested payment execution date.
          $ref: '#/components/schemas/Date'
          example: '2022-05-07'
          readOnly: true
        status:
          $ref: '#/components/schemas/PaymentStatus'
          readOnly: true
        statusReason:
          $ref: '#/components/schemas/PaymentStatusReason'
          readOnly: true
        destination:
          description: Destination account which will receive funds. This account will be credited.
          $ref: '#/components/schemas/AccountSnapshot'
          readOnly: true
        destinationHolder:
          $ref: '#/components/schemas/AccountHolder'
          readOnly: true
        source:
          description: Source account from which funds will be collected. This account will be debited.
          $ref: '#/components/schemas/ExternalAccountSnapshot'
          readOnly: true
        sourceHolder:
          $ref: '#/components/schemas/AccountHolder'
          readOnly: true
        mandate:
          description: The mandate which represents the end user's consent to executing this direct debit.
          $ref: '#/components/schemas/MandateSnapshot'
          readOnly: true
        approvalSteps:
          type: array
          items:
            $ref: '#/components/schemas/PaymentApprovalStep'
          readOnly: true
        attachedTransactions:
          type: array
          items:
            $ref: '#/components/schemas/AttachedTransactionRef'
          readOnly: true
        reference:
          $ref: '#/components/schemas/PaymentReference'
          readOnly: true
        categoryPurpose:
          $ref: '#/components/schemas/CategoryPurpose'
          readOnly: true
        chargeBearer:
          $ref: '#/components/schemas/ChargeBearer'
          readOnly: true
        connectionInstructionId:
          type: string
          description: The ID of the instruction that was sent to the bank in which this direct debit was included when it was created.
          example: c1d6502c-07c7-4c77-bee5-963f9464c7d8
          readOnly: true
        etag:
          $ref: '#/components/schemas/ETag'
        externalId:
          $ref: '#/components/schemas/ExternalID'
          readOnly: true
        metadata:
          $ref: '#/components/schemas/Metadata'
          readOnly: true
        version:
          $ref: '#/components/schemas/ResourceVersion'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
      required:
        - id
        - organizationId
        - amount
        - scheme
        - date
        - status
        - destination
        - destinationHolder
        - source
        - sourceHolder
        - approvalSteps
        - reference
        - version
        - etag
        - created
        - updated
        - attachedTransactions
    CreateDirectDebitRequest:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountInput'
        scheme:
          $ref: '#/components/schemas/DirectDebitSchemeType'
        date:
          description: Requested payment execution date. It is a local date from the source account's point-of-view. Cannot be set to before the current date, and not more than 60 days into the future.
          $ref: '#/components/schemas/Date'
        source:
          description: A reference identifying the source account to collect money from. Can only be an external account.
          oneOf:
            - $ref: '#/components/schemas/ExternalAccountRef'
          discriminator:
            propertyName: type
            mapping:
              EXTERNAL_ACCOUNT: '#/components/schemas/ExternalAccountRef'
        destination:
          $ref: '#/components/schemas/InternalAccountRef'
        reference:
          $ref: '#/components/schemas/PaymentReference'
        categoryPurpose:
          $ref: '#/components/schemas/CategoryPurpose'
        chargeBearer:
          $ref: '#/components/schemas/ChargeBearer'
        externalId:
          $ref: '#/components/schemas/ExternalID'
        metadata:
          $ref: '#/components/schemas/Metadata'
      required:
        - amount
        - scheme
        - date
        - source
        - destination
        - reference
    CitiWorldlinkInstrumentInput:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/InstrumentType'
      required:
        - type
    InstrumentInput:
      type: object
      oneOf:
        - $ref: '#/components/schemas/CitiWorldlinkInstrumentInput'
      discriminator:
        propertyName: type
        mapping:
          CITI_WORLDLINK: '#/components/schemas/CitiWorldlinkInstrumentInput'
    SchemeDetailsInput:
      type: object
      properties:
        instrument:
          $ref: '#/components/schemas/InstrumentInput'
        intraCompany:
          type: boolean
          description: Whether the payment is between companies within the same group.
        urgency:
          $ref: '#/components/schemas/SchemeDetailsUrgency'
    EventWebhookPayload:
      type: object
      description: A resource event payload when sent as a webhook.
      properties:
        resource:
          description: Resource name.
          type: string
          examples:
            - credit_transfers
            - transactions
            - accounts
        event:
          $ref: '#/components/schemas/Event'
        entity:
          description: A snapshot of the resource entity, after the event / changes impacted the entity.
          type: object
        apiVersion:
          description: Atlar API (major) version. This toghether with the `resource` dictates the structure of `entity`.
          type: integer
          example: 2
      required:
        - resource
        - event
        - entity
        - apiVersion
    Account:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
          readOnly: true
          example: ac1963d7-fff9-4783-aa1d-92acb7b21a19
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
          readOnly: true
          example: 0160f6ab-5741-49e1-af46-9138927e547e
        thirdPartyId:
          description: ID of the associated third-party, e.g. the bank in which the account is held.
          example: 0a951c88-3313-472a-b312-ca2e47769670
          type: string
          readOnly: true
        affiliationId:
          description: ID of the affiliation. An affiliation is and describes the relationship between the legal entity (`entityId`) owning this account and the third-party (`thirdPartyId`) where the account is held (e.g. a bank).
          type: string
          readOnly: true
          example: b9a931ce-9606-495d-95b0-8da8251c008a
        entityId:
          description: ID of the associated legal Entity.
          example: b130e3d7-f67c-4a10-b359-25ad88c4999b
          type: string
          readOnly: true
        market:
          $ref: '#/components/schemas/MarketCode'
          readOnly: true
        currency:
          $ref: '#/components/schemas/CurrencyCode'
          readOnly: true
        name:
          description: Name of the account automatically populated by Atlar.
          type: string
          maxLength: 255
          readOnly: true
          examples:
            - My Business Account
            - GB33BUKB20201555555555
        alias:
          description: An additional name, an alias, for the account.
          example: My Business Account
          type: string
          maxLength: 255
          x-omitempty: true
          readOnly: true
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/AccountIdentifier'
          minItems: 1
          uniqueItems: true
          readOnly: true
        routing:
          type: array
          items:
            $ref: '#/components/schemas/RoutingIdentifier'
          uniqueItems: true
          maxItems: 5
          readOnly: true
        type:
          $ref: '#/components/schemas/BankAccountType'
        fictive:
          type: boolean
          description: Indicates whether the account is a fictive/test account. This will be `true` for accounts associated with the Atlar _Testbank_.
          readOnly: true
          examples:
            - false
        externalId:
          $ref: '#/components/schemas/ExternalID'
          readOnly: true
        metadata:
          $ref: '#/components/schemas/Metadata'
          readOnly: true
        paymentOptions:
          $ref: '#/components/schemas/PaymentOptions'
          readOnly: true
        version:
          $ref: '#/components/schemas/ResourceVersion'
        etag:
          $ref: '#/components/schemas/ETag'
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
      required:
        - id
        - organizationId
        - entityId
        - thirdPartyId
        - affiliationId
        - market
        - currency
        - identifiers
        - routing
        - name
        - fictive
        - created
        - updated
        - version
        - etag
    Balance:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
        accountId:
          $ref: '#/components/schemas/ResourceID'
          description: Account ID.
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        type:
          $ref: '#/components/schemas/BalanceType'
          readOnly: true
        reportedType:
          $ref: '#/components/schemas/BalanceReportedType'
          readOnly: true
        amount:
          $ref: '#/components/schemas/Amount'
          readOnly: true
        localDate:
          description: Local date in the timezone associated with the account/bank.
          $ref: '#/components/schemas/Date'
          readOnly: true
        timestamp:
          description: Timestamp of when the balance entry was recorded on the account. This timestamp is reported in UTC and thus the date component of this timestamp may be different than `localDate`.
          example: '2023-04-25T15:01:13.738861011Z'
          type: string
          format: date-time
          readOnly: true
        version:
          $ref: '#/components/schemas/ResourceVersion'
          readOnly: true
      required:
        - id
        - accountId
        - organizationId
        - type
        - reportedType
        - amount
        - localDate
        - timestamp
        - version
      examples:
        - id: 6eeb63bb-99cc-44e2-9558-202572bfe403
          accountId: 31d593d7-fff9-4783-aa1d-92acb7b21a19
          organizationId: 52dce1f7-7a38-4875-9058-f586a82d43e9
          type: BOOKED
          reportedType: CLOSE
          amount:
            currency: EUR
            value: 12345
            stringValue: '123.45'
          timestamp: '2022-05-04T18:31:12.889104898Z'
          localDate: '2022-05-04'
          version: 1
    BalanceType:
      type: string
      enum:
        - BOOKED
        - BOOKED_ADJUSTED
        - AVAILABLE
      examples:
        - BOOKED
        - BOOKED_ADJUSTED
        - AVAILABLE
    BalanceReportedType:
      type: string
      enum:
        - OPEN
        - CLOSE
        - INTERIM
      examples:
        - OPEN
        - CLOSE
    Transaction:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
          example: e37235aa-adab-11ec-8029-96ac651c9332
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        accountId:
          type: string
          description: The ID of the account which the transaction is booked on.
          example: 31d593d7-fff9-4783-aa1d-92acb7b21a19
          readOnly: true
        date:
          description: Booking date of the transaction on your account. This is a local date with no timezone from your account's point-of-view.
          $ref: '#/components/schemas/Date'
          example: '2022-05-01'
          readOnly: true
        amount:
          $ref: '#/components/schemas/Amount'
          readOnly: true
        reference:
          type: string
          description: Transaction reference. (This type of reference is sometimes also referred to as remittance information.)
          example: invoice-2022-05-03-012345
          readOnly: true
        references:
          $ref: '#/components/schemas/TransactionReferences'
          readOnly: true
        reconciliationStatus:
          $ref: '#/components/schemas/TransactionReconciliationStatus'
          readOnly: true
        counterparty:
          $ref: '#/components/schemas/CounterpartyDetails'
          readOnly: true
        description:
          type: string
          description: |-
            In most cases, the description will contain the same value (text) as the remittance information.
            If the remittance information lacks clarity or meaning, the description can be derived from
            the bank transaction code instead. This description field is intended solely for displaying
            a meaningful description to users.
          example: 'Invoice #123'
          readOnly: true
        instructedAmount:
          description: The amount that the initiator of the transaction instructed.
          $ref: '#/components/schemas/Amount'
          readOnly: true
        bankTransactionCode:
          $ref: '#/components/schemas/BankTransactionCode'
          readOnly: true
        valueDate:
          description: Value date of the transaction on your account. This is a local date with no timezone from your account's point-of-view.
          $ref: '#/components/schemas/Date'
          example: '2022-05-02'
          readOnly: true
        returned:
          type: boolean
          description: Whether or not the transaction is considered a return or reversal.
          example: false
          readOnly: true
        returnReason:
          description: Populated if the transaction is a return transaction, e.g. a payment reversal/return.
          $ref: '#/components/schemas/ReturnReason'
          readOnly: true
        currencyExchange:
          description: If any currency conversion happened at the bank holding the account, conversion details may be present here.
          $ref: '#/components/schemas/CurrencyExchange'
          readOnly: true
        virtualAccount:
          description: If a virtual account was used for the transaction the details of that virtual account may be present here.
          $ref: '#/components/schemas/TransactionVirtualAccount'
          readOnly: true
        attachedTransactables:
          type: array
          items:
            $ref: '#/components/schemas/AttachedTransactableRef'
          readOnly: true
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
        version:
          $ref: '#/components/schemas/ResourceVersion'
        metadata:
          $ref: '#/components/schemas/Metadata'
          readOnly: true
      required:
        - id
        - organizationId
        - accountId
        - date
        - amount
        - reconciliationStatus
        - description
        - created
        - updated
        - version
        - attachedTransactables
        - returned
    PendingTransaction:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
          example: e37235aa-adab-11ec-8029-96ac651c9332
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        accountId:
          type: string
          description: The ID of the account which the transactions occurs on.
          example: 31d593d7-fff9-4783-aa1d-92acb7b21a19
          readOnly: true
        date:
          description: The booking date of the transaction on your account. This is a local date with no timezone from your account's point-of-view. NB! This is a PendingTransaction, and not an actual reported Booked Transaction. This date may differ from the actual booking date of the transaction.
          $ref: '#/components/schemas/Date'
          example: '2022-05-01'
          readOnly: true
        amount:
          $ref: '#/components/schemas/Amount'
          readOnly: true
        reference:
          type: string
          description: Transaction reference. (This type of reference is sometimes also referred to as remittance information.)
          example: invoice-2022-05-03-012345
          readOnly: true
        references:
          $ref: '#/components/schemas/TransactionReferences'
          readOnly: true
        counterparty:
          $ref: '#/components/schemas/CounterpartyDetails'
          readOnly: true
        description:
          type: string
          description: |-
            In most cases, the description will contain the same value (text) as the remittance information.
            If the remittance information lacks clarity or meaning, the description can be derived from
            the bank transaction code instead. This description field is intended solely for displaying
            a meaningful description to users.
          example: 'Invoice #123'
          readOnly: true
        instructedAmount:
          description: The amount that the initiator of the transaction instructed.
          $ref: '#/components/schemas/Amount'
          readOnly: true
        bankTransactionCode:
          $ref: '#/components/schemas/BankTransactionCode'
          readOnly: true
        valueDate:
          description: Value date of the transaction on your account. This is a local date with no timezone from your account's point-of-view. NB! This is a PendingTransaction, and not an actual reported Booked Transaction. This date may differ from the actual value date of the booked transaction.
          $ref: '#/components/schemas/Date'
          example: '2022-05-02'
          readOnly: true
        returned:
          type: boolean
          description: Whether or not the transaction is considered a return or reversal.
          example: false
          readOnly: true
        returnReason:
          description: Populated if the transaction is a return transaction, e.g. a payment reversal/return.
          $ref: '#/components/schemas/ReturnReason'
          readOnly: true
        currencyExchange:
          description: If any currency conversion happened at the bank holding the account, conversion details may be present here.
          $ref: '#/components/schemas/CurrencyExchange'
          readOnly: true
        virtualAccount:
          description: If a virtual account was used for the transaction the details of that virtual account may be present here.
          $ref: '#/components/schemas/TransactionVirtualAccount'
          readOnly: true
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
        version:
          $ref: '#/components/schemas/ResourceVersion'
        etag:
          $ref: '#/components/schemas/ETag'
        metadata:
          $ref: '#/components/schemas/Metadata'
          readOnly: true
      required:
        - id
        - organizationId
        - accountId
        - date
        - amount
        - description
        - created
        - updated
        - version
        - etag
        - returned
    TransactionReferences:
      description: References and identifiers associated with a transaction.
      type: object
      properties:
        mandateReference:
          type: string
          description: Populated if a (debit) mandate reference was given on the transaction by the bank. Typically, if a transaction stems from a direct debit payment, the mandate reference that was used to pull the funds will be given.
          example: '123456'
          readOnly: true
        endToEndId:
          type: string
          description: A reference that can be set by the payment initiator that should follow the payment "end to end". Atlar will utilize this reference for tracking payments.
          example: '123456'
          readOnly: true
    TransactionVirtualAccount:
      type: object
      description: Account information about the virtual account used in the transaction.
      properties:
        market:
          $ref: '#/components/schemas/MarketCode'
          readOnly: true
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/AccountIdentifier'
          minItems: 1
          uniqueItems: true
          readOnly: true
        routing:
          type: array
          items:
            $ref: '#/components/schemas/RoutingIdentifier'
          uniqueItems: true
          readOnly: true
          x-omitempty: true
      required:
        - identifiers
    AttachedTransactableRef:
      type: object
      description: An association between a _Transaction_ and a _transactable_ resource, e.g. a _Credit Transfer_, _Direct Debit_, _Expected Transaction_, or _Payment Batch_.
      properties:
        type:
          description: The resource type of the attached transactable.
          enum:
            - CREDIT_TRANSFER
            - DIRECT_DEBIT
            - EXPECTED_TRANSACTION
            - PAYMENT_BATCH
            - CONNECTION_INSTRUCTION
          type: string
          readOnly: true
        id:
          description: ID of the attached transactable resource.
          $ref: '#/components/schemas/ResourceID'
          readOnly: true
      examples:
        - type: CREDIT_TRANSFER
          id: 1828d825-3f40-48c2-9b3b-07017ff887cc
      required:
        - type
        - id
    TransactionReconciliationStatus:
      description: Specifies whether the transaction have been reconciled against a payment or an expected transaction.
      type: string
      enum:
        - RECONCILED
        - PARTIALLY_RECONCILED
        - NOT_RECONCILED
      examples:
        - RECONCILED
        - PARTIALLY_RECONCILED
        - NOT_RECONCILED
    Entity:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ResourceID'
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        parentId:
          description: This optional field identifies a parent entity, indicating this entity is a subsidiary or branch to the parent. A missing Parent Entity ID implies the entity is without parent company.
          type: string
          minLength: 32
          maxLength: 64
        legalName:
          type: string
          description: Legal name of the entity. E.g. your company's legal business name.
          example: Example Company GmbH
          readOnly: true
        nationalIdentifier:
          $ref: '#/components/schemas/NationalIdentifier'
          readOnly: true
        address:
          $ref: '#/components/schemas/Address'
          readOnly: true
        created:
          $ref: '#/components/schemas/CreatedTimestamp'
        updated:
          $ref: '#/components/schemas/UpdatedTimestamp'
        version:
          $ref: '#/components/schemas/ResourceVersion'
      required:
        - id
        - organizationId
        - legalName
        - created
        - updated
        - version
      examples:
        - id: ce474c91-c09f-4200-81f8-0be97e1cda47
          organizationId: 6ee651dd-8982-4359-a9a7-7cd6bd1d8c41
          legalName: Example Company GmbH
          created: '2023-04-14T12:31:12.889104898Z'
          updated: '2023-04-14T12:31:12.889104898Z'
          version: 1
    CreateEntityRequest:
      type: object
      properties:
        legalName:
          type: string
          description: Legal name.
          maxLength: 255
        nationalIdentifier:
          $ref: '#/components/schemas/NationalIdentifier'
        address:
          $ref: '#/components/schemas/Address'
        parentId:
          description: Parent Entity ID, if applicable. Set the parent entity ID if the entity is a subsidiary or a branch of another entity.
          type: string
          minLength: 32
          maxLength: 64
      required:
        - legalName
    EntityJSONPatchRequest:
      description: JSON Patch Request
      externalDocs:
        url: https://jsonpatch.com/
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/EntityJSONPatchReplaceLegalName'
          - $ref: '#/components/schemas/EntityJSONPatchReplaceNationalIdentifier'
          - $ref: '#/components/schemas/EntityJSONPatchRemoveNationalIdentifier'
          - $ref: '#/components/schemas/EntityJSONPatchReplaceAddress'
          - $ref: '#/components/schemas/EntityJSONPatchRemoveAddress'
          - $ref: '#/components/schemas/EntityJSONPatchReplaceParent'
          - $ref: '#/components/schemas/EntityJSONPatchRemoveParent'
    EntityJSONPatchReplaceLegalName:
      description: Set legal name.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /legalName
        value:
          type: string
          minLength: 1
          maxLength: 255
      additionalProperties: false
      required:
        - op
        - path
        - value
    EntityJSONPatchReplaceNationalIdentifier:
      description: Set the national identifier.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /nationalIdentifier
        value:
          $ref: '#/components/schemas/NationalIdentifier'
      additionalProperties: false
      required:
        - op
        - path
        - value
    EntityJSONPatchRemoveNationalIdentifier:
      description: Remove national identifier.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /nationalIdentifier
      additionalProperties: false
      required:
        - op
        - path
    EntityJSONPatchReplaceAddress:
      description: Set the address.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /address
        value:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
      required:
        - op
        - path
        - value
    EntityJSONPatchRemoveAddress:
      description: Remove address.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /address
      additionalProperties: false
      required:
        - op
        - path
    EntityJSONPatchReplaceParent:
      description: Change the parent entity.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /parentId
        value:
          type: string
          minLength: 32
          maxLength: 64
      additionalProperties: false
      required:
        - op
        - path
        - value
    EntityJSONPatchRemoveParent:
      description: Remove parent.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /parentId
      additionalProperties: false
      required:
        - op
        - path
    AccountJSONPatchRequest:
      description: JSON Patch Request
      externalDocs:
        url: https://jsonpatch.com/
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/AccountJSONPatchReplaceAlias'
          - $ref: '#/components/schemas/AccountJSONPatchRemoveAlias'
          - $ref: '#/components/schemas/AccountJSONPatchReplaceEntity'
          - $ref: '#/components/schemas/AccountJSONPatchReplaceMetadataKey'
          - $ref: '#/components/schemas/AccountJSONPatchRemoveMetadataKey'
          - $ref: '#/components/schemas/AccountJSONPatchAddPaymentOptionsInstrument'
          - $ref: '#/components/schemas/AccountJSONPatchReplacePaymentOptionsInstrument'
          - $ref: '#/components/schemas/AccountJSONPatchRemovePaymentOptionsInstrument'
          - $ref: '#/components/schemas/AccountJSONPatchReplacePaymentOptionsInitiatorId'
          - $ref: '#/components/schemas/AccountJSONPatchRemovePaymentOptionsInitiatorId'
    AccountJSONPatchReplaceAlias:
      description: Set alias.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /alias
        value:
          type: string
          minLength: 1
          maxLength: 255
      additionalProperties: false
      required:
        - op
        - path
        - value
    AccountJSONPatchRemoveAlias:
      description: Remove alias.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /alias
      additionalProperties: false
      required:
        - op
        - path
    AccountJSONPatchReplaceEntity:
      description: Change the holder entity of this Account.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /entityId
        value:
          type: string
          minLength: 32
          maxLength: 64
      additionalProperties: false
      required:
        - op
        - path
        - value
    AccountJSONPatchReplaceMetadataKey:
      description: Set or replace the value of a specific metadata key.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          minLength: 11
          maxLength: 74
          pattern: ^/metadata/[A-Za-z0-9_\.\+\-]{1,64}$
        value:
          type: string
          minLength: 1
          maxLength: 512
      additionalProperties: false
      required:
        - op
        - path
        - value
    AccountJSONPatchRemoveMetadataKey:
      description: Remove a specific metadata key.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          minLength: 11
          maxLength: 74
          pattern: ^/metadata/[A-Za-z0-9_\.\+\-]{1,64}$
      additionalProperties: false
      required:
        - op
        - path
    AccountJSONPatchAddPaymentOptionsInstrument:
      description: Add an instrument to payment options.
      type: object
      properties:
        op:
          type: string
          enum:
            - add
        path:
          type: string
          enum:
            - /paymentOptions/instruments/-
        value:
          $ref: '#/components/schemas/Instrument'
      additionalProperties: false
      required:
        - op
        - path
        - value
    AccountJSONPatchReplacePaymentOptionsInstrument:
      description: Replace an instrument in payment options.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          pattern: ^/paymentOptions/instruments/[0-9]$
        value:
          $ref: '#/components/schemas/Instrument'
      additionalProperties: false
      required:
        - op
        - path
        - value
    AccountJSONPatchRemovePaymentOptionsInstrument:
      description: Remove an instrument from payment options.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          pattern: ^/paymentOptions/instruments/[0-9]$
      additionalProperties: false
      required:
        - op
        - path
    AccountJSONPatchReplacePaymentOptionsInitiatorId:
      description: Set the InitiatorId for payment options.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          enum:
            - /paymentOptions/initiatorId
        value:
          type: string
          minLength: 1
          maxLength: 255
      additionalProperties: false
      required:
        - op
        - path
        - value
    AccountJSONPatchRemovePaymentOptionsInitiatorId:
      description: Remove the InitiatorId from payment options.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          enum:
            - /paymentOptions/initiatorId
      additionalProperties: false
      required:
        - op
        - path
    TransactionJSONPatchRequest:
      description: JSON Patch Request
      externalDocs:
        url: https://jsonpatch.com/
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/TransactionJSONPatchReplaceMetadataKey'
          - $ref: '#/components/schemas/TransactionJSONPatchRemoveMetadataKey'
    TransactionJSONPatchReplaceMetadataKey:
      description: Set or replace the value of a specific metadata key.
      type: object
      properties:
        op:
          type: string
          enum:
            - replace
        path:
          type: string
          minLength: 11
          maxLength: 74
          pattern: ^/metadata/[A-Za-z0-9_\.\+\-]{1,64}$
        value:
          type: string
          minLength: 1
          maxLength: 512
      additionalProperties: false
      required:
        - op
        - path
        - value
    TransactionJSONPatchRemoveMetadataKey:
      description: Remove a specific metadata key.
      type: object
      properties:
        op:
          type: string
          enum:
            - remove
        path:
          type: string
          minLength: 11
          maxLength: 74
          pattern: ^/metadata/[A-Za-z0-9_\.\+\-]{1,64}$
      additionalProperties: false
      required:
        - op
        - path
    PaymentOptions:
      type: object
      properties:
        instruments:
          type: array
          x-omitempty: true
          items:
            $ref: '#/components/schemas/Instrument'
        initiatorId:
          type: string
    OAuth2AccessTokenResponse:
      description: Successful OAuth 2.0 access token response.
      externalDocs:
        url: https://datatracker.ietf.org/doc/html/rfc6749#section-4.4.3
      type: object
      properties:
        access_token:
          type: string
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.Xi9Rplok2DNmNGBPC1CMxUY-ZBkzY-g-sxqzKkWjViU
        token_type:
          type: string
          example: Bearer
        expires_in:
          description: The lifetime in seconds of the access token.
          type: integer
          format: int64
          example: 299
      required:
        - access_token
        - token_type
      additionalProperties: false
    OAuth2ErrorResponse:
      description: OAuth 2.0 error response.
      externalDocs:
        url: https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
      type: object
      properties:
        error:
          description: OAuth 2.0 error code. See a <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-5.2">RFC 6749</a> for details.
          type: string
          enum:
            - invalid_request
            - invalid_client
            - invalid_grant
            - unauthorized_client
            - unsupported_grant_type
        error_description:
          description: Human readable description of the error.
          type: string
          example: unsupported grant type
      required:
        - error
      additionalProperties: false
    WebAuthnSessionIntentRegisterCredential:
      x-internal: true
      type: object
      required:
        - type
        - credentialType
    WebAuthnSessionIntentAuthenticate:
      x-internal: true
      type: object
      properties:
        organizationId:
          $ref: '#/components/schemas/OrganizationID'
        roleId:
          $ref: '#/components/schemas/ResourceID'
        sensitiveAction:
          type: boolean
      required:
        - type
        - organizationId
        - roleId
    WebAuthnSessionIntentSign:
      x-internal: true
      type: object
      properties:
        resource:
          type: string
        method:
          type: string
      required:
        - type
        - resource
        - method
  responses:
    BadRequest:
      description: Bad request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 400
            message: There is some problem with the data you submitted.
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 404
            message: Resource not found.
    NoContent:
      description: No content.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 204
  examples:
    CreateCreditTransfer_SCT_Request:
      summary: Credit transfer with scheme SCT
      value:
        amount:
          currency: EUR
          value: 1502
        date: '2022-05-07'
        scheme: SCT
        reference: invoice-2022-05-03-001
        source:
          type: ACCOUNT
          id: ac1963d7-fff9-4783-aa1d-92acb7b21a19
        destination:
          type: EXTERNAL_ACCOUNT
          id: eac1d236-2904-4b01-8e85-a4ef3a73c353
    CreateCreditTransfer_SCT_Response:
      summary: Credit transfer with SCT scheme
      value:
        id: 76992987-48fc-4b03-b609-ea6fdc3045b4
        organizationId: 0160f6ab-5741-49e1-af46-9138927e547e
        amount:
          currency: EUR
          value: 1502
          stringValue: '15.02'
        date: '2022-05-07'
        scheme: SCT
        status: APPROVED
        reference: invoice-2022-05-03-001
        source:
          id: ac1963d7-fff9-4783-aa1d-92acb7b21a19
          type: ACCOUNT
          organizationId: 0160f6ab-5741-49e1-af46-9138927e547e
          market: DE
          currency: EUR
          identifiers:
            - market: DE
              type: IBAN
              number: DE89370400440532013000
          routing:
            - type: BIC
              number: COBADEFFXXX
        sourceHolder:
          type: ENTITY
          id: ec079994-619c-42e9-ac06-b50d4beea2e4
          legalName: Example Company GmbH
          address:
            country: DE
            city: Munich
            postalCode: '80335'
            streetName: Karlsplatz
            streetNumber: '1'
        destinationHolder:
          type: COUNTERPARTY
          id: c151b61e-33cc-4f89-ac8d-328f9efa59e9
          legalName: Max Müller
          address:
            country: DE
            city: Berlin
            postalCode: '10557'
        destination:
          id: eac1d236-2904-4b01-8e85-a4ef3a73c353
          type: EXTERNAL_ACCOUNT
          organizationId: 0160f6ab-5741-49e1-af46-9138927e547e
          market: DE
          identifiers:
            - market: DE
              type: IBAN
              number: DE75512108001245126199
          routing:
            - type: BIC
              number: SOGEDEFFXXX
        approvalSteps:
          - id: a56b7b94-fd69-4cc9-a7af-fd51d874ba14
            approvalChainId: ac0141ba-c0be-46ed-8542-7313355bab27
            status: APPROVED
            autoApproved: true
        attachedTransactions: []
        version: 2
        etag: version:2
        created: '2022-05-04T18:31:12.889104898Z'
        updated: '2022-05-04T18:31:12.889104899Z'
    WebhookRequestPayload_ResourceEvent_CreditTransfer_Approval:
      summary: Credit transfer event
      value:
        resource: credit_transfers
        event:
          id: 3
          organizationId: 0160f6ab-5741-49e1-af46-9138927e547e
          entityId: 76992987-48fc-4b03-b609-ea6fdc3045b4
          type: UPDATED
          name: FULLY_APPROVED
          timestamp: '2022-05-04T18:47:32.213842599Z'
          originator: ATLAR
          message: Automatically approved
        entity:
          id: 76992987-48fc-4b03-b609-ea6fdc3045b4
          organizationId: 0160f6ab-5741-49e1-af46-9138927e547e
          amount:
            currency: EUR
            value: 1502
            stringValue: '15.02'
          date: '2022-05-07'
          scheme: SCT
          status: APPROVED
          reference: ref-2022-05-03-001
          source:
            id: ac1963d7-fff9-4783-aa1d-92acb7b21a19
            type: ACCOUNT
            organizationId: 0160f6ab-5741-49e1-af46-9138927e547e
            market: DE
            currency: EUR
            identifiers:
              - market: DE
                type: IBAN
                number: DE89370400440532013000
          sourceHolder:
            id: ec079994-619c-42e9-ac06-b50d4beea2e4
            type: ENTITY
            legalName: Example Company GmbH
          destinationHolder:
            id: c151b61e-33cc-4f89-ac8d-328f9efa59e9
            type: COUNTERPARTY
            legalName: Max Müller
            address:
              country: DE
              city: Berlin
              postalCode: '10557'
          destination:
            id: eac1d236-2904-4b01-8e85-a4ef3a73c353
            type: EXTERNAL_ACCOUNT
            organizationId: 0160f6ab-5741-49e1-af46-9138927e547e
            market: DE
            identifiers:
              - market: DE
                type: IBAN
                number: DE75512108001245126199
            routing:
              - type: BIC
                number: SOGEDEFFXXX
          approvalSteps:
            - id: 52699442-e06f-4cda-b2a8-cdeca08ff9d3
              approvalChainId: ac0141ba-c0be-46ed-8542-7313355bab27
              status: APPROVED
              autoApproved: false
              approver:
                id: 266f4e96-c614-465e-a1a9-1736a7c20bab
                username: owner@example.com
              requiredRoleIds:
                - ee4e4acd-9ff0-445f-9cf5-f09350ba15b6
              updated: '2022-05-04T18:47:32.213842599Z'
          attachedTransactions: []
          version: 3
          etag: version:3
          created: '2022-05-04T18:31:12.889104898Z'
          updated: '2022-05-04T18:47:32.213842599Z'
        apiVersion: 2
x-tagGroups:
  - name: Atlar Connectivity API
    tags:
      - Connections
  - name: Atlar Payments API
    tags:
      - Credit Transfers
      - Direct Debits
      - External Accounts
      - Counterparties
      - Mandates
      - Events (webhooks)
      - Approval Chains
      - Payment Conditions
      - Payment Templates
      - Penny Tests
  - name: Atlar Financial Data API
    tags:
      - Accounts
      - Transactions
      - Pending Transactions
      - Entities
      - Investments
  - name: Atlar IAM API
    tags:
      - Identity Providers
      - Roles
      - Authentication
      - Users
      - Organizations
      - Change Requests
      - OAuth
      - Invitations
      - Audit logs
