openapi: 3.0.1
info:
  title: Account creation
  version: '1.0'
servers:
  - url: https://api.solaris-sandbox.de
    description: Sandbox
  - url: https://api.solarisbank.de
    description: Production
paths:
  /v1/accounts/opening_requests:
    post:
      tags:
        - Account opening
      summary: Create an account opening request
      description: >-
        Creates an account opening request for a specific customer. See the
        [account opening
        guide](https://docs.solarisgroup.com/guides/digital-banking/account-opening/)
        for more information about this process and its associated stages.
      operationId: create_account_opening_request
      requestBody:
        $ref: '#/components/requestBodies/AccountOpeningRequest_Create'
      responses:
        '201':
          description: The account opening request was successfully initiated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/account_opening_request'
        '400':
          description: An error occurred on the client side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
      security:
        - oauth2:
            - solaris_account_opening_request#create
    get:
      tags:
        - Account opening
      summary: Index all account opening requests for all of your customers
      description: >-
        Returns an array containing all account opening requests for all of your
        customers.
      operationId: index_account_opening_requests
      parameters:
        - name: filter[customer_id]
          in: query
          description: Filters the response by the customer ID.
          schema:
            type: string
        - name: filter[status]
          in: query
          description: >-
            Filters the response by the status of the account opening request
            (AOR).
          schema:
            $ref: '#/components/schemas/account_opening_request_status_enum'
        - name: filter[created_at][min]
          in: query
          description: >-
            Filters the response by the `created_at` field (min border) of the
            AOR.
          schema:
            type: string
        - name: filter[created_at][max]
          in: query
          description: >-
            Filters the response by the `created_at` field (max border) of the
            AOR.
          schema:
            type: string
        - name: sort
          in: query
          description: Sorts the returned AORs by the `created_at` field.
          schema:
            type: string
        - name: page[size]
          in: query
          description: The size of each results page to return.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 10
        - name: page[number]
          in: query
          description: The number of results pages to return.
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
      responses:
        '400':
          description: An error occurred on the client side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
      security:
        - oauth2:
            - solaris_account_opening_request#index
  /v1/accounts/opening_requests/{id}:
    get:
      tags:
        - Account opening
      summary: Retrieve a single account opening request
      description: >-
        Returns the details of the account opening request specified in the
        request URL.
      operationId: get_account_opening_request_by_id
      parameters:
        - name: id
          in: path
          description: The ID of the account opening request to return.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The operation was successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/account_opening_request'
        '400':
          description: An error occurred on the client side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: The account opening request could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
      security:
        - oauth2:
            - solaris_account_opening_request#find
  /v1/persons/{person_id}/accounts:
    post:
      tags:
        - Person accounts
      summary: Create an account for a person
      deprecated: true
      description: >-
        Creates an account for the person specified in the request URL.<br> The
        person in the request URL will be assigned the role of account owner.
        Consult with your Partner Manager to determine which values you should
        use for `account_type`.<br> Note that you may only open an account for a
        person after they have successfully completed the identification
        process.<br> Upon creation, the `account_limit` will always be set to
        zero. If you are creating a specific type of account with a default
        limit in place as agreed with Solaris, then use the GET Retrieve an
        account endpoint to obtain this value.
      parameters:
        - name: person_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The content of the request.
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  $ref: '#/components/schemas/Solaris-Decorators-AccountTypeEnum'
                purpose:
                  type: string
                  description: >-
                    The purpose of the account. Use `primary` unless otherwise
                    instructed.
                  default: primary
                bic:
                  type: string
                  description: >-
                    The BIC to apply to the account. Choose the BIC that applies
                    to the country where you wish to open the account.
                  enum:
                    - SOBKDEBBXXX
                    - SOBKDEB2XXX
                    - SOBKITM2XXX
                    - SOBKFRP2XXX
                    - SOBKESM2XXX
              example:
                type: CHECKING_BUSINESS
                purpose: primary
                bic: SOBKDEBBXXX
        required: false
      responses:
        '201':
          description: Successful result of the operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Solaris-Server-Decorators-Account'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: You are not authorized to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: The resource could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404-2'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
        default:
          description: Unexpected error
          content: {}
      security:
        - oauth2:
            - solaris_service_person_account#create
      x-codegen-request-body-name: body
    get:
      tags:
        - Person accounts
      summary: Index a person's accounts
      description: >-
        Returns an array containing all accounts owned by the person specified
        in the request URL.
      parameters:
        - name: person_id
          in: path
          required: true
          schema:
            type: string
        - name: page[number]
          in: query
          description: The number of results pages to return.
          schema:
            type: string
        - name: page[size]
          in: query
          description: The size of each page in the response.
          schema:
            type: string
        - name: filter[iban]
          in: query
          description: Filters the results by IBAN.
          schema:
            type: string
      responses:
        '200':
          description: Successful result of the operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/Decorators-AccountWithoutBalanceAndLimit
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: You are not authorized to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: The resource could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404-2'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
        default:
          description: Unexpected error
          content: {}
      security:
        - oauth2:
            - solaris_service_person_account#all
  /v1/persons/{person_id}/accounts/{account_id}:
    get:
      tags:
        - Person accounts
      summary: Get a single personal account
      description: Returns information about a single personal banking account.
      parameters:
        - name: person_id
          in: path
          required: true
          schema:
            type: string
        - name: account_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The operation was successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/account'
        '400':
          description: An error occurred on the client side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: The account could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
      security:
        - oauth2:
            - solaris_service_person_account#find
    patch:
      tags:
        - Person accounts
      summary: Update a personal account
      description: Updates the personal account specified in the request URL.
      parameters:
        - name: person_id
          in: path
          required: true
          schema:
            type: string
        - name: account_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/person_account_body'
      responses:
        '204':
          description: Successfully updated the person's account.
        '400':
          description: An error occurred on the client side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: The resource could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                errors:
                  - id: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
                    status: 404
                    code: model_not_found
                    title: Model Not Found
                    detail: Couldn't find Partner's account for id 'Id'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_error'
      security:
        - oauth2:
            - solaris_service_person_account#update
  /v1/businesses/{business_id}/accounts:
    post:
      tags:
        - Business accounts
      summary: Create an account for a business
      deprecated: true
      description: >-
        Creates a bank account for the business specified in the request URL.
        The customer who opens the account is the account owner.<br> Please note
        the following:<br> <ul> <li>An account can only be opened after the
        account owner has had a successful person identification.</li>
        <li>Choose the BIC that corresponds with your desired
        passporting/branching scheme (e.g., SOBKDEB2XXX for German accounts,
        SOBKITM2XXX for Italian branch accounts).</li> <li>On sandbox, set the
        account <code>type</code> to <code>CHECKING_BUSINESS</code>. Solaris'
        backend will automatically set the balance to 1000 EUR for testing
        purposes.</li> </ul>
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The content of the request.
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  $ref: '#/components/schemas/Solaris-Decorators-AccountTypeEnum'
                purpose:
                  type: string
                  description: The purpose of the account. The default value is `primary`.
                bic:
                  type: string
                  description: >-
                    The BIC to apply to the account. Choose the BIC that applies
                    to the country where you wish to open the account.
                  enum:
                    - SOBKDEBBXXX
                    - SOBKDEB2XXX
                    - SOBKITM2XXX
                    - SOBKFRP2XXX
                    - SOBKESM2XXX
              example:
                type: CHECKING_BUSINESS
                purpose: primary
                bic: SOBKDEB2XXX
        required: false
      responses:
        '201':
          description: Successful result of the operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Solaris-Server-Decorators-Account'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: You are not authorized to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: The resource could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404-2'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
        default:
          description: Unexpected error
          content: {}
      security:
        - oauth2:
            - solaris_service_business_account#create
      x-codegen-request-body-name: body
  /v1/businesses/{business_id}/accounts/{id}:
    get:
      tags:
        - Business accounts
      summary: Retrieve a business account
      description: Returns the business account specified in the request URL.
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The operation was successful.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/solaris_server_decorators_account_with_status
        '400':
          description: An error occurred on the client side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: The account could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
        default:
          description: Unexpected error
      security:
        - oauth2:
            - solaris_service_business_account#find
components:
  schemas:
    account_opening_request_status_enum:
      type: string
      description: The status of the account opening request.
      example: COMPLETED
      enum:
        - INITIATED
        - IN_PROGRESS
        - COMPLETED
        - REJECTED
    Error400:
      type: object
      properties:
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        status:
          type: string
          example: '400'
        code:
          type: string
          example: build_pagination_headers_failure
        title:
          type: string
          example: Failed to build pagination headers.
        detail:
          type: string
          example: Cannot connect to database.
    Error500:
      type: object
      properties:
        id:
          type: string
          example: e8915041-9d8c-4d96-9dd1-04e8522ecdbf
        status:
          type: string
          example: '500'
        code:
          type: string
          example: generic_error
        title:
          type: string
          example: Generic Error
        detail:
          type: string
          example: There was an error.
    account_opening_customer_type_enum:
      type: string
      description: >-
        The type of customer for whom you're opening an account. Use `Person`
        for B2C and Freelancer customers and `Business` for B2B customers.
      example: Person
      enum:
        - Person
        - Business
    account_opening_product_names_enum:
      type: string
      description: >-
        The product name for which you want to open an account. Check the
        [account opening
        guide](https://docs.solarisgroup.com/guides/digital-banking/account-opening/#fields-mapping)
        for more information about this field.
      example: CURRENT_ACCOUNT_CONSUMER_GERMANY
      enum:
        - CURRENT_ACCOUNT_BUSINESS_FRANCE
        - CURRENT_ACCOUNT_BUSINESS_GERMANY
        - CURRENT_ACCOUNT_BUSINESS_ITALY
        - CURRENT_ACCOUNT_BUSINESS_SPAIN
        - CURRENT_ACCOUNT_CONSUMER_FRANCE
        - CURRENT_ACCOUNT_CONSUMER_GERMANY
        - CURRENT_ACCOUNT_CONSUMER_ITALY
        - CURRENT_ACCOUNT_CONSUMER_SPAIN
        - CURRENT_ACCOUNT_FREELANCER_FRANCE
        - CURRENT_ACCOUNT_FREELANCER_GERMANY
        - CURRENT_ACCOUNT_FREELANCER_ITALY
        - CURRENT_ACCOUNT_FREELANCER_SPAIN
        - CUSTOMER_CARD_SETTLEMENT
        - DECOUPLED_CARD_CONSUMER_GERMANY
        - EMONEY_ACCOUNT_BUSINESS_GERMANY
        - EMONEY_ACCOUNT_CONSUMER_GERMANY
        - EMONEY_ACCOUNT_FREELANCER_GERMANY
        - RESTRICTED_ACCOUNT_BUSINESS_GERMANY
        - RESTRICTED_ACCOUNT_CONSUMER_GERMANY
        - RESTRICTED_ACCOUNT_CONSUMER_ITALY
        - SAVINGS_ACCOUNT_CONSUMER_FRANCE
        - SAVINGS_ACCOUNT_BUSINESS_FRANCE
        - SAVINGS_ACCOUNT_FREELANCER_FRANCE
        - SAVINGS_ACCOUNT_CONSUMER_GERMANY
        - SAVINGS_ACCOUNT_BUSINESS_GERMANY
        - SAVINGS_ACCOUNT_FREELANCER_GERMANY
        - SAVINGS_ACCOUNT_CONSUMER_ITALY
        - SAVINGS_ACCOUNT_BUSINESS_ITALY
        - SAVINGS_ACCOUNT_FREELANCER_ITALY
        - SAVINGS_ACCOUNT_CONSUMER_SPAIN
        - SAVINGS_ACCOUNT_BUSINESS_SPAIN
        - SAVINGS_ACCOUNT_FREELANCER_SPAIN
        - SAVINGS_ACCOUNT_EXTERNAL_REFERENCE_CONSUMER_GERMANY
        - SOFT_CURRENCY_ACCOUNT
        - SUBACCOUNT_CONSUMER_FRANCE
        - SUBACCOUNT_CONSUMER_GERMANY
        - SUBACCOUNT_CONSUMER_ITALY
        - SUBACCOUNT_CONSUMER_SPAIN
        - SUBACCOUNT_BUSINESS_FRANCE
        - SUBACCOUNT_BUSINESS_GERMANY
        - SUBACCOUNT_BUSINESS_ITALY
        - SUBACCOUNT_BUSINESS_SPAIN
        - SUBACCOUNT_FREELANCER_FRANCE
        - SUBACCOUNT_FREELANCER_GERMANY
        - SUBACCOUNT_FREELANCER_ITALY
        - SUBACCOUNT_FREELANCER_SPAIN
    account_opening_account_types:
      type: string
      description: >-
        The type of account you want to open. Must correspond to the
        `product_name` and `customer_type`. Check the [account opening
        guide](https://docs.solarisgroup.com/guides/digital-banking/account-opening/#fields-mapping)
        for more information about this field.
      example: CHECKING_PERSONAL
      enum:
        - CALL_MONEY
        - CARD_SETTLEMENT_PARTNER
        - CHECKING_BUSINESS
        - CHECKING_PERSONAL
        - CHECKING_PERSONAL_OVERDRAFT
        - CHECKING_SOLE_PROPRIETOR
        - CHECKING_SUBACCOUNT
        - CUSTOMER_CURRENCY_ACCOUNT
        - DECOUPLED_CARD_BUSINESS
        - DECOUPLED_CARD_PERSONAL
        - EMONEY_PARKING
        - EMONEY_PREPAID
        - SAVINGS_BUSINESS
        - SAVINGS_PERSONAL
        - SAVINGS_PERSONAL_EXTERNAL_REFERENCE
        - SAVINGS_SOLE_PROPRIETOR
        - WALLET_BUSINESS
        - WALLET_INSTITUTIONAL
        - WALLET_LIQUIDITY_PROVIDER
        - WALLET_PERSONAL
        - WALLET_PERSONAL_PAYMENT_ACC
    AccountOpeningRequest_Create_Request:
      type: object
      required:
        - customer_id
        - customer_type
        - product_name
        - account_type
        - account_currency
        - account_bic
      properties:
        customer_id:
          type: string
          description: >-
            The ID (e.g., `person_id` or `business_id`) of the customer for whom
            you're opening the account.
          example: b109ee6f66d2a061e006bd31c6455df2cper
        customer_type:
          allOf:
            - $ref: '#/components/schemas/account_opening_customer_type_enum'
        product_name:
          allOf:
            - $ref: '#/components/schemas/account_opening_product_names_enum'
        account_type:
          allOf:
            - $ref: '#/components/schemas/account_opening_account_types'
        account_purpose:
          type: string
          description: >-
            The purpose of the account. Use `primary` unless otherwise
            instructed.
          example: primary
        account_bic:
          type: string
          description: >-
            The BIC to apply to the account. Choose the BIC that corresponds
            with the branch in which you want to open the account.
          example: SOBKDEB2XXX
          enum:
            - SOBKDEBBXXX
            - SOBKDEB2XXX
            - SOBKITM2XXX
            - SOBKFRP2XXX
            - SOBKESM2XXX
        account_currency:
          type: string
          description: The currency of the account.
          example: EUR
          enum:
            - CAD
            - CHF
            - CNY
            - DKK
            - EUR
            - GBP
            - HKD
            - JPY
            - NOK
            - SEK
            - SGD
            - USD
            - AED
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BMD
            - BND
            - BOB
            - BRL
            - BTN
            - BZD
            - CLP
            - COP
            - CRC
            - CUP
            - CVE
            - CZK
            - DJF
            - DOP
            - DZD
            - ETB
            - FJD
            - GEL
            - GTQ
            - GYD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - JMD
            - JOD
            - KES
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LKR
            - LRD
            - LSL
            - MAD
            - MDL
            - MGA
            - MKD
            - MOP
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - NPR
            - NZD
            - OMR
            - PEN
            - PGK
            - PHP
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SCR
            - SLL
            - SRD
            - STN
            - SVC
            - SZL
            - THB
            - TJS
            - TRY
            - TWD
            - TZS
            - UAH
            - UGX
            - UYU
            - UZS
            - VND
            - XPF
            - ZAR
            - ZMW
            - EMONEY_EUR
    account_opening_request:
      type: object
      properties:
        id:
          type: string
          description: The ID of the account opening request.
          example: f8d7fbbd587047a0aa449ce69d2d6c08aorq
        customer_id:
          type: string
          description: >-
            The ID (e.g., `person_id` or `business_id`) of the customer for whom
            you're opening the account.
          example: b109ee6f66d2a061e006bd31c6455df2cper
        customer_type:
          allOf:
            - $ref: '#/components/schemas/account_opening_customer_type_enum'
        status:
          allOf:
            - $ref: '#/components/schemas/account_opening_request_status_enum'
        product_name:
          allOf:
            - $ref: '#/components/schemas/account_opening_product_names_enum'
        account_type:
          allOf:
            - $ref: '#/components/schemas/account_opening_account_types'
        account_purpose:
          description: The purpose of the account. Use primary unless otherwise instructed.
          example: primary
        account_bic:
          type: string
          description: >-
            The BIC to apply to the account. Choose the BIC that corresponds
            with the branch in which you want to open the account.
          example: SOBKDEB2XXX
        account_currency:
          description: The currency of the account.
          example: EUR
        rejection_reason:
          description: The reason why the AOR was rejected.
          example:
            failed_validation: consumer_age_over_18
            details: Customer is not over 18 years old.
        account_id:
          type: string
          description: The ID of the account.
          example: c5a0e32369e9372e0fdf490294cecd8dcacc
        iban:
          type: string
          description: The IBAN of the account.
          example: DE49110101013998767672
        created_at:
          type: string
          format: date-time
          description: The timestamp (date-time) when the AOR was created.
          example: '2021-12-22T15:05:33.634+00:00'
        updated_at:
          type: string
          format: date-time
          description: The timestamp (date-time) when the AOR was last updated.
          example: '2021-12-22T15:05:33.634+00:00'
    Error404:
      type: object
      properties:
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        status:
          type: string
          example: '404'
        code:
          type: string
          example: model_not_found
        title:
          type: string
          example: Model Not Found
        detail:
          type: string
          example: Couldn't find 'Account' for id 'DE24112233445566'.
    Solaris-Decorators-AccountTypeEnum:
      type: string
      description: The type of account.
      enum:
        - BASIC_ACCOUNT
        - BILLING_ACCOUNT
        - CALL_MONEY
        - CASH_DEPOSIT
        - CHECKING_BUSINESS
        - CHECKING_BUSINESS_CREDITLINE
        - CHECKING_FIXED_MATURITY
        - CHECKING_OVERDRAFT
        - CHECKING_OVERDRAFT_FLEXIBLE
        - CHECKING_PERSON_CREDIT_LINE
        - CHECKING_PERSON_INSTALMENT_LOAN
        - CHECKING_PERSONAL
        - CHECKING_PERSONAL_OVERDRAFT
        - CHECKING_SOLE_PROPRIETOR
        - CLEARING_ACCOUNT
        - COLLECTION_ACCOUNT
        - DECOUPLED_CARD_BUSINESS
        - DEPOSIT_FIXED_TERM_BUSINESS
        - DEPOSIT_TIME_PASSIVE
        - EMONEY_PARKING
        - EMONEY_PREPAID
        - EMONEY_PREPAID_POOLING
        - ESCROW_LIABILITY
        - EXTERNAL_ACCOUNT
        - FACTORING
        - GENERAL_LEDGER
        - GUARANTEE
        - INDIVIDUAL_SPECIFIC_PROVISIONS
        - LIABILITY_ASSUMPTION
        - LOAN_ACCOUNT_CREDIT_LINE
        - LOAN_ACCOUNT_MUNICIPALITIES
        - LOAN_BALLOON
        - LOAN_BULLET
        - LOAN_RATE_FIXED
        - LOAN_RATE_VARIABLE
        - LORO
        - SDD_DEPOSIT
        - SETTLEMENT
        - SME_LOAN
        - SURETY
        - TAGESGELD_ACTIVE
    Solaris-Enums-LockingReason:
      type: array
      description: >-
        Read-only indicator of the reason a block was applied to the account. If
        the account is not blocked, then this value will contain an empty array.
      items:
        type: string
        enum:
          - AML_FOLLOW_UP_OVERDUE
          - COMPANY_FOUNDATION
          - COMPLIANCE
          - CUSTOMER_WISH
          - DECOUPLED_CARD_DUNNING
          - DECOUPLED_CARD_TERMINATION
          - IDENTIFICATION_FAILED
          - IDENTIFICATION_DOCUMENT_EXPIRED
          - IN_CLOSURE
          - INSOLVENCY
          - LOAN_RESERVATION
          - MISSING_TAX_INFORMATION
          - OTHER
          - SEIZURE
    overdraft:
      type: object
      description: Object describing an overdraft on the account.
      properties:
        rate:
          type: number
          description: The overdraft rate.
        limit:
          type: integer
          description: The overdraft limit.
    Decorators-AccountWithoutBalanceAndLimit:
      type: object
      properties:
        id:
          type: string
          description: The ID of the account.
          example: efdd8c5e7ec0b4e36768c6de39e6cfc0cacc
        iban:
          type: string
          description: The account's IBAN.
          example: DE05011010100000000043
        bic:
          type: string
          description: The account's BIC.
          example: SOBKDEB2XXX
        type:
          $ref: '#/components/schemas/Solaris-Decorators-AccountTypeEnum'
        purpose:
          type: string
          description: The purpose of the account.
          example: primary
        opened_at:
          type: string
          description: UTC timestamp from when the account was opened.
          example: '2020-04-25T12:50:33Z'
        status:
          type: string
          description: Current status of the account
          example: ACTIVE
        locking_status:
          type: string
          description: >-
            Indicates whether or not funds can be transferred to or from the
            account.
          example: BLOCK
          enum:
            - BLOCK
            - CREDIT_BLOCK
            - DEBIT_BLOCK
            - NO_BLOCK
        locking_reasons:
          $ref: '#/components/schemas/Solaris-Enums-LockingReason'
        person_id:
          type: string
          description: Person ID of the account owner.
          example: 0ba2211cab11af6094d60ead81f2bd9dcper
        business_id:
          type: string
          description: ID of the business that owns the account (if applicable).
          example: 52e6a9b8a559d842ed7d8901b0e1bf4bcbiz
        overdraft:
          $ref: '#/components/schemas/overdraft'
    Error403:
      type: object
      properties:
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        status:
          type: string
          example: '403'
        code:
          type: string
          example: unauthorized_action
        title:
          type: string
          example: Unauthorized Action
        detail:
          type: string
          example: Unauthorized action is not allowed.
    Error404-2:
      type: object
      properties:
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        status:
          type: string
          example: '404'
        code:
          type: string
          example: model_not_found
        title:
          type: string
          example: Model Not Found
        detail:
          type: string
          example: >-
            Couldn't find 'Solaris::Identification' for id
            'bbbcccfff388923eb899a5852df6cidt'.
    Solaris-Server-Decorators-Money:
      type: object
      properties:
        value:
          type: integer
          description: The amount value.
          example: 1000
        unit:
          type: string
          description: The unit of the given value in cents.
          example: cents
        currency:
          type: string
          description: The currency of the given value. Only EUR is currently supported.
          example: EUR
    Solaris-Server-Decorators-Account:
      type: object
      properties:
        id:
          type: string
          description: Unique ID of the account.
          example: efe320cbe121418c982b6af45bc9cacc
        iban:
          type: string
          description: The account's IBAN.
          example: DE43110101005555555555
        bic:
          type: string
          description: The account's BIC.
          example: SOBKDEB2XXX
        type:
          $ref: '#/components/schemas/Solaris-Decorators-AccountTypeEnum'
        purpose:
          type: string
          description: The purpose of the account.
          example: primary
        currency:
          type: string
          description: The currency of the account.
          example: EUR
        balance:
          description: >-
            The funds that the customer currently has on their account. Includes
            bookings with a valuta date no later than the current date.
          allOf:
            - $ref: '#/components/schemas/Solaris-Server-Decorators-Money'
        available_balance:
          description: >-
            The funds that the customer has at their disposal. This includes
            bookings (positive bookings with a valuta date up to the current
            date, negative bookings regardless of valuta date) and is corrected
            on reservations and the account limit.
          allOf:
            - $ref: '#/components/schemas/Solaris-Server-Decorators-Money'
        locking_status:
          type: string
          description: Indicates whether the account is currently locked.
          example: NO_BLOCK
          enum:
            - NO_BLOCK
            - BLOCK
            - CREDIT_BLOCK
            - DEBIT_BLOCK
        locking_reasons:
          allOf:
            - $ref: '#/components/schemas/Solaris-Enums-LockingReason'
          example:
            - null
        account_limit:
          description: >-
            The allowed level of negative balance on the account. This value is
            factored into the calculation of the account's `available_balance`.
          allOf:
            - $ref: '#/components/schemas/Solaris-Server-Decorators-Money'
        person_id:
          type: string
          description: Person ID of the account owner.
          example: 0ba2211cab11af6094d60ead81f2bd9dcper
        business_id:
          type: string
          description: ID of the business to which the account belongs (if applicable).
          example: 52e6a9b8a559d842ed7d8901b0e1bf4bcbiz
    overdraft-2:
      type: object
      properties:
        rate:
          type: number
          example: 12.5
        limit:
          type: integer
          example: 10000
    account:
      type: object
      properties:
        id:
          type: string
          description: ID of the account.
          example: 5526853938474f3e92b22a03ea57a544cacc
        iban:
          type: string
          description: IBAN associated with the account.
          example: DE76110101001100000999
        bic:
          type: string
          description: BIC associated with the account.
          example: SOBKDEBBXXX
        type:
          type: string
          description: Type of the account.
          example: CHECKING_PERSONAL
          enum:
            - CHECKING_PERSONAL
            - CHECKING_BUSINESS
        overdraft:
          $ref: '#/components/schemas/overdraft-2'
        balance:
          type: object
          description: The current account balance. Value is in Euro cents.
          properties:
            value:
              type: integer
              example: 99000
            unit:
              type: string
              example: cents
            currency:
              type: string
              example: EUR
        available_balance:
          type: object
          description: >-
            The current account balance including reservations that have not yet
            been booked. Value is in Euro cents.
          properties:
            value:
              type: integer
              example: 89000
            unit:
              type: string
              example: cents
            currency:
              type: string
              example: EUR
        locking_status:
          type: string
          description: >-
            Read-only booking block indicating whether funds can be transferred
            to/from the account. The default status is `NO_BLOCK`. Other status
            values indicate that funds may neither be credited to, nor debited
            from, the account. Only authorized Solaris employees can change the
            status of this value. Attempting to perform an action not compliant
            with the current blocking status (e.g., initiating a transaction to
            or from a blocked account) will cause either a return of the
            transaction or an exception.
          enum:
            - NO_BLOCK
            - CREDIT_BLOCK
            - DEBIT_BLOCK
            - BLOCK
        locking_reasons:
          $ref: '#/components/schemas/Solaris-Enums-LockingReason'
        account_limit:
          type: object
          description: >-
            The allowed amount of negative balance on the account. This is
            included into the calculation of the `available_balance`.
          properties:
            value:
              type: integer
              example: 100000
            unit:
              type: string
              example: cents
            currency:
              type: string
              example: EUR
        person_id:
          type: string
          description: ID of the person for whom the account was created.
          example: bb66a0161a0a4066abfe133412f6236dcper
        business_id:
          type: string
          description: >-
            ID of the business for whom the account was created. Only filled if
            the account owner is a legal entity.
          example: a9a25dc10aa74244bd0bb75d1ce6b3b5cbiz
        partner_id:
          type: string
          description: ID of the Solaris partner with whom the account is associated.
          example: 55e47118b78741dbb81cdd3d372bc448cpar
        opened_at:
          type: string
          description: Date and time when the account was opened (UTC format).
          example: '2017-10-11T22:33:26Z'
        status:
          type: string
          description: Status of the account.
          example: ACTIVE
          enum:
            - ACTIVE
            - INACTIVE
        closed_at:
          type: string
          description: Date and time when the account was closed (UTC format).
          example: '2022-01-01T12:11:16Z'
    person_account_body:
      type: object
      required:
        - block_reasons
        - account_id
        - person_id
      properties:
        block_reasons:
          type: array
          description: The reason the customer wants to block/unblock their account.
          example:
            - CUSTOMER_WISH
          items:
            type: string
            enum:
              - CUSTOMER_WISH
              - COMPLIANCE_PARTNER
        acccount_id:
          type: string
          description: The account ID.
          example: adc123a45d6d7cf8fbfeed537ba919d5cacc
        person_id:
          type: string
          description: The customer's unique person ID.
          example: dc1a6812a14f6cc338cd084208535bcdcper
        comment:
          type: string
          description: Additional information about the request.
    error:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: A unique identifier for this error message.
                example: b805c37f-75e9-4445-974c-12d28e7584ee
              status:
                type: integer
                description: >-
                  The HTTP status code of the response (typically in the range
                  4xx–5xx).
                example: 400
              code:
                type: string
                description: A machine-readable representation of the error type.
                example: invalid_json
              title:
                type: string
                description: The human-readable name of the error type.
                example: Invalid JSON
              detail:
                type: string
                description: A human-readable description of the error.
                example: The provided JSON was not properly formatted.
            example:
              id: b805c37f-75e9-4445-974c-12d28e7584ee
              status: 400
              code: invalid_json
              title: Invalid JSON
              detail: The provided JSON was not properly formatted.
    internal_error:
      allOf:
        - $ref: '#/components/schemas/error'
        - type: object
          example:
            errors:
              - id: b805c37f-75e9-4445-974c-12d28e7584ee
                status: 500
                code: generic_error
                title: Generic Error
                detail: There was an error.
    closure_reason_enum:
      type: string
      description: >-
        List of possible reasons for an account closure request initiated by
        Solaris.
      example: COMPLIANCE_IMMEDIATE_INTERNAL
      enum:
        - ACCOUNT_REVOCATION
        - ACCOUNT_REVOCATION_INTERNAL
        - COMPLIANCE_IMMEDIATE_INTERNAL
        - COMPLIANCE_ORDINARY_INTERNAL
        - CUSTOMER_WISH
        - CUSTOMER_WISH_INTERNAL
        - DUNNING_DECOUPLED_CARD_INTERNAL
        - INSOLVENCY_IMMEDIATE_INTERNAL
        - INSOLVENCY_ORDINARY_INTERNAL
        - PARTNER_SERVICE_ACCOUNT_TERMINATED
        - RELATIONSHIP_TERMINATION
        - RELATIONSHIP_TERMINATION_INTERNAL
        - SEIZURES_ORDINARY_INTERNAL
        - TECHNICAL_IMMEDIATE_INTERNAL
    solaris_server_decorators_account_with_status:
      type: object
      properties:
        id:
          type: string
          description: ID of the account.
          example: 5526853938474f3e92b22a03ea57a544cacc
        iban:
          type: string
          description: IBAN associated with the account.
          example: DE76110101001100000999
        bic:
          type: string
          description: BIC associated with the account.
          example: SOBKDEBBXXX
        type:
          type: string
          description: Type of the account.
          example: CHECKING_PERSONAL
          enum:
            - CHECKING_PERSONAL
            - CHECKING_BUSINESS
        purpose:
          type: string
          description: purpose of account
        currency:
          type: string
          description: currency of account
          example: EUR
        balance:
          type: object
          description: The current account balance. Value is in Euro cents.
          properties:
            value:
              type: integer
              example: 99000
            unit:
              type: string
              example: cents
            currency:
              type: string
              example: EUR
        available_balance:
          type: object
          description: >-
            The current account balance including reservations that have not yet
            been booked. Value is in Euro cents.
          properties:
            value:
              type: integer
              example: 89000
            unit:
              type: string
              example: cents
            currency:
              type: string
              example: EUR
        opened_at:
          type: string
          description: Date and time when the account was opened (UTC format).
          example: '2017-10-11T22:33:26Z'
        locking_status:
          type: string
          description: >-
            Read-only booking block indicating whether funds can be transferred
            to/from the account. The default status is `NO_BLOCK`. Other status
            values indicate that funds may neither be credited to, nor debited
            from, the account. Only authorized Solaris employees can change the
            status of this value. Attempting to perform an action not compliant
            with the current blocking status (e.g., initiating a transaction to
            or from a blocked account) will cause either a return of the
            transaction or an exception.
          enum:
            - NO_BLOCK
            - CREDIT_BLOCK
            - DEBIT_BLOCK
            - BLOCK
        locking_reasons:
          $ref: '#/components/schemas/Solaris-Enums-LockingReason'
        account_limit:
          type: object
          description: >-
            The allowed amount of negative balance on the account. This is
            included into the calculation of the `available_balance`.
          properties:
            value:
              type: integer
              example: 100000
            unit:
              type: string
              example: cents
            currency:
              type: string
              example: EUR
        person_id:
          type: string
          description: ID of the person for whom the account was created.
          example: bb66a0161a0a4066abfe133412f6236dcper
        business_id:
          type: string
          description: >-
            ID of the business for whom the account was created. Only filled if
            the account owner is a legal entity.
          example: a9a25dc10aa74244bd0bb75d1ce6b3b5cbiz
        status:
          type: string
        closure_reason:
          description: The reason for the account closure.
          allOf:
            - $ref: '#/components/schemas/closure_reason_enum'
        overdraft:
          $ref: '#/components/schemas/overdraft-2'
        closed_at:
          type: string
          description: Date and time when the account was closed (UTC format).
          example: '2022-01-01T12:11:16Z'
  requestBodies:
    AccountOpeningRequest_Create:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AccountOpeningRequest_Create_Request'
