openapi: 3.0.0
info:
  version: '1.0'
  title: Overdrafts
servers:
  - url: https://api.solaris-sandbox.de
    description: Sandbox
  - url: https://api.solarisbank.de
    description: Production
paths:
  /v1/persons/{person_id}/overdraft_applications:
    post:
      tags:
        - Freelancer Overdrafts
      summary: Create Freelancer Overdraft Application
      security:
        - oauth2:
            - solaris_service_person_overdraft_application#create
      responses:
        '201':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Freelancer.GetOverdraftApplicationResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      requestBody:
        required: false
        description: The application attributes
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OverdraftWeb.CreateApplicationRequest'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
      operationId: OverdraftWeb.V1.Freelancer.Applications.CreateOperation
      description: >-
        Creates a freelancer overdraft application and assigns it to the
        `person` with the given `person_id` in the path parameter. Before
        calling this endpoint, you need to create a credit record for the
        customer and include it in the payload. Afterwards, Solaris' credit
        scoring system assesses the application to determine the person credit
        eligibility and either approves or rejects the application.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/overdraft_applications/{overdraft_application_id}:
    get:
      tags:
        - Freelancer Overdrafts
      summary: Get Freelancer Overdraft Application
      security:
        - oauth2:
            - solaris_service_person_overdraft_application#find
      responses:
        '200':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Freelancer.GetOverdraftApplicationResponse
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_application_id
          in: path
          description: The unique ID of a freelancer overdraft application.
      operationId: OverdraftWeb.V1.Freelancer.Applications.ShowOperation
      description: >-
        Returns the status and details of an existing freelancer overdraft
        application.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/overdraft_applications/{overdraft_application_id}/account_snapshot:
    put:
      tags:
        - Freelancer Overdrafts
      summary: Link account snapshot to freelancer overdraft application
      security:
        - oauth2:
            - solaris_service_person_overdraft_application#link_account_snapshot
      responses:
        '204':
          description: No Content
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: Account snapshot attributes
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/OverdraftWeb.Freelancer.LinkAccountSnapshotRequest
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_application_id
          in: path
          description: The unique ID of a freelancer overdraft application.
      operationId: OverdraftWeb.V1.Freelancer.Applications.LinkAccountSnapshotOperation
      description: >-
        Links the account snapshot of the `person` with the given `person_id` to
        their overdraft application. You need to include the
        `account_snapshot_id` in the payload. Solaris' credit scoring system
        uses the account snapshot to retrieve the customer's account
        information, balance, and transaction history to assess their credit
        eligibility.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/overdraft_applications/{overdraft_application_id}/overdraft:
    put:
      tags:
        - Freelancer Overdrafts
      summary: Create Freelancer Overdraft
      security:
        - oauth2:
            - solaris_service_person_overdraft#create
      responses:
        '201':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Freelancer.CreateOverdraftResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: The application attributes
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/OverdraftWeb.Freelancer.CreateOverdraftRequest
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_application_id
          in: path
          description: The unique ID of a freelancer overdraft application.
      operationId: OverdraftWeb.V1.Freelancer.Overdrafts.CreateOperation
      description: >-
        Creates a freelancer overdraft and activates the offered overdraft limit
        in the customer's account. After Solaris approves the overdraft
        application, you have to call this endpoint to create and activate the
        overdraft.
      deprecated: false
      callbacks: {}
  /v1/persons@{person_id}/overdrafts/{overdraft_id}:
    get:
      tags:
        - Freelancer Overdrafts
      summary: Get Freelancer Overdraft
      security:
        - oauth2:
            - solaris_service_person_overdraft#find
      responses:
        '200':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Freelancer.GetOverdraftResponse
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_id
          in: path
          description: The unique ID an overdraft, generated after an overdraft is offered.
      operationId: OverdraftWeb.V1.Freelancer.Overdrafts.ShowOperation
      description: >-
        Returns all the details of an existing freelancer overdraft, assigned to
        the `person` with the given `person_id` in the path parameter.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/overdrafts/{overdraft_id}/terminate:
    post:
      tags:
        - Freelancer Overdrafts
      summary: Terminate a freelancer overdraft
      security:
        - oauth2:
            - solaris_service_person_overdraft#terminate
      responses:
        '202':
          description: Overdraft
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Freelancer.GetOverdraftResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: The application attributes
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/OverdraftWeb.Freelancer.TerminateOverdraftRequest
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_id
          in: path
          description: The unique ID of a freelancer overdraft.
      operationId: OverdraftWeb.V1.Freelancer.Overdrafts.TerminateOperation
      description: >-
        Terminates a freelancer overdraft. This operation is only possible if
        the account balance is positive.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdraft_applications:
    post:
      tags:
        - Consumer Overdrafts
      summary: Create Consumer Overdraft Application
      security:
        - oauth2:
            - solaris_service_consumer_overdraft_application#create
      responses:
        '201':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Consumer.GetOverdraftApplicationResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
      requestBody:
        required: false
        description: The application attributes
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/OverdraftWeb.Consumer.CreateApplicationRequest
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
      operationId: OverdraftWeb.V1.Consumer.Applications.CreateOperation
      description: >-
        Creates a consumer overdraft application and assigns it to the `person`
        with the given `person_id` in the path parameter. Before calling this
        endpoint, you must collect the required information from the customer,
        such as the employment status and income declaration and the consent to
        the account snapshot and credit check. Additionally, you need to create
        a credit record for the customer. Afterwards, Solaris' credit scoring
        system assesses the application to determine the person credit
        eligibility and either approves or rejects the application.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdraft_applications/{overdraft_application_id}:
    get:
      tags:
        - Consumer Overdrafts
      summary: Get Consumer Overdraft Application
      security:
        - oauth2:
            - solaris_service_consumer_overdraft_application#find
      responses:
        '200':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Consumer.GetOverdraftApplicationResponse
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_application_id
          in: path
          description: The unique ID of a consumer overdraft application.
      operationId: OverdraftWeb.V1.Consumer.Applications.ShowOperation
      description: >-
        Returns the status and details of an existing consumer overdraft
        application.
      deprecated: false
      callbacks: {}
  /v1/persons/consumer_overdraft_applications:
    get:
      tags:
        - Consumer Overdrafts
      summary: List Consumer Overdraft Applications
      security:
        - oauth2:
            - solaris_service_consumer_overdraft_application#all
      responses:
        '200':
          headers:
            total:
              schema:
                type: integer
          description: OverdraftWeb.V1.Consumer.ListOverdraftApplicationResponse
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.V1.Consumer.ListOverdraftApplicationResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      parameters:
        - schema:
            type: integer
          required: false
          name: page[number]
          in: query
          description: The page number to be fetched
        - schema:
            type: integer
          required: false
          name: page[size]
          in: query
          description: The page size (maximum amount of results) to be fetched
        - schema:
            type: string
          required: false
          name: filter[id]
          in: query
          description: Consumer overdraft application id to filter by
        - schema:
            type: string
          required: false
          name: filter[person_id]
          in: query
          description: Filter by person id
        - schema:
            type: string
          required: false
          name: filter[account_iban]
          in: query
          description: Filter by account_iban
        - schema:
            type: string
          required: false
          name: filter[partner_id]
          in: query
          description: Filter by partner id
        - schema:
            type: string
            enum:
              - scoring_pending
              - offered
              - overdraft_created
              - rejected
              - deleted
          required: false
          name: filter[status]
          in: query
          description: Filter by status
        - schema:
            type: string
          required: false
          name: filter[created_at][min]
          in: query
          description: Filter by created_at min date
        - schema:
            type: string
          required: false
          name: filter[created_at][max]
          in: query
          description: Filter by created_at max date
      operationId: OverdraftWeb.V1.Consumer.Applications.IndexOperation
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdraft_applications/{application_id}/pre_contract:
    get:
      tags:
        - Consumer Overdrafts
      summary: Download the pre-contractual information for consumer overdraft
      security:
        - oauth2:
            - solaris_service_consumer_overdraft_application_pre_contract#find
      responses:
        '200':
          description: The binary of the pre-contractual information (SECCI)
          content:
            application/pdf:
              schema:
                $ref: '#/components/schemas/OverdraftWeb.DownloadPreContractResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: The unique person ID assigned to a specific customer.
        - schema:
            type: string
          required: true
          name: application_id
          in: path
          description: The unique overdraft application ID assigned to a specific customer.
      operationId: OverdraftWeb.V1.Applications.DownloadPreContractOperation
      description: >-
        Generates a SECCI form, which is the overview of the final offer and the
        contract. This endpoint downloads the SECCI form as a PDF, which you
        must share with the customer to review the data based on which the final
        contract is generated.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdraft_applications/{application_id}/conditions:
    get:
      tags:
        - Consumer Overdrafts
      summary: Download the conditions form information for consumer overdraft
      security:
        - oauth2:
            - solaris_service_consumer_overdraft_application_conditions#find
      responses:
        '200':
          description: The binary of the overdraft conditions form
          content:
            application/pdf:
              schema:
                $ref: '#/components/schemas/OverdraftWeb.DownloadConditionsResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: The unique person ID assigned to a specific customer.
        - schema:
            type: string
          required: true
          name: application_id
          in: path
          description: The unique overdraft application ID assigned to a specific customer.
      operationId: OverdraftWeb.V1.Applications.DownloadConditionsOperation
      description: >-
        Generates a conditions form, which is the overview of all conditions.
        This is an unsigned document and essentially replaces the contract
        document for overdrafts.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdraft_applications/{overdraft_application_id}/overdraft:
    put:
      tags:
        - Consumer Overdrafts
      summary: Create Consumer Overdraft
      security:
        - oauth2:
            - solaris_service_consumer_overdraft#create
      responses:
        '201':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Consumer.CreateOverdraftResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: The application attributes
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/OverdraftWeb.Consumer.CreateOverdraftRequest
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_application_id
          in: path
          description: The unique ID of a consumer overdraft application.
      operationId: OverdraftWeb.V1.Consumer.Overdrafts.CreateOperation
      description: >-
        Creates a consumer overdraft and activates the offered overdraft limit
        in the customer's account. After Solaris approves a consumer overdraft
        application, you have to call this endpoint and the overdraft amount
        will be set as an external limit to the customer's account.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdrafts/{overdraft_id}:
    get:
      tags:
        - Consumer Overdrafts
      summary: Get Consumer Overdraft
      security:
        - oauth2:
            - solaris_service_consumer_overdraft#find
      responses:
        '200':
          description: Overdraft
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Consumer.GetOverdraftResponse
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_id
          in: path
          description: >-
            The unique ID of a consumer overdraft, generated after an overdraft
            is offered.
      operationId: OverdraftWeb.V1.Consumer.Overdrafts.ShowOperation
      description: >-
        Returns all the details of an existing consumer overdraft, assigned to
        the `person` with the given `person_id` in the path parameter.
      deprecated: false
      callbacks: {}
  /v1/persons/consumer_overdrafts:
    get:
      tags:
        - Consumer Overdrafts
      summary: List Consumer Overdrafts
      security:
        - oauth2:
            - solaris_service_consumer_overdraft#all
      responses:
        '200':
          headers:
            total:
              schema:
                type: integer
          description: OverdraftWeb.V1.Consumer.ListOverdraftsResponse
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.V1.Consumer.ListOverdraftsResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      parameters:
        - schema:
            type: integer
          required: false
          name: page[number]
          in: query
          description: The page number to be fetched
        - schema:
            type: integer
          required: false
          name: page[size]
          in: query
          description: The page size (maximum amount of results) to be fetched
        - schema:
            type: string
          required: false
          name: filter[person_id]
          in: query
          description: Filter by business id
        - schema:
            type: string
          required: false
          name: filter[account_iban]
          in: query
          description: Filter by account_iban
        - schema:
            type: string
            enum:
              - created
              - conditions_pending
              - limit_pending
              - attached
              - defaulted_pending
              - conditions_termination_pending
              - termination_pending
              - terminated
              - reported_to_schufa
          required: false
          name: filter[status]
          in: query
          description: Filter by status
        - schema:
            type: string
            nullable: true
            format: datetime
          required: false
          name: filter[negative_since_from]
          in: query
          description: Negative since from date.
        - schema:
            type: string
            nullable: true
            format: datetime
          required: false
          name: filter[negative_since_to]
          in: query
          description: Negative since to date.
      operationId: OverdraftWeb.V1.Consumer.Overdrafts.IndexOperation
      description: >-
        This endpoint returns a list containing all consumer overdrafts for all
        of your customers.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdrafts/{overdraft_id}/limit_changes/{limit_change_id}/pre_contract:
    get:
      tags:
        - Consumer Overdrafts
      summary: >-
        Download the pre-contractual information for consumer overdraft limit
        increase
      security:
        - oauth2:
            - solaris_service_consumer_overdraft_limit_change_pre_contract#find
      responses:
        '200':
          description: The binary of the pre-contractual information (SECCI)
          content:
            application/pdf:
              schema:
                $ref: '#/components/schemas/OverdraftWeb.DownloadPreContractResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: The unique person ID assigned to a specific customer.
        - schema:
            type: string
          required: true
          name: overdraft_id
          in: path
          description: The unique ID of a consumer overdraft.
        - schema:
            type: string
          required: true
          name: limit_change_id
          in: path
          description: The unique limit change ID, generated after creating a limit change.
      operationId: OverdraftWeb.V1.Consumer.LimitChanges.DownloadPreContractOperation
      description: >-
        Generates a SECCI form for limit increase request, which is the overview
        of the final offer and the contract. This endpoint downloads the SECCI
        form as a PDF, which you must share with the customer to review the data
        based on which the final contract is generated.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdrafts/{overdraft_id}/limit_changes/{limit_change_id}/conditions:
    get:
      tags:
        - Consumer Overdrafts
      summary: >-
        Download the conditions form information for consumer overdraft limit
        increase
      security:
        - oauth2:
            - solaris_service_consumer_overdraft_limit_change_conditions#find
      responses:
        '200':
          description: The binary of the overdraft conditions form
          content:
            application/pdf:
              schema:
                $ref: '#/components/schemas/OverdraftWeb.DownloadConditionsResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_id
          in: path
          description: The unique ID of a consumer overdraft.
        - schema:
            type: string
          required: true
          name: limit_change_id
          in: path
          description: The unique limit change ID, generated after creating a limit change.
      operationId: OverdraftWeb.V1.Consumer.LimitChanges.DownloadConditionsOperation
      description: >-
        Generates a conditions form for limit increase request, which is the
        overview of all conditions. This is an unsigned document and essentially
        replaces the contract document for overdrafts.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdrafts/{overdraft_id}/limit_changes/{limit_change_id}:
    put:
      tags:
        - Consumer Overdrafts Limit Change
      summary: Update Limit Change
      security:
        - oauth2:
            - solaris_service_consumer_overdraft_limit_change#update
      responses:
        '201':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Consumer.CreateLimitChangeResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: The application attributes
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OverdraftWeb.Consumer.PutLimitChangeRequest'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_id
          in: path
          description: The unique ID of a consumer overdraft.
        - schema:
            type: string
          required: true
          name: limit_change_id
          in: path
          description: The unique ID of a consumer limit change.
      operationId: OverdraftWeb.V1.Consumer.LimitChanges.PutOperation
      description: >-
        Updates the limit change and activates the requested overdraft limit in
        the customer's account. After Solaris approves a consumer limit change,
        you have to call this endpoint and the requested amount will be set as
        an external limit to the customer's account.
      deprecated: false
      callbacks: {}
    get:
      tags:
        - Consumer Overdrafts Limit Change
      summary: Show Consumer Overdraft Limit Change
      security:
        - oauth2:
            - solaris_service_consumer_overdraft_limit_change#show
      responses:
        '200':
          description: LimitChange
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Consumer.ShowLimitChangeResponse
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_id
          in: path
          description: The unique ID of a consumer overdraft.
        - schema:
            type: string
          required: true
          name: limit_change_id
          in: path
          description: The unique limit chnage ID, generated after creating a limit change.
      operationId: OverdraftWeb.V1.Consumer.LimitChanges.ShowOperation
      description: Shows a consumer overdraft limit change.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdrafts/{overdraft_id}/limit_changes:
    post:
      tags:
        - Consumer Overdrafts Limit Change
      summary: Create Consumer Overdraft Limit Change
      security:
        - oauth2:
            - solaris_service_consumer_overdraft_limit_change#create
      responses:
        '201':
          description: LimitChange
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Consumer.CreateLimitChangeResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: The limit change attributes
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/OverdraftWeb.Consumer.CreateLimitChangeRequest
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_id
          in: path
          description: The unique ID of a consumer overdraft.
      operationId: OverdraftWeb.V1.Consumer.LimitChanges.CreateOperation
      description: Creates a consumer overdraft limit change.
      deprecated: false
      callbacks: {}
  /v1/persons/{person_id}/consumer_overdrafts/{overdraft_id}/terminate:
    post:
      tags:
        - Consumer Overdrafts
      summary: Terminate a Consumer Overdraft
      security:
        - oauth2:
            - solaris_service_consumer_overdraft#terminate
      responses:
        '204':
          description: No Content
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: The application attributes
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/OverdraftWeb.Consumer.TerminateOverdraftRequest
      parameters:
        - schema:
            type: string
          required: true
          name: person_id
          in: path
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_id
          in: path
          description: The unique ID of a consumer overdraft.
      operationId: OverdraftWeb.V1.Consumer.Overdrafts.TerminateOperation
      description: >-
        Terminates a consumer overdraft. This operation is only possible if the
        account balance is **positive** or **zero** after booking the accrued
        interest from the overdraft usage on the account.
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/overdraft_applications:
    post:
      tags:
        - Business Overdrafts
      summary: Create Business Overdraft Application
      security:
        - oauth2:
            - solaris_service_business_overdraft_application#create
      responses:
        '201':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Business.GetOverdraftApplicationResponse
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      requestBody:
        required: false
        description: The application attributes
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/OverdraftWeb.Business.CreateApplicationRequest
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: >-
            The unique business ID, generated after completing the business
            onboarding process.
      operationId: OverdraftWeb.V1.Business.Applications.CreateOperation
      description: >-
        Creates a business overdraft application and assigns it to the
        `business` with the given `business_id` in the path parameter. You have
        to include the `identification_id` and the `account_iban` of the
        business in the payload. Afterwards, Solaris' credit scoring system
        assesses the application to determine the business credit eligibility
        and either approves or rejects the application.
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/overdraft_applications/{overdraft_application_id}:
    get:
      tags:
        - Business Overdrafts
      summary: Get Business Overdraft Application
      security:
        - oauth2:
            - solaris_service_business_overdraft_application#find
      responses:
        '200':
          description: Application
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Business.GetOverdraftApplicationResponse
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: >-
            The unique business ID, generated after completing the business
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_application_id
          in: path
          description: The unique ID of a business overdraft application.
      operationId: OverdraftWeb.V1.Business.Applications.ShowOperation
      description: >-
        Returns the status and details of an existing business overdraft
        application.
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/overdraft_applications/{overdraft_application_id}/limit_increase:
    post:
      tags:
        - Business Overdrafts
      summary: Increase limit in Business Overdraft Application
      security:
        - oauth2:
            - solaris_service_business_overdraft_application#limit_increase
      responses:
        '204':
          description: No Content
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: >-
            The unique business ID, generated after completing the business
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_application_id
          in: path
          description: The unique ID of the business overdraft application.
      operationId: OverdraftWeb.V1.Business.Applications.LimitIncreaseOperation
      description: >-
        Requests a limit increase for an approved or confirmed business
        overdraft application. After Solaris approves an overdraft application,
        the business receives an offer with an initial overdraft limit and can
        either confirm the offer or request a limit increase by calling this
        endpoint. A limit increase request is subject to an additional credit
        check by Solaris and can be approved or rejected.
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/overdraft_applications/{overdraft_application_id}/confirm:
    post:
      tags:
        - Business Overdrafts
      summary: Confirm Business Overdraft Application
      security:
        - oauth2:
            - solaris_service_business_overdraft_application#confirm
      responses:
        '204':
          description: No Content
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: >-
            The unique business ID, generated after completing the business
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_application_id
          in: path
          description: The unique ID of the business overdraft application.
      operationId: OverdraftWeb.V1.Business.Applications.ConfirmOperation
      description: >-
        Confirms a business overdraft application and activates the overdraft
        limit. Once Solaris approves a business overdraft application, you must
        confirm the overdraft by calling this endpoint. Afterwards, the
        overdraft amount will be credited to the business account. You have to
        call this enpoint also after receiving an approval on a limit increase
        request.
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/overdraft_applications/{overdraft_application_id}/cancel:
    post:
      tags:
        - Business Overdrafts
      summary: Cancel Business Overdraft Application
      security:
        - oauth2:
            - solaris_service_business_overdraft_application#cancel
      responses:
        '204':
          description: No Content
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: >-
            The unique business ID, generated after completing the business
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_application_id
          in: path
          description: The unique ID of a business overdraft application.
      operationId: OverdraftWeb.V1.Business.Applications.CancelOperation
      description: Cancels an existing business overdraft application.
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/overdrafts/{overdraft_id}:
    get:
      tags:
        - Business Overdrafts
      summary: Get Business Overdraft
      security:
        - oauth2:
            - solaris_service_business_overdraft#find
      responses:
        '200':
          description: Overdraft
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OverdraftWeb.Business.GetOverdraftResponse
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: >-
            The unique business ID, generated after completing the business
            onboarding process.
        - schema:
            type: string
          required: true
          name: overdraft_id
          in: path
          description: >-
            The unique ID of a business overdraft, generated after an overdraft
            is offered.
      operationId: OverdraftWeb.V1.Business.Overdrafts.ShowOperation
      description: >-
        Returns all the details of an existing business overdraft, assigned to
        the `business` with the given `business_id`.
      deprecated: false
      callbacks: {}
components:
  schemas:
    OverdraftWeb.CreateApplicationRequest:
      type: object
      title: OverdraftWeb.CreateApplicationRequest
      properties:
        partner_risk_class:
          type: string
          example: d
          description: The risk class assigned to a freelancer by the partner.
        partner_reference_number:
          type: string
          example: a123456
          description: The partner's reference number.
        partner_contact_number:
          type: string
          example: '+491565904345'
          description: The number of the partner's contact person.
        partner_contact_name:
          type: string
          example: Peter Mustermann
          description: The name of the partner's contact person.
        credit_record_id:
          type: string
          example: fbb7d15fa4c54ba0b077592665ef04a4ccrd
          description: >-
            The unique ID of a credit record, generated after creating a
            freelancer credit record.
      description: Exact list of required attributes depends on product configuration
    SolarisToolkit.Web.Money:
      type: object
      title: SolarisToolkit.Web.Money
      required:
        - value
        - currency
        - unit
      properties:
        value:
          type: integer
          description: The amount value
        unit:
          type: string
          enum:
            - cents
          description: The unit of the given value.
        currency:
          type: string
          description: The currency of the given value. Only EURO is currently supported.
      example:
        value: 1000
        unit: cents
        currency: EUR
    SolarisToolkit.Web.Money.Optional:
      type: object
      title: SolarisToolkit.Web.Money.Optional
      nullable: true
      allOf:
        - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
    OverdraftWeb.Freelancer.GetOverdraftApplicationResponse:
      type: object
      title: OverdraftWeb.Freelancer.GetOverdraftApplicationResponse
      required:
        - id
        - person_id
        - status
        - created_at
      properties:
        status:
          type: string
          example: offered
          enum:
            - initial_scoring_pending
            - account_snapshot_pending
            - account_snapshot_verification_pending
            - offered
            - rejected
            - expired
            - deleted
            - overdraft_created
          description: The status of a freelancer overdraft application.
        rejection_reasons:
          type: array
          nullable: true
          items:
            type: string
          description: The reason(s) for rejecting an overdraft application.
        person_id:
          type: string
          example: dc1a6812a14f6cc338cd084208535bcdcper
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        partner_risk_class:
          type: string
          nullable: true
          example: d
          description: The risk class assigned to a freelancer by the partner.
        partner_reference_number:
          type: string
          nullable: true
          example: a123456
          description: The partner's reference number.
        partner_contact_number:
          type: string
          nullable: true
          example: '+491565904345'
          description: The number of the partner's contact person.
        partner_contact_name:
          type: string
          nullable: true
          example: Peter Mustermann
          description: The name of the partner's contact person.
        overdraft_rate:
          type: number
          example: 9
          description: The interest rate applicable to the overdraft.
        overdraft_id:
          type: string
          nullable: true
          example: 00556cd181f2409aaa6c2a033cce3a8fcovd
          description: >-
            The unique ID of a freelancer overdraft, generated after an
            overdraft is offered.
        limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        interest_conditions_enabled:
          type: boolean
        interest_accrual_rate:
          type: number
          example: 3
          description: >-
            The daily rate at which interest is accrued on the used amount of an
            overdraft.
        id:
          type: string
          example: b83z264de98741018419b53648e20ca9coap
          description: The unique ID of a freelancer overdraft application.
        decision:
          type: string
          nullable: true
          example: OFFERED
          enum:
            - REJECTED
            - OFFERED
          description: Solaris' decision on the overdraft application.
        credit_record_id:
          type: string
          nullable: true
          example: fbb7d15fa4c54ba0b077592665ef04a4ccrd
          description: >-
            The unique ID of a credit record, generated after creating a
            freelancer credit record.
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the freelancer overdraft application was created.
        account_snapshot_id:
          type: string
          nullable: true
          description: The unique ID of an account snapshot of a specific person account.
    Error400:
      type: object
      title: Error400
      properties:
        title:
          type: string
          example: Failed to build pagination headers.
        status:
          type: string
          example: '400'
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        detail:
          type: string
          example: Cannot connect to database.
        code:
          type: string
          example: build_pagination_headers_failure
    Error404:
      type: object
      title: Error404
      properties:
        title:
          type: string
          example: Model Not Found
        status:
          type: string
          example: '404'
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        detail:
          type: string
          example: Couldn't find 'Account' for id 'DE24112233445566'.
        code:
          type: string
          example: model_not_found
    OverdraftWeb.Freelancer.LinkAccountSnapshotRequest:
      type: object
      title: OverdraftWeb.Freelancer.LinkAccountSnapshotRequest
      required:
        - account_snapshot_id
      properties:
        account_snapshot_id:
          type: string
          description: The unique ID of an account snapshot of a specific person account.
    SolarisToolkit.Web.Json.Error:
      type: object
      title: SolarisToolkit.Web.Json.Error
      required:
        - id
        - status
        - code
        - title
        - detail
      properties:
        title:
          type: string
          description: Some short human friendly string
        status:
          type: integer
          description: The HTTP status
        source:
          type: object
          required:
            - field
            - message
          properties:
            message:
              type: string
            field:
              type: string
          nullable: true
          example:
            message: is_required
            field: name
          description: Optional computer-friendly error source description
        id:
          type: string
          description: A UUID, preferably the request ID
        detail:
          type: string
          description: 'Some human friendly-ish detail: field is required'
        code:
          type: string
          description: some_computer_friendly_string
        backtrace:
          type: array
          nullable: true
          items:
            type: string
          description: Optional array of backtrace lines
    SolarisToolkit.Web.Json.ErrorBody:
      type: object
      title: SolarisToolkit.Web.Json.ErrorBody
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/SolarisToolkit.Web.Json.Error'
    OverdraftWeb.Freelancer.CreateOverdraftRequest:
      type: object
      title: OverdraftWeb.Freelancer.CreateOverdraftRequest
      required:
        - account_id
      properties:
        account_id:
          type: string
          example: 575189c6eb825b10b9d0392fcb3bf61dcacc
          description: The unique ID of a customer's bank account.
    OverdraftWeb.Freelancer.CreateOverdraftResponse:
      type: object
      title: OverdraftWeb.Freelancer.CreateOverdraftResponse
      required:
        - id
        - person_id
        - status
        - created_at
      properties:
        status:
          type: string
          example: created
          enum:
            - created
            - interest_conditions_set
            - limit_set
            - terminated
          description: The status of a created overdraft offered to a freelancer.
        person_id:
          type: string
          example: dc1a6812a14f6cc338cd084208535bcdcper
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        overdraft_rate:
          type: number
          example: 9
          description: The interest rate applicable to the overdraft.
        limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        interest_conditions_enabled:
          type: boolean
        interest_accrual_rate:
          type: number
          example: 3
          description: >-
            The daily rate at which interest is accrued on the used amount of an
            overdraft.
        id:
          type: string
          example: 00556cd181f2409aaa6c2a033cce3a8fcovd
          description: >-
            The unique ID of a freelancer overdraft, generated after an
            overdraft is offered.
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the overdraft was created.
        account_id:
          type: string
          nullable: true
          example: 575189c6eb825b10b9d0392fcb3bf61dcacc
          description: The unique ID of a customer's bank account.
    OverdraftWeb.Freelancer.GetOverdraftResponse:
      type: object
      title: OverdraftWeb.Freelancer.GetOverdraftResponse
      required:
        - id
        - person_id
        - status
        - created_at
        - interest_accrued
      properties:
        status:
          type: string
          example: created
          enum:
            - created
            - interest_conditions_set
            - limit_set
            - terminated
          description: The status of an overdraft offered to a freelancer.
        person_id:
          type: string
          example: dc1a6812a14f6cc338cd084208535bcdcper
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        overdraft_rate:
          type: number
          example: 9
          description: The interest rate applicable to the overdraft.
        limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        interest_conditions_enabled:
          type: boolean
        interest_accrued:
          oneOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The daily interest accrued by a freelancer account.
        interest_accrual_rate:
          type: number
          example: 3
          description: >-
            The daily rate at which interest is accrued on the used amount of an
            overdraft.
        id:
          type: string
          example: 00556cd181f2409aaa6c2a033cce3a8fcovd
          description: >-
            The unique ID of a freelancer overdraft, generated after an
            overdraft is offered.
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the overdraft was created.
        account_id:
          type: string
          nullable: true
          example: 575189c6eb825b10b9d0392fcb3bf61dcacc
          description: The unique ID of a customer's bank account.
    OverdraftWeb.Freelancer.TerminateOverdraftRequest:
      type: object
      title: OverdraftWeb.Freelancer.TerminateOverdraftRequest
      properties: {}
    OverdraftWeb.Consumer.CreateApplicationRequest:
      type: object
      title: OverdraftWeb.Consumer.CreateApplicationRequest
      required:
        - identification_id
        - account_iban
        - employment_status
        - net_income_amount
      properties:
        partner_risk_class:
          type: string
          example: d
          description: The risk class assigned to a customer by the partner.
        partner_requested_limit:
          type: object
          nullable: true
          description: The limit requested by partner
          allOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
            - type: object
              properties:
                value:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
        partner_reference_number:
          type: string
          example: a123456
          description: The partner's reference number.
        partner_contact_number:
          type: string
          example: '+491565904345'
          description: The number of the partner's contact person.
        partner_contact_name:
          type: string
          example: Peter Mustermann
          description: The name of the partner's contact person.
        net_income_amount:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money'
        minimum_credit_risk_criteria:
          type: object
          nullable: true
          description: Minimum credit risk criteria fields for scorer
          additionalProperties: true
        identification_id:
          type: string
          example: 176a96d1ecf7459d659d1b7f0108a3f2cidt
          description: >-
            The unique identification ID of a person, generated after completing
            the person identification process.
        employment_status:
          type: string
          example: EMPLOYED
          enum:
            - EMPLOYED
            - UNEMPLOYED
            - PUBLIC_SECTOR_EMPLOYEE
            - PROFESSIONAL_SOLDIER
            - FREELANCER
            - HOUSEWORK
            - APPRENTICE
            - MANAGEMENT
            - RETIRED
            - STUDENT
            - SELF_EMPLOYED
            - MILITARY_OR_COMMUNITY_SERVICE
          description: >-
            The consumer's employment status, mentioned in the signed
            self-declaration form.
        credit_record_id:
          type: string
          example: fbb7d15fa4c54ba0b077592665ef04a4ccrd
          description: >-
            The unique ID of a credit record, generated after creating a
            consumer credit record.
        account_iban:
          type: string
          example: DE87110101001000057123
          description: The IBAN of a person account.
    OverdraftWeb.Consumer.GetOverdraftApplicationResponse:
      type: object
      title: OverdraftWeb.Consumer.GetOverdraftApplicationResponse
      required:
        - id
        - partner_id
        - person_id
        - identification_id
        - account_iban
        - status
        - created_at
      properties:
        status_description:
          type: string
          nullable: true
          example: The overdraft is approved and offered to the customer.
          description: The description of the consumer overdraft application status.
        status:
          type: string
          example: offered
          enum:
            - scoring_pending
            - offered
            - overdraft_created
            - rejected
            - deleted
          description: The status of a consumer overdraft application.
        person_id:
          type: string
          example: dc1a6812a14f6cc338cd084208535bcdcper
          description: >-
            The unique person ID, generated after completing the person
            onboarding process.
        partner_risk_class:
          type: string
          nullable: true
          example: d
          description: The risk class assigned to a customer by the partner.
        partner_requested_limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        partner_reference_number:
          type: string
          nullable: true
          example: a123456
          description: The partner's reference number.
        partner_id:
          type: string
          example: 6ee8e4c8bdc2f9b15870c989706aa9cccpar
          description: The unique partner ID, generated after creating a partner.
        partner_contact_number:
          type: string
          nullable: true
          example: '+491565904345'
          description: The number of the partner's contact person.
        partner_contact_name:
          type: string
          nullable: true
          example: Peter Mustermann
          description: The name of the partner's contact person.
        overdraft_id:
          type: string
          nullable: true
          example: 00556cd181f2409aaa6c2a033cce3a8fcovd
          description: >-
            The unique ID of a consumer overdraft, generated after an overdraft
            is offered.
        net_income_amount:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money'
        minimum_credit_risk_criteria:
          type: object
          nullable: true
          description: Minimum credit risk criteria fields for scorer
          additionalProperties: true
        limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        interest_accrual_rate:
          type: number
          nullable: true
          format: float
          description: Scorer rate for risk based pricing
        identification_id:
          type: string
          example: 176a96d1ecf7459d659d1b7f0108a3f2cidt
          description: >-
            The unique identification ID of a person, generated after completing
            the person identification process.
        id:
          type: string
          example: b83z264de98741018419b53648e20ca9coap
          description: The unique ID of a consumer overdraft application.
        employment_status:
          type: string
          nullable: true
          example: EMPLOYED
          enum:
            - EMPLOYED
            - UNEMPLOYED
            - PUBLIC_SECTOR_EMPLOYEE
            - PROFESSIONAL_SOLDIER
            - FREELANCER
            - HOUSEWORK
            - APPRENTICE
            - MANAGEMENT
            - RETIRED
            - STUDENT
            - SELF_EMPLOYED
            - MILITARY_OR_COMMUNITY_SERVICE
          description: >-
            The consumer's employment status, mentioned in the signed
            self-declaration form.
        credit_record_id:
          type: string
          nullable: true
          example: fbb7d15fa4c54ba0b077592665ef04a4ccrd
          description: >-
            The unique ID of a credit record, generated after creating a
            consumer credit record.
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the consumer overdraft application was created.
        account_iban:
          type: string
          example: DE87110101001000057123
          description: The IBAN of a person account.
    Error409:
      type: object
      title: Error409
      properties:
        title:
          type: string
          example: Record Not Unique
        status:
          type: string
          example: '409'
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        detail:
          type: string
          example: Could not save `terms_and_conditions_event`.
        code:
          type: string
          example: record_not_unique
    Error403:
      type: object
      title: Error403
      properties:
        title:
          type: string
          example: Unauthorized Action
        status:
          type: string
          example: '403'
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        detail:
          type: string
          example: Unauthorized action is not allowed.
        code:
          type: string
          example: unauthorized_action
    OverdraftWeb.V1.Consumer.ListOverdraftApplicationResponse:
      type: array
      title: OverdraftWeb.V1.Consumer.ListOverdraftApplicationResponse
      items:
        $ref: >-
          #/components/schemas/OverdraftWeb.Consumer.GetOverdraftApplicationResponse
    OverdraftWeb.DownloadPreContractResponse:
      type: string
      title: OverdraftWeb.DownloadPreContractResponse
      format: binary
    OverdraftWeb.DownloadConditionsResponse:
      type: string
      title: OverdraftWeb.DownloadConditionsResponse
      format: binary
    OverdraftWeb.Consumer.CreateOverdraftRequest:
      type: object
      title: OverdraftWeb.Consumer.CreateOverdraftRequest
      required:
        - account_id
        - tnc_accepted_at
      properties:
        tnc_accepted_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
        account_id:
          type: string
          example: 575189c6eb825b10b9d0392fcb3bf61dcacc
          description: The unique ID of a person's bank account.
    OverdraftWeb.Consumer.CreateOverdraftResponse:
      type: object
      title: OverdraftWeb.Consumer.CreateOverdraftResponse
      required:
        - id
        - person_id
        - consumer_application_id
        - account_iban
        - status
        - interest_accrual_rate
        - overdraft_rate
        - created_at
        - negative_since
      properties:
        status:
          type: string
          example: created
          enum:
            - conditions_pending
            - limit_pending
            - created
            - attached
          description: The status of an overdraft offered to a consumer.
        person_id:
          type: string
          example: dc1a6812a14f6cc338cd084208535bcdcper
          description: >-
            The unique person ID, generated after completing the person
            onboarding
                  process.
        overdraft_rate:
          type: number
          format: float
          example: 9
          description: The interest rate applicable to the overdraft.
        negative_since:
          type: string
          nullable: true
          format: datetime
          example: '2021-08-03T18:01:48Z'
          description: The date and time when overdraft went negative.
        interest_accrual_rate:
          type: number
          format: float
          example: 3
          description: >-
            The daily rate at which interest is accrued on the used amount of an
            overdraft.
        id:
          type: string
          example: 00556cd181f2409aaa6c2a033cce3a8fcovd
          description: >-
            The unique ID of a consumer overdraft, generated after an overdraft
            is offered.
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the overdraft was created.
        consumer_application_id:
          type: string
          example: b83z264de98741018419b53648e20ca9coap
          description: The unique ID of a consumer overdraft application.
        account_iban:
          type: string
          example: DE87110101001000057123
          description: The IBAN of a person account.
    OverdraftWeb.Consumer.GetOverdraftResponse:
      type: object
      title: OverdraftWeb.Consumer.GetOverdraftResponse
      required:
        - id
        - person_id
        - consumer_application_id
        - account_iban
        - status
        - interest_accrual_rate
        - overdraft_rate
        - created_at
        - negative_since
        - interest_accrued
      properties:
        status:
          type: string
          example: created
          enum:
            - created
            - conditions_pending
            - limit_pending
            - attached
            - defaulted_pending
            - conditions_termination_pending
            - termination_pending
            - terminated
          description: The status of an overdraft offered to a consumer.
        person_id:
          type: string
          example: dc1a6812a14f6cc338cd084208535bcdcper
          description: >-
            The unique person ID, generated after completing the person
            onboarding
                  process.
        overdraft_rate:
          type: number
          format: float
          example: 9
          description: The interest rate applicable to the overdraft.
        negative_since:
          type: string
          nullable: true
          format: datetime
          example: '2021-08-03T18:01:48Z'
          description: The date and time when overdraft went negative.
        limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        interest_accrued:
          oneOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The daily interest accrued by an person account.
        interest_accrual_rate:
          type: number
          format: float
          example: 3
          description: >-
            The daily rate at which interest is accrued on the used amount of an
            overdraft.
        id:
          type: string
          example: 00556cd181f2409aaa6c2a033cce3a8fcovd
          description: >-
            The unique ID of a consumer overdraft, generated after an overdraft
            is offered.
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the overdraft was created.
        consumer_application_id:
          type: string
          example: b83z264de98741018419b53648e20ca9coap
          description: The unique ID of a consumer overdraft application.
        account_iban:
          type: string
          example: DE87110101001000057123
          description: The IBAN of a person account.
    OverdraftWeb.V1.Consumer.ListOverdraftsItem:
      type: object
      title: OverdraftWeb.V1.Consumer.ListOverdraftsItem
      required:
        - id
        - person_id
        - consumer_application_id
        - account_iban
        - status
        - interest_accrual_rate
        - overdraft_rate
        - created_at
        - negative_since
      properties:
        status:
          type: string
          example: created
          enum:
            - created
            - conditions_pending
            - limit_pending
            - attached
            - defaulted_pending
            - conditions_termination_pending
            - termination_pending
            - terminated
          description: The status of an overdraft offered to a consumer.
        person_id:
          type: string
          example: dc1a6812a14f6cc338cd084208535bcdcper
          description: >-
            The unique person ID, generated after completing the person
            onboarding
                  process.
        overdraft_rate:
          type: number
          format: float
          example: 9
          description: The interest rate applicable to the overdraft.
        negative_since:
          type: string
          nullable: true
          format: datetime
          example: '2021-08-03T18:01:48Z'
          description: The date and time when overdraft went negative.
        limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        interest_accrual_rate:
          type: number
          format: float
          example: 3
          description: >-
            The daily rate at which interest is accrued on the used amount of an
            overdraft.
        id:
          type: string
          example: 00556cd181f2409aaa6c2a033cce3a8fcovd
          description: >-
            The unique ID of a consumer overdraft, generated after an overdraft
            is offered.
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the overdraft was created.
        consumer_application_id:
          type: string
          example: b83z264de98741018419b53648e20ca9coap
          description: The unique ID of a consumer overdraft application.
        account_iban:
          type: string
          example: DE87110101001000057123
          description: The IBAN of a person account.
    OverdraftWeb.V1.Consumer.ListOverdraftsResponse:
      type: array
      title: OverdraftWeb.V1.Consumer.ListOverdraftsResponse
      items:
        $ref: '#/components/schemas/OverdraftWeb.V1.Consumer.ListOverdraftsItem'
    OverdraftWeb.Consumer.ShowLimitChangeResponse:
      type: object
      title: OverdraftWeb.Consumer.ShowLimitChangeResponse
      required:
        - id
        - overdraft_id
        - status
        - created_at
        - requested_limit
      properties:
        tnc_accepted_at:
          type: string
          nullable: true
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: >-
            The date and time the terms and conditions were accepted by the
            customer.
        status:
          type: string
          example: limit_pending
          enum:
            - requested
            - tnc_pending
            - tnc_accepted
            - conditions_pending
            - limit_pending
            - attached
            - cancelled
            - expired
          description: The status of a limit change.
        requested_limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money'
        reason:
          type: string
          nullable: true
          example: Customer has a good scoring.
          description: The reason why the limit change was requested.
        overdraft_id:
          type: string
          example: b83z264de98741018419b53648e20ca9coap
          description: The unique ID of a overdraft.
        limit_at_creation_time:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        id:
          type: string
          example: 00556cd181f2409aaa6c2a033cce3a8fcovd
          description: >-
            The unique ID of a consumer overdraft, generated after an overdraft
            is offered.
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the overdraft was created.
        attached_at:
          type: string
          nullable: true
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the new limit was attached.
    OverdraftWeb.Consumer.PutLimitChangeRequest:
      type: object
      title: OverdraftWeb.Consumer.PutLimitChangeRequest
      required:
        - tnc_accepted_at
      properties:
        tnc_accepted_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
    OverdraftWeb.Consumer.CreateLimitChangeResponse:
      type: object
      title: OverdraftWeb.Consumer.CreateLimitChangeResponse
      required:
        - id
        - overdraft_id
        - status
        - created_at
        - requested_limit
      properties:
        tnc_accepted_at:
          type: string
          nullable: true
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: >-
            The date and time the terms and conditions were accepted by the
            customer.
        status:
          type: string
          example: requested
          enum:
            - requested
            - tnc_pending
            - tnc_accepted
            - conditions_pending
            - limit_pending
            - attached
            - cancelled
            - expired
          description: The status of a limit change.
        requested_limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money'
        reason:
          type: string
          nullable: true
          example: Customer has a good scoring.
          description: The reason why the limit change was requested.
        overdraft_id:
          type: string
          example: b83z264de98741018419b53648e20ca9coap
          description: The unique ID of the related overdraft.
        limit_at_creation_time:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        id:
          type: string
          example: 00556cd181f2409aaa6c2a033cce3a8fcovd
          description: >-
            The unique ID of a consumer overdraft, generated after an overdraft
            is offered.
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the overdraft was created.
        attached_at:
          type: string
          nullable: true
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the new limit was attached.
    OverdraftWeb.Consumer.CreateLimitChangeRequest:
      type: object
      title: OverdraftWeb.Consumer.CreateLimitChangeRequest
      required:
        - requested_limit
      properties:
        requested_limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money'
        reason:
          type: string
          example: Customer scoring improved
          description: The reason why the limit should be changed.
    OverdraftWeb.Consumer.TerminateOverdraftRequest:
      type: object
      title: OverdraftWeb.Consumer.TerminateOverdraftRequest
      properties: {}
    OverdraftWeb.Business.CreateApplicationRequest:
      type: object
      title: OverdraftWeb.Business.CreateApplicationRequest
      required:
        - identification_id
        - account_iban
      properties:
        identification_id:
          type: string
          example: 1bb49f9dec3a57ae69ad3c3183316c9dcidt
          description: >-
            The unique identification ID of a business, generated after
            completing the business identification process.
        account_iban:
          type: string
          example: DE13110101014386274299
          description: The IBAN of a business account.
    OverdraftWeb.Business.GetOverdraftApplicationResponse:
      type: object
      title: OverdraftWeb.Business.GetOverdraftApplicationResponse
      required:
        - id
        - business_id
        - identification_id
        - account_iban
        - status
        - created_at
      properties:
        status:
          type: string
          example: scoring_pending
          enum:
            - scoring_pending
            - offered
            - rejected
            - canceled
            - confirmed
            - limit_increase_decision_pending
            - information_required
          description: The status of a business overdraft application.
        overdraft_id:
          type: string
          nullable: true
          example: 00556cd181f2409aaa6c2a033cce3a8fbovd
          description: >-
            The unique ID of a business overdraft, generated after an overdraft
            is offered.
        limit_increase_rejection_reason:
          type: string
          nullable: true
          description: The reason(s) for rejecting a limit increase request.
        initial_overdraft_limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        identification_id:
          type: string
          example: 1bb49f9dec3a57ae69ad3c3183316c9dcidt
          description: >-
            The unique identification ID of a business, generated after
            completing the
                  business identification process.
        id:
          type: string
          example: fdsdefghijklmnopqrstuvwxyz012346boap
          description: The unique ID of a business overdraft application.
        final_overdraft_limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the business overdraft application was created.
        business_id:
          type: string
          example: 880bbac68a34add190786b9c74f4c82fcbiz
          description: >-
            The unique business ID, generated after completing the business
            onboarding process.
        account_iban:
          type: string
          example: DE13110101014386274299
          description: The IBAN of a business account.
    OverdraftWeb.Business.GetOverdraftResponse:
      type: object
      title: OverdraftWeb.Business.GetOverdraftResponse
      required:
        - id
        - business_id
        - application_id
        - account_iban
        - status
        - interest_accrual_rate
        - overdraft_rate
        - created_at
        - interest_accrued
      properties:
        status:
          type: string
          example: created
          enum:
            - created
            - conditions_pending
            - limit_pending
            - attached
            - terminated
          description: 'The status of a business overdraft. '
        overdraft_rate:
          type: number
          format: float
          example: 8
          description: The interest rate applicable to the overdraft.
        limit:
          $ref: '#/components/schemas/SolarisToolkit.Web.Money.Optional'
        interest_accrued:
          oneOf:
            - $ref: '#/components/schemas/SolarisToolkit.Web.Money'
          description: The daily interest accrued by a business account.
        interest_accrual_rate:
          type: number
          format: float
          example: 3
          description: |-
            The daily rate at which interest is accrued on the used amount of an
                  overdraft.
        id:
          type: string
          example: 00556cd181f2409aaa6c2a033cce3a8fbovd
          description: >-
            The unique ID of a business overdraft, generated after an overdraft
            is offered.
        created_at:
          type: string
          format: datetime
          example: '2021-08-03T18:01:48.000Z'
          description: The date and time the overdraft was created.
        business_id:
          type: string
          example: 880bbac68a34add190786b9c74f4c82fcbiz
          description: >-
            The unique ID of a business, generated after completing the business
            onboarding process.
        application_id:
          type: string
          example: fdsdefghijklmnopqrstuvwxyz012346boap
          description: The unique ID of a business overdraft application.
        account_iban:
          type: string
          example: DE13110101014386274299
          description: The IBAN of a business account.
