openapi: 3.0.0
info:
  version: '1.0'
  title: Fronting
servers:
  - url: https://api.solaris-sandbox.de
    description: Sandbox
  - url: https://api.solarisbank.de
    description: Production
paths:
  /v1/consumers/persons/{person_id}/fronting_loan_applications:
    post:
      callbacks: {}
      deprecated: false
      description: >-
        Creates a consumer fronting loan application and assigns it to the
        person with the person_id specified in the request URL. The payload of
        this endpoint includes all the required financial information and
        account data about the customer, which the credit scorer uses to
        initiate a series of credit checks to determine the customer's credit
        risk and eligibility.
      operationId: FrontingLoansWeb.V1.Consumer.Application.CreateOperation
      parameters:
        - description: The person ID of the customer applying for a fronting loan.
          in: path
          name: person_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FrontingLoansWeb.Consumer.CreateApplicationRequest
        description: The application attributes
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FrontingLoansWeb.Consumer.GetApplicationResponse
          description: Application
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Unprocessable Entity
      security:
        - oauth2:
            - solaris_service_fronting_loan_consumer_application#create
      summary: Create consumer fronting loan application
      tags:
        - Consumer fronting
  /v1/consumers/persons/{person_id}/fronting_loan_applications/{application_id}:
    get:
      callbacks: {}
      deprecated: false
      description: >-
        Returns the current status and details of an existing consumer fronting
        loan application. Alternatively, you can subscribe to the webhook event
        CONSUMER_FRONTING_APPLICATION to receive status updates on the
        application.
      operationId: FrontingLoansWeb.V1.Consumer.Applications.ShowOperation
      parameters:
        - description: The person ID of the customer applying for a fronting loan.
          in: path
          name: person_id
          required: true
          schema:
            type: string
        - description: The unique ID of a consumer fronting loan application.
          in: path
          name: application_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FrontingLoansWeb.Consumer.GetApplicationResponse
          description: Application
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_consumer_application#find
      summary: Retrieve consumer fronting loan application
      tags:
        - Consumer fronting
  /v1/consumers/persons/{person_id}/fronting_loan_applications/{application_id}/account_snapshot:
    put:
      callbacks: {}
      deprecated: false
      description: >-
        Links a customer's account snapshot to their fronting loan application.
        You must include the account_snapshot_id in the payload of this
        endpoint. After the account snapshot is linked to the loan application,
        the application status transitions to scoring_pending.
      operationId: FrontingLoansWeb.V1.Consumer.Applications.LinkAccountSnapshotOperation
      parameters:
        - description: The person ID of the customer applying for a fronting loan.
          in: path
          name: person_id
          required: true
          schema:
            type: string
        - description: The unique ID of a consumer fronting loan application.
          in: path
          name: application_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FrontingLoansWeb.LinkAccountSnapshotRequest'
        description: Account Snapshot link
        required: false
      responses:
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
          description: Conflict
      security:
        - oauth2:
            - >-
              solaris_service_fronting_loan_consumer_application#link_account_snapshot
      summary: Link an account snapshot to a consumer fronting loan application
      tags:
        - Consumer fronting
  /v1/consumers/persons/{person_id}/fronting_loan_applications/{application_id}/identification:
    put:
      callbacks: {}
      deprecated: false
      description: >-
        Links the identification origination resource created for a customer to
        their fronting loan application. You must add the person_id and the
        application_id in the request URL and add the
        identification_origination_id in the request body.
      operationId: FrontingLoansWeb.V1.Consumer.Applications.LinkIdentificationOperation
      parameters:
        - description: The person ID of the customer applying for a fronting loan.
          in: path
          name: person_id
          required: true
          schema:
            type: string
        - description: The unique ID of a consumer fronting loan application.
          in: path
          name: application_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FrontingLoansWeb.Applications.LinkIdentificationRequest
        description: Put request
        required: false
      responses:
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
          description: Conflict
      security:
        - oauth2:
            - >-
              solaris_service_fronting_loan_consumer_application#link_identification
      summary: >-
        Link a customer identification origination to a consumer fronting loan
        application
      tags:
        - Consumer fronting
  /v1/consumers/persons/{person_id}/fronting_loan_applications/{application_id}/payout:
    post:
      callbacks: {}
      deprecated: false
      description: >-
        Triggers the loan payout process to the respective customer. You must
        add the settlement_account_iban in the request body, which is a Solaris
        account, from which the loan amount is transferred to the customer's
        account.
      operationId: FrontingLoansWeb.V1.Consumer.Applications.PayoutOperation
      parameters:
        - description: The person ID of the customer applying for a fronting loan.
          in: path
          name: person_id
          required: true
          schema:
            type: string
        - description: The unique ID of a consumer fronting loan application.
          in: path
          name: application_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FrontingLoansWeb.Consumer.PayoutRequest'
        description: Attributes required for a payout request
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontingLoansWeb.Consumer.GetLoanResponse'
          description: Loan
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_consumer_application#payout
      summary: Trigger loan payout for a consumer fronting loan application
      tags:
        - Consumer fronting
  /v1/consumers/persons/{person_id}/fronting_loans/{loan_id}:
    get:
      callbacks: {}
      deprecated: false
      description: >-
        Returns all the details and status of an existing consumer fronting loan
        assigned to the person with the given person_id in the request URL.
      operationId: FrontingLoansWeb.V1.Consumer.Loans.ShowOperation
      parameters:
        - description: The person ID of the customer who has the fronting loan.
          in: path
          name: person_id
          required: true
          schema:
            type: string
        - description: >-
            The unique ID of a fronting loan associated with a specific
            customer.
          in: path
          name: loan_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontingLoansWeb.Consumer.GetLoanResponse'
          description: Loan
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_person_loan#find
      summary: Retrieve consumer fronting loan
      tags:
        - Consumer fronting
  /v1/consumers/persons/{person_id}/fronting_loan_applications/{application_id}/recipient_account:
    patch:
      callbacks: {}
      deprecated: false
      operationId: >-
        FrontingLoansWeb.V1.Consumer.Applications.UpdateRecipientAccountOperation
      parameters:
        - description: Person ID
          in: path
          name: person_id
          required: true
          schema:
            type: string
        - description: Application ID
          in: path
          name: application_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FrontingLoansWeb.Consumer.UpdateRecipientAccountRequest
        description: Attributes required for a payout request
        required: false
      responses:
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Conflict
      security:
        - oauth2:
            - >-
              solaris_service_fronting_loan_consumer_application_recipient_account#update
      summary: Update a consumer fronting loan applications
      tags:
        - Consumer fronting
  /v1/businesses/{business_id}/fronting_loan_applications:
    post:
      callbacks: {}
      deprecated: false
      description: >-
        Creates a fronting loan or fronting factoring application and assigns it
        to the business with the `business_id` specified in the request URL. The
        payload of this endpoint includes all the required financial information
        and account data about the business, which the credit scorer uses to
        initiate a series of credit checks to determine the business's credit
        risk and eligibility.
      operationId: FrontingLoansWeb.V1.Business.Applications.CreateOperation
      parameters:
        - description: >-
            The ID of the business applying for a fronting loan or fronting
            factoring.
          in: path
          name: business_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FrontingLoansWeb.Business.CreateApplicationRequest
        description: The application attributes
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FrontingLoansWeb.Business.GetApplicationResponse
          description: Application
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Unprocessable Entity
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_application#create
      summary: Create business fronting loan or fronting factoring application
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loan_applications/{application_id}:
    get:
      callbacks: {}
      deprecated: false
      description: >-
        Returns the current status and details of an existing business fronting
        loan or fronting factoring application. Additionally, subscribe to the
        webhook event `BUSINESS_FRONTING_APPLICATION` to receive status updates
        on the application.
      operationId: FrontingLoansWeb.V1.Business.Applications.ShowOperation
      parameters:
        - description: >-
            The ID of the business whose fronting loan or fronting factoring
            application you want to retrieve.
          in: path
          name: business_id
          required: true
          schema:
            type: string
        - description: >-
            The ID of the business fronting loan or fronting factoring
            application you want to retrieve.
          in: path
          name: application_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FrontingLoansWeb.Business.GetApplicationResponse
          description: Application
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_application#find
      summary: Retrieve business fronting loan or fronting factoring application
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loan_applications/{application_id}/documents:
    put:
      callbacks: {}
      deprecated: false
      description: >-
        Links a document resource to a business fronting loan or fronting
        factoring application. Use this endpoint to upload the required
        documents for a fronting loan or fronting factoring, such as signed
        contracts, credit risk reports, or invoices.  You must add the
        `document_id` and `document_type` in the request body. Note that you
        must make a separate API call for each document.
      operationId: FrontingLoansWeb.V1.Business.Applications.LinkDocumentOperation
      parameters:
        - description: >-
            The ID of the business applying for a fronting loan or fronting
            factoring.
          in: path
          name: business_id
          required: true
          schema:
            type: string
        - description: >-
            The ID of the business fronting loan or fronting factoring
            application.
          in: path
          name: application_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FrontingLoansWeb.Business.LinkDocumentRequest
        description: The application attributes
        required: false
      responses:
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_application#link_document
      summary: >-
        Link a document to a business fronting loan or fronting factoring
        application
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loan_applications/{application_id}/identification:
    put:
      callbacks: {}
      deprecated: false
      description: >-
        Links a business identification resource to their fronting loan or
        fronting factoring application. Afterward, the business must complete
        the BKYC process successfully to move forward with the application. You
        must add the `identification_id` in the request body.
      operationId: FrontingLoansWeb.V1.Business.Applications.LinkIdentificationOperation
      parameters:
        - description: >-
            The ID of the business applying for a fronting loan or fronting
            factoring.
          in: path
          name: business_id
          required: true
          schema:
            type: string
        - description: >-
            The ID of the business fronting loan or fronting factoring
            application.
          in: path
          name: application_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FrontingLoansWeb.Business.LinkIdentificationRequest
        description: Attributes required for linking a document to an application
        required: false
      responses:
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
          description: Conflict
      security:
        - oauth2:
            - >-
              solaris_service_fronting_loan_business_application#link_identification
      summary: >-
        Link an identification resource to a business fronting loan or fronting
        factoring application
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loan_applications/{application_id}/loan:
    put:
      callbacks: {}
      deprecated: false
      description: >-
        Triggers the loan creation process for the respective business
        application, without triggering the loan payout itself. You must add the
        `settlement_account_iban` in the request body, which is a Solaris
        account, from which the loan amount is transferred to the business's
        account.
      operationId: FrontingLoansWeb.V1.Business.Applications.LoanCreateOperation
      parameters:
        - description: >-
            The ID of the business applying for a fronting loan or fronting
            factoring.
          in: path
          name: business_id
          required: true
          schema:
            type: string
        - description: >-
            The ID of the business fronting loan or fronting factoring
            application.
          in: path
          name: application_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FrontingLoansWeb.Business.LoanCreateRequest'
        description: Attributes required for a loan creation request
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontingLoansWeb.Business.GetLoanResponse'
          description: Loan
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
          description: Conflict
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_application_loan#create
      summary: >-
        Triggers the creation of a loan for a business fronting loan or fronting
        factoring application
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loan_applications/{application_id}/payout:
    post:
      callbacks: {}
      deprecated: false
      description: >-
        Triggers the loan payout process to the respective business account. You
        must add the `settlement_account_iban` in the request body, which is a
        Solaris account, from which the loan amount is transferred to the
        business's account.
      operationId: FrontingLoansWeb.V1.Business.Applications.PayoutOperation
      parameters:
        - description: The ID of the business applying for a fronting loan.
          in: path
          name: business_id
          required: true
          schema:
            type: string
        - description: The ID of the business fronting loan application.
          in: path
          name: application_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FrontingLoansWeb.Business.PayoutRequest'
        description: Attributes required for a payout request
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontingLoansWeb.Business.GetLoanResponse'
          description: Loan
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_application#payout
      summary: Trigger the loan payout for a business fronting loan application
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loans/{loan_id}/payouts:
    post:
      callbacks: {}
      deprecated: false
      description: >-
        Triggers a partial loan payout related to a business fronting factoring
        application. The loan payout is used to purchase receivables in multiple
        partial payouts. You must add the required transaction details in the
        request body.
      operationId: FrontingLoansWeb.V1.Business.Loans.Payouts.CreateOperation
      parameters:
        - description: The ID of the business that applied for the fronting factoring.
          in: path
          name: business_id
          required: true
          schema:
            type: string
        - description: The ID of the loan for which a partial payout is made.
          in: path
          name: loan_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FrontingLoansWeb.Business.Loans.Payouts.CreateRequest
        description: Attributes required for a payout
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FrontingLoansWeb.Business.Loans.Payouts.GetResponse
          description: Payout
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_loan_payout#create
      summary: >-
        (Factoring only) Trigger a partial loan payout for a business fronting
        factoring
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loans/{loan_id}/payouts/{payout_id}:
    get:
      callbacks: {}
      deprecated: false
      description: >-
        Returns the details of a loan's payout related to a fronting loan or
        fronting factoring, assigned to the business with the business_id and
        loan_id specified in the request URL. Additionally, subscribe to the
        webhook event BUSINESS_FRONTING_PAYOUT_UPDATE to receive status updates
        about the payout.
      operationId: FrontingLoansWeb.V1.Business.Loans.Payouts.ShowOperation
      parameters:
        - description: The ID of the business whose loan payout you want to retrieve.
          in: path
          name: business_id
          required: true
          schema:
            type: string
        - description: The ID of the loan whose payout you want to retrieve.
          in: path
          name: loan_id
          required: true
          schema:
            type: string
        - description: The ID of the loan's payout you want to retrieve.
          in: path
          name: payout_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FrontingLoansWeb.Business.Loans.Payouts.GetResponse
          description: Payout
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_loan_payout#find
      summary: Retrieve business fronting loan's payout
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loans/{loan_id}:
    get:
      callbacks: {}
      deprecated: false
      description: >-
        Returns all the details of an existing business fronting loan, assigned
        to the customer with the business_id specified in the request URL.
        Additionally, subscribe to the webhook event
        [BUSINESS_FRONTING_LOAN_PAYOUT](https://docs.solarisgroup.com/api-reference/webhooks/#business_fronting_loan_payout)
        to receive status updates about the loan.
      operationId: FrontingLoansWeb.V1.Business.Loans.ShowOperation
      parameters:
        - description: The ID of the business that has the fronting loan.
          in: path
          name: business_id
          required: true
          schema:
            type: string
        - description: The ID of a fronting loan associated with a specific business.
          in: path
          name: loan_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrontingLoansWeb.Business.GetLoanResponse'
          description: Loan
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_loan#find
      summary: Retrieve business fronting loan
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loans/{loan_id}/terminate:
    post:
      callbacks: {}
      deprecated: false
      description: 'Terminates a business fronting loan. '
      operationId: FrontingLoansWeb.V1.Business.Loans.TerminateOperation
      parameters:
        - description: The ID of the business whose loan you want to terminate.
          in: path
          name: business_id
          required: true
          schema:
            type: string
        - description: The ID of the loan that you want to terminate.
          in: path
          name: loan_id
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Conflict
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_loan#terminate
      summary: Terminate a business fronting loan
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loans_business_relationship:
    get:
      callbacks: {}
      deprecated: false
      description: >-
        Returns the details of an existing business relationship with the
        customer with the `business_id` specified in the request URL.
        Additionally, subscribe to the webhook event
        BUSINESS_FRONTING_RELATIONSHIP_STATUS_CHANGED to receive status updates
        about changes to the business relationship.
      operationId: FrontingLoansWeb.V1.Business.Relationship.ShowOperation
      parameters:
        - description: The ID of the business.
          in: path
          name: business_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FrontingLoansWeb.Business.GetRelationshipResponse
          description: Business relationship
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_relationship#find
      summary: Retrieve the details of the business relationship with a customer
      tags:
        - Business fronting
  /v1/businesses/{business_id}/fronting_loans_business_relationship/close:
    post:
      callbacks: {}
      deprecated: false
      description: >-
        Terminates the business relationship with the customer with the
        `business_id` specified in the request URL and sets the `status_reason`
        to `offboarded_by_partner`. 
      operationId: FrontingLoansWeb.V1.Business.Relationship.CloseOperation
      parameters:
        - description: >-
            The ID of the business you want to terminate the business
            relationship with.
          in: path
          name: business_id
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Invalid request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
          description: Not Found
      security:
        - oauth2:
            - solaris_service_fronting_loan_business_relationship#close
      summary: Terminate the business relationship with a customer
      tags:
        - Business fronting
components:
  schemas:
    SolarisToolkit.Web.Money:
      example:
        currency: EUR
        unit: cents
        value: 1000
      properties:
        currency:
          description: The currency of the given value. Only EURO is currently supported.
          type: string
        unit:
          description: The unit of the given value.
          enum:
            - cents
          type: string
        value:
          description: The amount value
          type: integer
      required:
        - value
        - currency
        - unit
      title: SolarisToolkit.Web.Money
      type: object
    FrontingLoansWeb.Consumer.CreateApplicationRequest:
      properties:
        agio:
          default: 0
          description: The credit commission amount.
          example: 0
          format: float
          type: number
        credit_record_id:
          description: The unique ID of a customer's credit record.
          example: fbb7d15fa4c54ba0b077592665ef04a4ccrd
          nullable: true
          type: string
        debt_burden_ratio:
          description: >-
            The ratio of the customer's total monthly outgoing payments
            (including installments towards loans and credit cards) to their
            total income. (0.0 means 0%, 100.0 means 100%, 1.0 means 1%)
          format: float
          nullable: true
          type: number
        effective_interest_rate:
          description: The effective annual interest rate to apply to the fronting loan.
          example: 0.04
          format: float
          nullable: true
          type: number
        employment_since:
          description: The date when the customer started their current employment.
          example: '2019-08-24'
          format: date
          nullable: true
          type: string
        employment_until:
          description: The date when the customer ended an employment.
          format: date
          nullable: true
          type: string
        existing_credit_repayment_excluding_mortgage:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: >-
            The amount of existing credit repayment the customer pays excluding
            mortgage.
        is_joint_application:
          description: >-
            A field to indicate whether the application is a joint application
            or not.
          nullable: true
          type: boolean
        living_situation:
          description: The customer's living situation.
          enum:
            - LIVING_WITH_PARENTS
            - LIVING_IN_RENTED_HOUSE
            - LIVING_IN_OWN_HOUSE
          example: LIVING_IN_RENTED_HOUSE
          type: string
        living_situation_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: >-
            The amount of the customer's living expenses, e.g., rent, mortgage,
            etc.
        loan_purpose:
          description: The purpose of the loan.
          example: Buying a car
          maxLength: 255
          type: string
        moved_in_last_two_years:
          description: >-
            Field to indicate whether the customer has moved and changed
            addresses in the last two years.
          nullable: true
          type: boolean
        net_income_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The customer's net income amount.
        number_of_kids:
          description: The number of kids the customer has.
          example: 1
          type: integer
        partner_reference_number:
          description: Your internal reference number for the customer.
          maxLength: 255
          nullable: true
          type: string
        partner_score:
          description: The score assigned to the customer by your internal scoring flow.
          maxLength: 255
          nullable: true
          type: string
        partner_snapshot_allowed:
          description: >-
            A field to indicate whether it's allowed for you to create an
            account snapshot for the customer or not.
          type: boolean
        payout_date:
          description: The date when the loan was paid out to the customer.
          example: '2021-08-24'
          format: date
          nullable: true
          type: string
        private_insurance_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The amount of the private insurance the customer pays monthly.
        probability_of_default:
          description: >-
            The percentage of the customer's probability of default as scored by
            your internal scoring system. (0.0 means 0%, 100.0 means 100%, 1.0
            means 1%)
          format: float
          nullable: true
          type: number
        recipient_iban:
          description: The IBAN of the loan's recipient to which the loan will be paid out.
          example: DE92370601930002130041
          nullable: true
          type: string
        recipient_name:
          description: The name of the loan recipient.
          example: Max Mustermann
          maxLength: 255
          nullable: true
          type: string
        repayment_day_of_month:
          description: The day of the month when the customer pays the loan installment.
          example: 1
          type: integer
        requested_interest_rate:
          description: The requested interest rate to apply to the fronting loan.
          example: 0.02
          format: float
          type: number
        requested_loan_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The loan amount requested by the customer.
        requested_loan_term:
          description: >-
            The number of months over which the loan will be repaid, as
            requested by the customer.
          example: 24
          type: integer
        total_interest_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The total interest amount applied to the loan.
          nullable: true
          title: SolarisToolkit.Web.Money.Optional
          type: object
        total_principle_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The total principal amount of the loan.
          nullable: true
          title: SolarisToolkit.Web.Money.Optional
          type: object
        total_repaid_loan_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The total amount the customer repaid from the loan.
          nullable: true
          title: SolarisToolkit.Web.Money.Optional
          type: object
        transaction_description:
          description: >-
            The transaction reference, which the recipient will see. Only use
            characters allowed by SEPA in this field.
          maxLength: 70
          type: string
        transaction_end_to_end_id:
          description: >-
            SEPA identifier (provided by the end customer who initiated the SEPA
            transaction), routed through the whole payment process. (Max 35
            characters without whitespace)
          example: '123322332'
          pattern: ^([A-Za-z0-9]|[+\?/\-:\(\)\.,']){0,35}$
          type: string
      required:
        - number_of_kids
        - living_situation
        - living_situation_amount
        - loan_purpose
        - net_income_amount
        - private_insurance_amount
        - repayment_day_of_month
        - requested_loan_term
        - requested_loan_amount
        - requested_interest_rate
        - existing_credit_repayment_excluding_mortgage
        - transaction_description
        - partner_snapshot_allowed
      title: FrontingLoansWeb.Consumer.CreateApplicationRequest
      type: object
    FrontingLoansWeb.Consumer.GetApplicationResponse:
      properties:
        account_snapshot_id:
          description: The unique ID of a customer's account snapshot.
          example: 2a9fbb2fc5be45f7b8ca782c45715576snap
          nullable: true
          type: string
        agio:
          description: The credit commission amount.
          example: 0
          format: float
          type: number
        credit_record_id:
          description: The unique ID of a customer's credit record.
          example: fbb7d15fa4c54ba0b077592665ef04a4ccrd
          nullable: true
          type: string
        debt_burden_ratio:
          description: >-
            The ratio of the customer's total monthly outgoing payments
            (including installments towards loans and credit cards) to their
            total income.
          format: float
          nullable: true
          type: number
        decision:
          description: Solaris' decision on the consumer fronting loan application.
          type: string
        effective_interest_rate:
          description: The effective annual interest rate to apply to the fronting loan.
          example: 0.04
          nullable: true
          type: number
        id:
          description: The unique ID of a consumer fronting loan application.
          example: 504f3c3659e14079a6941fe5b7a75eaacfla
          type: string
        identification_origination_id:
          description: >-
            The unique ID of the identification origination resource created for
            a customer in the scope of a fronting loan application.
          example: ccf79efa8b5c4a5594d43b73e58acfb3io
          nullable: true
          type: string
        loan_purpose:
          description: The purpose of the loan.
          example: Buying a car
          type: string
        net_income_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The customer's net income amount.
          nullable: true
          title: SolarisToolkit.Web.Money.Optional
          type: object
        partner_id:
          description: The unique partner ID on Solaris' system.
          type: string
        partner_reference_number:
          description: Your internal reference number for the customer.
          nullable: true
          type: string
        partner_score:
          description: The score assigned to the customer by your internal scoring flow.
          nullable: true
          type: string
        partner_snapshot_allowed:
          description: >-
            A field to indicate whether it's allowed for the partner to create
            an account snapshot for the customer or not.
          example: true
          type: boolean
        payout_date:
          description: The date when the loan was paid out to the customer.
          format: date
          nullable: true
          type: string
        person_id:
          description: The person ID of the customer applying for a fronting loan.
          example: dc1a6812a14f6cc338cd084208535bcdcper
          type: string
        probability_of_default:
          description: >-
            The percentage of the customer's probability of default as scored by
            your internal scoring system. (0.0 means 0%, 100.0 means 100%, 1.0
            means 1%)
          format: float
          nullable: true
          type: number
        recipient_iban:
          description: The IBAN of the loan's recipient to which the loan will be paid out.
          example: DE92370601930002130041
          nullable: true
          type: string
        recipient_name:
          description: The name of the loan recipient.
          example: Max Mustermann
          nullable: true
          type: string
        requested_interest_rate:
          description: The requested interest rate to apply to the fronting loan.
          example: 0.02
          nullable: true
          type: number
        requested_loan_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The loan amount requested by the customer.
        requested_loan_term:
          description: >-
            The number of months over which the loan will be repaid, as
            requested by the customer.
          example: 24
          nullable: true
          type: integer
        status:
          description: The status of the consumer fronting loan application.
          enum:
            - account_snapshot_pending
            - scoring_pending
            - offered
            - identification_trigger_pending
            - identification_pending
            - accepted
            - rejected
            - expired
            - loan_created
            - binding_offer_scoring_pending
          example: identification_pending
          type: string
        total_interest_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The total interest amount.
          nullable: true
          title: SolarisToolkit.Web.Money.Optional
          type: object
        total_principle_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The total principal amount of the loan.
          nullable: true
          title: SolarisToolkit.Web.Money.Optional
          type: object
        total_repaid_loan_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The total amount the customer repaid from the loan.
          nullable: true
          title: SolarisToolkit.Web.Money.Optional
          type: object
        transaction_description:
          description: >-
            The transaction reference, which the recipient will see. Only use
            characters allowed by SEPA in this field.
          type: string
        transaction_end_to_end_id:
          description: >-
            SEPA identifier (provided by the end customer who initiated the SEPA
            transaction), routed through the whole payment process. (Max 35
            characters without whitespace)
          example: '123322332'
          nullable: true
          type: string
      required:
        - id
        - person_id
        - partner_id
        - status
        - loan_purpose
        - requested_loan_amount
        - transaction_description
        - partner_snapshot_allowed
        - agio
      title: FrontingLoansWeb.Consumer.GetApplicationResponse
      type: object
    Error400:
      properties:
        code:
          example: build_pagination_headers_failure
          type: string
        detail:
          example: Cannot connect to database.
          type: string
        id:
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
          type: string
        status:
          example: '400'
          type: string
        title:
          example: Failed to build pagination headers.
          type: string
      title: Error400
      type: object
    Error403:
      properties:
        code:
          example: unauthorized_action
          type: string
        detail:
          example: Unauthorized action is not allowed.
          type: string
        id:
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
          type: string
        status:
          example: '403'
          type: string
        title:
          example: Unauthorized Action
          type: string
      title: Error403
      type: object
    Error404:
      properties:
        code:
          example: model_not_found
          type: string
        detail:
          example: Couldn't find 'Account' for id 'DE24112233445566'.
          type: string
        id:
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
          type: string
        status:
          example: '404'
          type: string
        title:
          example: Model Not Found
          type: string
      title: Error404
      type: object
    Error409:
      properties:
        code:
          example: record_not_unique
          type: string
        detail:
          example: Could not save `terms_and_conditions_event`.
          type: string
        id:
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
          type: string
        status:
          example: '409'
          type: string
        title:
          example: Record Not Unique
          type: string
      title: Error409
      type: object
    SolarisToolkit.Web.Json.Error:
      properties:
        backtrace:
          description: Optional array of backtrace lines
          items:
            type: string
          nullable: true
          type: array
        code:
          description: some_computer_friendly_string
          type: string
        detail:
          description: 'Some human friendly-ish detail: field is required'
          type: string
        id:
          description: A UUID, preferably the request ID
          type: string
        source:
          description: Optional computer-friendly error source description
          example:
            field: name
            message: is_required
          nullable: true
          properties:
            field:
              type: string
            message:
              type: string
          required:
            - field
            - message
          type: object
        status:
          description: The HTTP status
          type: integer
        title:
          description: Some short human friendly string
          type: string
      required:
        - id
        - status
        - code
        - title
        - detail
      title: SolarisToolkit.Web.Json.Error
      type: object
    SolarisToolkit.Web.Json.ErrorBody:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/SolarisToolkit.Web.Json.Error'
          type: array
      required:
        - errors
      title: SolarisToolkit.Web.Json.ErrorBody
      type: object
    FrontingLoansWeb.LinkAccountSnapshotRequest:
      description: The account snapshot details to attach to the application.
      properties:
        account_snapshot_id:
          description: The unique ID of a customer's account snapshot.
          example: 6c8f81a234df4052a9cde197577347b7snap
          type: string
      required:
        - account_snapshot_id
      title: FrontingLoansWeb.LinkAccountSnapshotRequest
      type: object
    FrontingLoansWeb.Applications.LinkIdentificationRequest:
      description: Attach Identification ids to the application.
      properties:
        identification_origination_id:
          description: >-
            The unique ID of an identification origination resource created for
            a customer in the scope of a loan application.
          example: 589e12da53154010ad180894acbe07ebio
          type: string
      required:
        - identification_origination_id
      title: FrontingLoansWeb.Applications.LinkIdentificationRequest
      type: object
    FrontingLoansWeb.Consumer.PayoutRequest:
      properties:
        settlement_account_iban:
          description: >-
            The Solaris settlement account from which the loan amount is
            transferred to the customer's account.
          example: DE07110101014503906016
          type: string
      required:
        - settlement_account_iban
      title: FrontingLoansWeb.Consumer.PayoutRequest
      type: object
    FrontingLoansWeb.Consumer.GetLoanResponse:
      properties:
        agio:
          description: The credit commission amount.
          example: 0
          format: float
          type: number
        amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The loan amount.
        application_id:
          description: The unique ID of a consumer fronting loan application.
          example: 504f3c3659e14079a6941fe5b7a75eaacfla
          type: string
        collateral_account_iban:
          description: >-
            Your Solaris prefund account from which the full loan amount (agio +
            net loan amount) must be transferred to Solaris' settlement account.
          example: DE85110101014480677574
          type: string
        collection_account_iban:
          description: Your account to which the agio is transferred.
          example: DE87110101001000057123
          type: string
        duration:
          description: The number of months over which the loan will be repaid.
          example: 12
          type: integer
        id:
          description: >-
            The unique ID of the fronting loan, generated after a loan is
            created for the customer.
          example: 620b95f7987243d398c2621c889a2039cflo
          type: string
        recipient_iban:
          description: The IBAN of the loan's recipient to which the loan will be paid out.
          example: DE92370601930002130041
          type: string
        recipient_name:
          description: The name of the loan recipient.
          example: Max Mustermann
          type: string
        requested_interest_rate:
          description: The interest rate to apply to the fronting loan.
          example: 0.04
          format: float
          type: number
        settlement_account_iban:
          description: >-
            The Solaris settlement account from which the loan amount is
            transferred to the customer's account.
          example: DE07110101014503906016
          type: string
        status:
          description: The status of the consumer fronting loan.
          enum:
            - payout_issued
            - payout_pending
          example: payout_issued
          type: string
      required:
        - id
        - application_id
        - agio
        - duration
        - recipient_iban
        - recipient_name
        - requested_interest_rate
        - amount
        - collateral_account_iban
        - collection_account_iban
        - settlement_account_iban
        - status
      title: FrontingLoansWeb.Consumer.GetLoanResponse
      type: object
    FrontingLoansWeb.Consumer.UpdateRecipientAccountRequest:
      properties:
        recipient_iban:
          type: string
        recipient_name:
          type: string
      required:
        - recipient_iban
        - recipient_name
      title: FrontingLoansWeb.Consumer.UpdateRecipientAccountRequest
      type: object
    FrontingLoansWeb.Business.CreateApplicationRequest:
      properties:
        agio:
          default: 0
          description: The credit commission amount.
          example: 0
          format: float
          type: number
        creditreform_pd:
          description: >-
            The business's probability of default as scored by any credit risk
            service provider, e.g., Creditreform.
          example: '0.10'
          maxLength: 255
          type: string
        creditreform_score:
          description: >-
            The business's credit score as scored by any credit risk service
            provider, e.g., Creditreform.
          example: 2
          type: integer
        duration:
          description: The number of months over which the loan will be repaid.
          example: 24
          type: integer
        effective_interest_rate:
          description: The effective annual interest rate applied to the loan.
          example: 0.309
          format: float
          type: number
        factoring_fee:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: Factoring fee
          nullable: true
          type: object
        minimum_credit_risk_criteria:
          additionalProperties: true
          description: Minimum credit risk criteria fields for scorer
          nullable: true
          type: object
        nominal_interest_rate:
          description: The nominal interest rate applied to the loan.
          example: 0.299
          format: float
          type: number
        partner_contact_name:
          description: Your internal contact name for the business.
          example: Daniel Schmidt
          maxLength: 255
          type: string
        partner_contact_number:
          description: Your internal contact number for the business.
          example: '+49345195891'
          maxLength: 255
          type: string
        partner_reference_number:
          description: >-
            our internal reference number for the business. Acts as an
            idempotency key.
          example: tf2df3ceac0e384352b78cb6987d1d987
          maxLength: 255
          type: string
        partner_score:
          description: The score assigned to the business by your internal scoring flow.
          example: AA
          maxLength: 255
          type: string
        purpose:
          description: The purpose of the loan.
          example: Buying office equipment, factoring of receivables, etc.
          maxLength: 255
          type: string
        purpose_description:
          description: Additional information about the purpose of the loan.
          maxLength: 255
          type: string
        recipient_iban:
          description: >-
            The IBAN of the loan's recipient, to which the loan will be paid
            out.
          example: DE92370601930002130041
          maxLength: 255
          type: string
        recipient_name:
          description: The name of the loan recipient.
          example: Max Mustermann
          maxLength: 255
          type: string
        requested_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The requested loan amount.
        transaction_description:
          description: >-
            The transaction reference, which the recipient will see. Only use
            characters allowed by SEPA in this field.
          example: Example transaction.
          maxLength: 70
          type: string
        transaction_end_to_end_id:
          description: >-
            SEPA identifier (provided by the end customer who initiated the SEPA
            transaction), routed through the whole payment process. (Max 35
            characters without whitespace)
          example: DDHHDHG333243
          pattern: ^([A-Za-z0-9]|[+\?/\-:\(\)\.,']){0,35}$
          type: string
      required:
        - requested_amount
      title: FrontingLoansWeb.Business.CreateApplicationRequest
      type: object
    FrontingLoansWeb.Business.GetApplicationResponse:
      properties:
        agio:
          description: The credit commission amount.
          example: 0
          format: float
          nullable: true
          type: number
        creditreform_pd:
          description: >-
            The business's probability of default as scored by any credit risk
            service provider, e.g., Creditreform.
          nullable: true
          type: string
          example: '0.10'
        creditreform_score:
          description: >-
            The business's credit score as scored by any credit risk service
            provider, e.g., Creditreform.
          nullable: true
          type: integer
          example: 2
        duration:
          description: The number of months over which the loan will be repaid.
          example: 24
          nullable: true
          type: integer
        effective_interest_rate:
          description: The effective annual interest rate applied to the loan.
          example: 0.309
          format: float
          nullable: true
          type: number
        id:
          description: The unique ID of the business fronting loan application.
          example: 89d4eaaa73ec4a73a0b9d40fb5d9da9cbfla
          type: string
        identification_id:
          description: >-
            The unique ID of the identification resource created for the
            business.
          nullable: true
          type: string
          example: 1063504cf74919f60ae4c806bdc9ce75bid
        minimum_credit_risk_criteria:
          additionalProperties: true
          description: Minimum credit risk criteria fields for scorer
          nullable: true
          type: object
        nominal_interest_rate:
          description: The nominal interest rate applied to the loan.
          example: 0.299
          format: float
          nullable: true
          type: number
        partner_contact_name:
          description: Your internal contact name for the business.
          nullable: true
          type: string
          example: Daniel Schmidt
        partner_contact_number:
          description: Your internal contact number for the business.
          nullable: true
          type: string
          example: '+49345195891'
        partner_reference_number:
          description: >-
            Your internal reference number for the business. Acts as an
            idempotency key.
          type: string
          example: tf2df3ceac0e384352b78cb6987d1d987
        partner_score:
          description: The score assigned to the business by your internal scoring flow.
          type: string
          example: AA
        purpose:
          description: The purpose of the loan.
          type: string
          example: Buying office equipment, factoring of receivables, etc.
        purpose_description:
          description: >-
            Additional information about the purpose of the loan. In case of
            factoring, include the invoice number and reference in this field.
          nullable: true
          type: string
          example: Buying office equipment for new headquarters.
        recipient_iban:
          description: >-
            The IBAN of the loan's recipient, to which the loan will be paid
            out.
          example: DE92370601930002130041
          type: string
        recipient_name:
          description: The name of the loan recipient.
          example: Daniel Schmidt
          type: string
        requested_amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The requested loan amount.
        status:
          description: The status of the business fronting loan application.
          enum:
            - scoring_pending
            - risk_report_pending
            - pending
            - identification_pending
            - cdd_pending
            - approved
            - rejected
            - loan_created
          example: approved
          type: string
        transaction_description:
          description: >-
            The transaction reference, which the recipient will see. Only use
            characters allowed by SEPA in this field.
          nullable: true
          type: string
          example: Example transaction
        transaction_end_to_end_id:
          description: >-
            SEPA identifier (provided by the end customer who initiated the SEPA
            transaction), routed through the whole payment process. (Max 35
            characters without whitespace)
          nullable: true
          type: string
          example: DDHHDHG333243
      required:
        - id
        - status
        - creditreform_pd
        - creditreform_score
        - partner_reference_number
        - partner_score
        - purpose
        - recipient_iban
        - recipient_name
        - requested_amount
      title: FrontingLoansWeb.Business.GetApplicationResponse
      type: object
    FrontingLoansWeb.Business.LinkDocumentRequest:
      properties:
        document_id:
          description: The unique ID of the document resource.
          example: 69ec2a9d8dbaf5ea1b13124098a34ea3cdoc
          type: string
        document_type:
          description: The type of the document.
          example: SIGNED_CONTRACT
          type: string
      required:
        - document_id
        - document_type
      title: FrontingLoansWeb.Business.LinkDocumentRequest
      type: object
    FrontingLoansWeb.Business.LinkIdentificationRequest:
      properties:
        identification_id:
          description: >-
            The unique ID of the identification resource created for the
            business.
          example: 1063504cf74919f60ae4c806bdc9ce75bid
          type: string
      required:
        - identification_id
      title: FrontingLoansWeb.Business.LinkIdentificationRequest
      type: object
    FrontingLoansWeb.Business.LoanCreateRequest:
      properties:
        settlement_account_iban:
          description: >-
            The Solaris settlement account from which the loan amount is
            transferred to the business's account.
          example: DE07110101014503906016
          type: string
      required:
        - settlement_account_iban
      title: FrontingLoansWeb.Business.LoanCreateRequest
      type: object
    FrontingLoansWeb.Business.GetLoanResponse:
      properties:
        agio:
          description: The credit commission amount.
          example: 0
          format: float
          type: number
        amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The loan amount.
        application_id:
          description: The unique ID of the business fronting loan application.
          example: 89d4eaaa73ec4a73a0b9d40fb5d9da9cbfla
          type: string
        collateral_account_iban:
          description: >-
            Your Solaris prefund account from which the full loan amount (agio +
            net loan amount) must be transferred to Solaris' settlement account.
          example: DE85110101014480677574
          type: string
        collection_account_iban:
          description: Your account to which the agio is transferred.
          example: DE87110101001000057123
          type: string
        duration:
          description: The number of months over which the loan will be repaid.
          example: 24
          type: integer
        effective_interest_rate:
          description: The effective annual interest rate applied to the loan.
          example: 0.309
          format: float
          type: number
        id:
          description: The unique ID of a business fronting loan.
          example: 13651d2f3a274e768ec6d45b036e0f14bflo
          type: string
        nominal_interest_rate:
          description: The nominal interest rate applied to the loan.
          example: 0.299
          format: float
          type: number
        recipient_iban:
          description: >-
            The IBAN of the loan's recipient, to which the loan will be paid
            out.
          example: DE92370601930002130041
          type: string
        recipient_name:
          description: The name of the loan recipient.
          example: Max Mustermann
          type: string
        settlement_account_iban:
          description: >-
            The Solaris settlement account from which the loan amount is
            transferred to the business's account.
          example: DE07110101014503906016
          type: string
        status:
          description: The status of the business fronting loan.
          enum:
            - payout_pending
            - payout_issued
          example: payout_issued
          nullable: false
          type: string
        status_reason:
          description: The status reason of the business fronting loan.
          enum:
            - closed
            - terminated
          example: closed
          nullable: true
          type: string
      required:
        - id
        - application_id
        - agio
        - duration
        - recipient_iban
        - recipient_name
        - effective_interest_rate
        - nominal_interest_rate
        - amount
        - collateral_account_iban
        - collection_account_iban
        - settlement_account_iban
        - status
      title: FrontingLoansWeb.Business.GetLoanResponse
      type: object
    FrontingLoansWeb.Business.PayoutRequest:
      properties:
        settlement_account_iban:
          description: >-
            The Solaris settlement account from which the loan amount is
            transferred to the business's account.
          example: DE07110101014503906016
          type: string
      required:
        - settlement_account_iban
      title: FrontingLoansWeb.Business.PayoutRequest
      type: object
    FrontingLoansWeb.Business.Loans.Payouts.CreateRequest:
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The amount of the partial loan payout.
        recipient_iban:
          description: The IBAN of the recipient of the loan payout.
          example: DE15100100100003404109
          type: string
        recipient_name:
          description: The name of the recipient of the loan payout.
          example: Daniel Schmidt
          type: string
        tag:
          default: INITIAL_PAYOUT
          description: >-
            The type of the partial loan payout related to a fronting factoring
            transaction.
          enum:
            - INITIAL_PAYOUT
            - RETENTION_FEE
            - FACTORING_INTEREST
            - VAT_TRANSFER
          type: string
          example: INITIAL_PAYOUT
        transaction_description:
          description: >-
            The transaction reference, which the recipient will see. Only use
            characters allowed by SEPA in this field.
          example: Example transaction.
          type: string
        transaction_end_to_end_id:
          description: >-
            SEPA identifier (provided by the end customer who initiated the SEPA
            transaction), routed through the whole payment process. (Max 35
            characters without whitespace).
          example: DDHHDHG333243
          type: string
      required:
        - transaction_description
        - transaction_end_to_end_id
        - recipient_iban
        - recipient_name
        - amount
      title: FrontingLoansWeb.Business.Loans.Payouts.CreateRequest
      type: object
    FrontingLoansWeb.Business.Loans.Payouts.GetResponse:
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The amount of the loan payout.
        id:
          description: The unique ID of a business fronting loan's payout.
          example: 963347398e47416c9df216a63ef035c2bflp
          type: string
        loan_id:
          description: The unique ID of the business fronting loan.
          example: 29e1a05906954ce082ec779d81de8c1ebflo
          type: string
        recipient_iban:
          description: The IBAN of the loan payout's recipient.
          example: DE92370601930002130041
          type: string
        recipient_name:
          description: The name of the loan payout's recipient.
          example: Max Mustermann
          type: string
        status:
          description: The status of the business fronting loan's payout.
          enum:
            - transfers_pending
            - transfers_complete
          example: transfers_pending
          type: string
        tag:
          description: The tag of the business fronting loan's payout.
          enum:
            - INITIAL_PAYOUT
            - RETENTION_FEE
            - FACTORING_INTEREST
          example: INITIAL_PAYOUT
          type: string
        transaction_description:
          description: >-
            The transaction reference, which the recipient will see. Only use
            characters allowed by SEPA in this field.
          nullable: true
          type: string
          example: Example transaction.
        transaction_end_to_end_id:
          description: >-
            SEPA identifier (provided by the end customer who initiated the SEPA
            transaction), routed through the whole payment process. (Max 35
            characters without whitespace)
          nullable: true
          type: string
          example: DDHHDHG333243
      required:
        - id
        - loan_id
        - recipient_iban
        - recipient_name
        - tag
        - status
        - amount
      title: FrontingLoansWeb.Business.Loans.Payouts.GetResponse
      type: object
    FrontingLoansWeb.Business.GetRelationshipResponse:
      properties:
        business_id:
          type: string
          description: The ID of the business.
          example: 880bbac68a34add190786b9c74f4c82fcbiz
        created_at:
          format: datetime
          type: string
          description: The date when the business relationship was created.
          example: '2020-20-03T18:01:48.000Z'
        offboarded_at:
          format: datetime
          nullable: true
          type: string
          description: The date when the business was off-boarded.
          example: '2022-20-03T18:01:48.000Z'
        status:
          type: string
          description: The status of the business relationship.
          enum:
            - active
            - closed
            - blocked
          example: closed
        status_reason:
          nullable: true
          type: string
          description: Additional context about the reasons for a particular status.
          example: offboarded_by_partner
        updated_at:
          format: datetime
          type: string
          description: The date when the business relationship was last updated.
          example: '2021-20-03T18:01:48.000Z'
      required:
        - business_id
        - status
        - created_at
        - updated_at
      title: FrontingLoansWeb.Business.GetRelationshipResponse
      type: object
