openapi: 3.0.3
info:
  title: SieSmart B2B API
  description: The B2B API of SieSmart application, Siemens Financial Services.
  contact:
    name: Siemens Financial Services
  version: 1.2.8
servers:
  - url: https://api-test.sfs.siemens.cloud/siesmart/b2b/v1
    description: SieSmart B2B API Testing
  - url: https://api.sfs.siemens.cloud/siesmart/b2b/v1
    description: SieSmart B2B API Production
security:
  - oAuth2ClientCredentials: []
tags:
  - name: Common
    description: "The Common APIs provide common config information you will need for creating a proposal, for example the IDs of your sales people, so you can associate a deal  with them. Also, your set up on SieSmart might include multiple offices - you will be able to get your list of offices here."
  - name: Calculation
    description: Prepare a calculation without creating a proposal object first
  - name: Introducer
    description: The Introducer APIs provide functionality that is specific to your introducer configuration on SieSmart. An example is the specific list of equipment suppliers you are allowed to use
  - name: Proposal
    description: "The most commonly used endpoints.  These allow you to create a proposal, as well as amend it or expire it"
  - name: ProposalDocument
    description: Upload and manage documents for a proposal
  - name: ProposalAssets
    description: "For most financial products, at lease one asset is required on the contract.  You can add the assets as part of the initial proposal creation, but you can also add assets after the proposal has been created using the below"
  - name: ProposalCalculation
    description: "A calculation is typically added at the time of proposal creation, but it is possible to perform further calculations before the proposal has been submitted for a credit decision"
  - name: ProposalCustomer
    description: "The customer is typically added at the time of proposal creation, but it is possible to add them (and perform other operations) after the proposal has been created"
  - name: ProposalDecision
    description: "Once a proposal has been successfully created, you are able to submit it for a credit decision.  There is also a pre-check endpoint to help you find any problems with the application"
  - name: ProposalDocumentsSigning
    description: Endpoints for E-signing of documents
  - name: ProposalLoans
    description: "For loan market products, details of the loan can only be added after proposal creation"
  - name: ProposalGuarantors
    description: Manage guarantors associated with a proposal
  - name: ProposalEquipmentSupplier
    description: Manage equipment suppliers associated with a proposal
  - name: ProposalUpgrades
    description: Create and manage upgrades for a proposal
  - name: Contract
    description: Manages contracts created from proposals.
  - name: NotificationEndpoints
    description: interface to register customer endpoint for receiving notfications regarding proposal status changes
  - name: Notifications
    description: interface to subscribe for notifications for a specific proposal
paths:
  /common/countries:
    get:
      tags:
        - Common
      summary: Returns all countries
      description: This endpoint returns all countries
      operationId: getCountries
      responses:
        "200":
          description: A list of countries
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Country"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/countries/{country-code}/regions:
    get:
      tags:
        - Common
      summary: Returns all regions for the introducers country id.
      description: This endpoint returns all regions for the provided country code.
      operationId: getRegions
      parameters:
        - $ref: "#/components/parameters/CountryCodePathParam"
      responses:
        "200":
          description: A list of regions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Region"
        "404":
          description: The country was not found
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/job-titles:
    get:
      tags:
        - Common
      summary: Get the job titles available for the current introducer country.
      description: The endpoint returns the job titles available for the current introducer country.
      operationId: getJobTitles
      responses:
        "200":
          description: A list of job titles.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/JobTitle"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/legal-forms:
    get:
      tags:
        - Common
      summary: Get the legal forms available for creation of a customer manually.
      description: The endpoint returns the legal forms available for creation of a customer manually.
      operationId: getLegalForms
      responses:
        "200":
          description: A list of legal forms.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LegalForm"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/lessors:
    get:
      tags:
        - Common
      summary: Get the lessors available for the current introducer.
      description: The endpoint returns lessors available for the current introducer.
      operationId: getLessors
      responses:
        "200":
          description: A list of lessors.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Lessor"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/loan-purposes:
    get:
      tags:
        - Common
      summary: Get the loan purposes available.
      description: The endpoint returns the loan purposes available to choose when creating a new loan.
      operationId: getLoanPurposes
      responses:
        "200":
          description: A list of loan purposes.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LoanPurpose"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/professions:
    get:
      tags:
        - Common
      summary: Get the professions available for the current introducer country.
      description: The endpoint returns professions available for the current introducer country.
      operationId: getProfessions
      responses:
        "200":
          description: A list of professions.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProfessionType"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/titles:
    get:
      tags:
        - Common
      summary: Get the person titles available for the current introducer country.
      description: The endpoint returns the person titles available for the current introducer country.
      operationId: getTitles
      responses:
        "200":
          description: A list of titles.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Title"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/offices:
    get:
      tags:
        - Common
      summary: Get manageable offices of the current introducer.
      description: This endpoint returns (manageable) offices of the introducer's sales organization.
      operationId: getOffices
      responses:
        "200":
          description: A list of offices.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Office"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/sales-persons:
    get:
      tags:
        - Common
      summary: Get the sales contacts manageable by the current user.
      description: This endpoint returns all sales contacts manageable by the current user.
      operationId: getSalesContacts
      responses:
        "200":
          description: A list of introducer's sales contacts.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/SalesContact"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/iac-codes:
    get:
      tags:
        - Common
      summary: Get the iac codes available for the selected office.
      description: The endpoint returns the iac codes available for the selected office.
      operationId: getIacCodes
      parameters:
        - name: office-id
          in: query
          required: true
          style: form
          explode: true
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: A list of iac codes.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/IacCode"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/asset-models:
    get:
      tags:
        - Common
      summary: Get the asset models available for the selected introducer.
      description: The endpoint returns the asset models available for the selected introducer.
      operationId: getAssetModels
      responses:
        "200":
          description: A list of asset models
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AssetModel"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /common/rate-cards:
    get:
      tags:
        - Common
      summary: Get the rate cards available for the selected introducer.
      description: The endpoint returns the rate cards available for the selected introducer.
      operationId: getRateCards
      responses:
        "200":
          description: A list of rate cards
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/RateCard"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /introducer/equipment-suppliers:
    get:
      tags:
        - Introducer
      summary: Get the equipment suppliers available for the introducer.
      description: The endpoint returns the equipment suppliers assigned to the introducer.
      operationId: getEquipmentSuppliersFromIntroducer
      responses:
        "200":
          description: A list of equipment supplier as businesspartner.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/BusinessPartner"
        default:
          $ref: "#/components/responses/UnexpectedError"
    post:
      tags:
        - Introducer
      summary: Add a equipment supplier to the introducer.
      description: The endpoint adds an equipment supplier (business partner) to the introducer.
      operationId: addEquipmentSupplierToIntroducer
      requestBody:
        description: Company registration number to search for matching business partners.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BusinessPartnerRef"
        required: true
      responses:
        "200":
          description: The introducer.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BusinessPartner"
        "403":
          description: Not allowed to add an equipment supplier to the introducer.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /introducers/customer-search:
    get:
      tags:
        - Introducer
      summary: Get customers matching the query parameters.
      description: This endpoint allows to execute a search query for customer Business Partners and get back search hits that match the query.
      operationId: searchCustomer
      parameters:
        - name: registration-number
          in: query
          description: Company registration number to search for matching customer business partners.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 16
            type: string
        - name: name
          in: query
          description: Name to search for matching (company) names of customer business partners.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 200
            type: string
        - name: region-id
          in: query
          description: (FR/US only) Region ID to search for matching addresses of customer business partners.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: street
          in: query
          description: (FR/US only) Street address to search for matching addresses of customer business partners.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 200
            type: string
        - name: city
          in: query
          description: City to search for matching addresses of customer business partners.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 100
            type: string
        - name: postal-code
          in: query
          description: Postal code to search for matching addresses of customer business partners.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 10
            type: string
        - name: locality
          in: query
          description: (GB/ES/Nordics only) Locality to search for matching addresses of customer business partners.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 200
            type: string
        - name: phone
          in: query
          description: Phone number to search for matching customer business partners.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 40
            type: string
        - name: website
          in: query
          description: (FR/US only) Website to search for matching customer business partners.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 255
            type: string
        - name: company-type
          in: query
          description: Finds customers that match a certain company type.
          required: false
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/CompanyTypeEnum"
        - name: country-code
          in: query
          description: (FR/US only) Country code to search for customer business partners.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 4
            type: string
      responses:
        "200":
          description: Search hits that match the query.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CustomerSearchResultItem"
        "400":
          description: Missing or invalid query parameters.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "403":
          description: In case too many results match the given query.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /calculation/config:
    get:
      tags:
        - Calculation
      summary: Returns the configuration to perform a calculation.
      description: This endpoint collects all information needed to perform a calculation and returns the result.
      operationId: getCalculationConfiguration
      parameters:
        - name: proposal-id
          in: query
          description: "The unique identifier for the proposal on which the config will be based on. If not set, the office-id param is used."
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: office-id
          in: query
          description: "The unique identifier for the office on which the config will be based on, if no proposal-id is specified. If not set, the first office of the current user is selected."
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: marketproduct-id
          in: query
          description: The unique identifier for the selected market product on which the config will be based on. If not set the default market product of the introducer will be selected.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: pricelist-id
          in: query
          description: "The unique identifier for the selected pricelist on which the config will be based on. If not set, the default pricelist is selected. NOTE: The marketproduct-id param must be set in case this param is set."
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
      responses:
        "200":
          description: The calculation config.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CalculationConfigResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /calculation:
    post:
      tags:
        - Calculation
      summary: Performs a finance calculation and returns the result.
      description: This endpoint performs a finance calculation and returns the result. The result will not be persisted.
      operationId: performCalculation
      parameters:
        - name: proposal-id
          in: query
          description: "The unique identifier for the proposal on which the new calculation will be based on. If not set, the office-id param is used."
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: office-id
          in: query
          description: "The unique identifier for the office on which the new calculation will be based on, if no proposal-id is specified. If not set, the first office of the current user is selected."
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: amount-financed
          in: query
          description: The amount financed for the calculation. This field will only be considered (and is mandatory) if no proposal-id is specified.
          required: false
          style: form
          explode: true
          schema:
            type: number
            format: double
      requestBody:
        description: The calculation request to be performed.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CalculationRequest"
      responses:
        "200":
          description: The calculation result.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CalculationResponse"
        "400":
          description: In case the calculation parameters are invalid or calculation fails.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/amend:
    put:
      tags:
        - Proposal
      summary: Amend the proposal.
      description: This endpoint resets the proposal's state for further amendments.
      operationId: amendProposal
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "204":
          description: The proposal was successfully amended.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          description: |
            The introducer has no permission to manipulate the proposal or the
            proposal is not in a state in which it can be ammended.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "404":
          description: "The proposal couldn't be amended because an object (e.g. Introducer or Proposal) \ncould not be found.\n"
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals:
    post:
      tags:
        - Proposal
      summary: Creates a new proposal.
      description: Creates a new proposal.
      operationId: createProposal
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProposalCreate"
        required: true
      responses:
        "201":
          $ref: "#/components/responses/ProposalSuccess"
        "403":
          description: In case the current user is not allowed to create a proposal or certain parts of the proposal are not allowed to be created..
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "404":
          description: In case the Office could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}:
    get:
      tags:
        - Proposal
      summary: Returns a single proposal.
      description: This endpoint returns a proposal specified by its id.
      operationId: getProposal
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          $ref: "#/components/responses/ProposalSuccess"
        "404":
          description: In case the Proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
    delete:
      tags:
        - Proposal
      summary: Expires the proposal.
      description: This endpoint expires the proposal.
      operationId: expireProposal
      parameters:
        - $ref: "#/components/parameters/OptionalProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "204":
          description: The proposal was successfully expired.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the Proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/search:
    get:
      tags:
        - Proposal
      summary: Finds proposals matching given query parameters.
      description: This endpoints returns a list of proposals which are matching the query parameters.
      operationId: findProposals
      parameters:
        - name: created-after
          in: query
          description: Returns proposals that were created after the indicated date.
          required: false
          style: form
          explode: true
          schema:
            type: string
            format: date
        - name: created-before
          in: query
          description: Returns proposals that were created before the indicated date.
          required: false
          style: form
          explode: true
          schema:
            type: string
            format: date
        - name: date-search-type-id
          in: query
          description: Returns proposals that were created before the indicated date.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: proposal-no
          in: query
          description: Returns proposals with this proposal number.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: contract-no
          in: query
          description: Returns proposals with this contract number.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 50
            type: string
        - name: original-contract-no
          in: query
          description: Returns proposals with this original contract number.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 50
            type: string
        - name: customer-reg-no
          in: query
          description: Returns proposals with this customer registration number.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 16
            type: string
        - name: customer-name
          in: query
          description: Returns proposals with this customer name.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 200
            type: string
        - name: customer-label
          in: query
          description: Returns proposals with this customer label.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 250
            type: string
        - name: equipment-supplier-name
          in: query
          description: Returns contracts with this equipment supplier name.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 250
            type: string
        - name: proposal-label
          in: query
          description: Returns propoals with this proposal label.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 30
            type: string
        - name: marketproduct-id
          in: query
          description: Returns proposals linked to the indicated market product.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: asset-desc
          in: query
          description: Returns proposals with assets that have the indicated description.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 100
            type: string
        - name: asset-serial
          in: query
          description: Returns proposals with assets that have the indicated serial number.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 60
            type: string
        - name: sales-contact-id
          in: query
          description: Returns proposals that are assigned to the sales contact indicated by this id.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: office-id
          in: query
          description: Returns proposals that are assigned to the office indicated by this id.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: workflow-status
          in: query
          description: Returns proposals that are in a certain workflow status. The allowed status ids are country dependend. Retrieve the available status ids with the search config endpoint.
          required: false
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/WorkflowStatusEnum"
        - name: document-status
          in: query
          description: Returns proposals that are in a certain document status. The allowed status ids are country dependend. Retrieve the available status ids with the search config endpoint.
          required: false
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/DocumentStatusEnum"
        - name: signature-status
          in: query
          description: Returns proposals with at least one the attached document in at least one of the given e-signature status.
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: "#/components/schemas/SignatureStatusEnum"
        - name: signature-document-types
          in: query
          description: "Returns proposals with at least one attached document associated with one of the given document types indicated by these ids, where the e-signature status of the document is one of the given e-signatures status."
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: integer
              format: int32
        - name: size
          in: query
          description: Returns the maximum count of elements as indicated by size.
          required: false
          style: form
          explode: true
          schema:
            maximum: 100
            minimum: 0
            type: integer
            format: int32
            default: 100
        - name: sort-by
          in: query
          description: Returns the elements sorted by this attribute.
          required: false
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/ProposalSearchSortByEnum"
        - name: sort-order
          in: query
          description: Returns the elements ordered either ascending or descending.
          required: false
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/SortOrderEnum"
      responses:
        "200":
          description: Returns the results of the proposal search operation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProposalSearchResult"
            application/vnd.sfs.siesmart.ms-excel+json:
              schema:
                $ref: "#/components/schemas/FileBasedPaginatedResponse"
        "403":
          description: "In case of missing user permission: PROPOSAL_SEARCH for all requests  or PROPOSAL_CREATE_EXCEL_EXPORT for MediaType Excel."
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/assets:
    get:
      tags:
        - ProposalAssets
      summary: Returns all assets of the proposal.
      description: This endpoint returns the assets associated to the proposal.
      operationId: getAssets
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: The proposal's assets.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Asset"
        "403":
          description: In case the proposal can not have assets.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "404":
          description: In case the proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
    post:
      tags:
        - ProposalAssets
      summary: Adds a new asset to the proposal.
      description: This endpoint adds a new asset to the proposal and returns the created asset.
      operationId: createAsset
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Asset"
        required: true
      responses:
        "201":
          description: The created asset.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Asset"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/assets/{asset-id}:
    put:
      tags:
        - ProposalAssets
      summary: Updates the asset of the proposal.
      description: This endpoint updates an asset of the given proposal and returns the updated asset.All changes (including omissions) provided will overide existing values.
      operationId: updateAsset
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
        - $ref: "#/components/parameters/AssetIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Asset"
        required: true
      responses:
        "200":
          description: The updated asset.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Asset"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the proposal or asset could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
    delete:
      tags:
        - ProposalAssets
      summary: Deletes and removes the asset from the proposal.
      description: This endpoint deletes an asset of the given proposal.
      operationId: deleteAsset
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
        - $ref: "#/components/parameters/AssetIdPathParam"
      responses:
        "204":
          description: Successful deletion.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the proposal or asset could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/calculation:
    post:
      tags:
        - ProposalCalculation
      summary: "Performs a finance calculation, adds it to the proposal and returns the updated proposal."
      description: "This endpoint performs a finance calculation, adds it to the proposal and returns the updated proposal."
      operationId: setCalculation
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        description: The calculation request to be performed.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CalculationRequest"
      responses:
        "200":
          description: Updated proposal including calculation and calculation config.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProposalCalculationResponse"
        "400":
          description: In case the calculation parameters are invalid or calculation fails.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the Proposal or Calculation could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/customer:
    post:
      tags:
        - ProposalCustomer
      summary: Sets the proposal's customer.
      description: This endpoint sets the proposal's associated customer and returns the new state.
      operationId: applyCustomer
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BusinessPartnerRef"
        required: true
      responses:
        "204":
          description: In case the customer is set successfully.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "409":
          description: In case a customer is already set on this proposal.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        "503":
          description: In case an external service is not reachable (e.g. creditbureau)
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
    patch:
      tags:
        - ProposalCustomer
      summary: Updates the proposal's customer.
      description: "This endpoint updates the proposal's customer and returns the new state. NOTE: It's only possible to update the introducerCustomerLabel value. Other parts are excluded from update."
      operationId: updateCustomer
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProposalCustomer"
        required: true
      responses:
        "200":
          $ref: "#/components/responses/ProposalSuccess"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the proposal or customer could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/customer/invoice-address:
    put:
      tags:
        - ProposalCustomer
      summary: Set the customer invoice address.
      description: This endpoint set a customer's business partner address as the customer's invoice address and returns the new state.
      operationId: setCustomerInvoiceAddress
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        description: ID of the address to be set as the invoice address.
        content:
          application/json:
            schema:
              type: integer
              format: int32
        required: true
      responses:
        "204":
          description: The invoice address was successfully set.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: "In case the proposal, customer or address could not be found."
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
    post:
      tags:
        - ProposalCustomer
      summary: Creates a new customer invoice address.
      description: This endpoint creates a new address as the customer's invoice address and returns the new state.
      operationId: createCustomerInvoiceAddress
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        description: The address data to be applied as the invoice address.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Address"
        required: true
      responses:
        "204":
          description: The invoice address was successfully created.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the proposal or customer could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/customer/addresses:
    get:
      tags:
        - ProposalCustomer
      summary: Gets proposal customer's addresses.
      description: This endpoint returns the list of addresses of the proposal's customer.
      operationId: getCustomerAddresses
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: A list of addresses of the proposal customer.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Address"
        "404":
          description: In case the proposal or customer could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/customer/boardmembers:
    get:
      tags:
        - ProposalCustomer
      summary: Gets proposal customer's boardmembers.
      description: This endpoint returns the list of boardmembers of the proposal's customer.
      operationId: getCustomerBoardmembers
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: A list of boardmembers.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Boardmember"
        "404":
          description: In case the proposal or customer could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/customer/invoice-contact:
    put:
      tags:
        - ProposalCustomer
      summary: Updates the proposal's customer invoice contact.
      description: This endpoint updates the proposal's customer invoice contact and returns the new state.
      operationId: updateCustomerInvoiceContact
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        description: The updated invoice contact data.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CustomerInvoiceContact"
        required: true
      responses:
        "204":
          description: update invoice contact was successfully.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the proposal or customer could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/customer/delivery-address:
    put:
      tags:
        - ProposalCustomer
      summary: Set the customer delivery address.
      description: This endpoint set a customer's business partner address as the customer's delivery address and returns the new state.
      operationId: setCustomerDeliveryAddress
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        description: ID of the address to be set as the delivery address.
        content:
          application/json:
            schema:
              type: integer
              format: int32
        required: true
      responses:
        "204":
          description: The delivery address was successfully set.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: "In case the proposal, customer or address could not be found."
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
    post:
      tags:
        - ProposalCustomer
      summary: Creates a new customer delivery address.
      description: This endpoint creates a new address as the customer's delivery address and returns the new state.
      operationId: createCustomerDeliveryAddress
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        description: The address data to be applied as the delivery address.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Address"
        required: true
      responses:
        "204":
          description: The delivery address was successfully created.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the proposal or customer could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/customer/bank-account:
    put:
      tags:
        - ProposalCustomer
      summary: Set the customer bank account.
      description: This endpoint set a customer's business partner bank account and returns the new state.
      operationId: setCustomerBankAccount
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        description: The bank account data to be applied.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BankAccount"
        required: true
      responses:
        "204":
          description: The bank account was successfully set.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the proposal or customer could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/decision/request:
    post:
      tags:
        - ProposalDecision
      summary: Request credit decision.
      description: This endpoint requests a credit decision and returns the new proposal status
      operationId: requestCreditDecision
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DecisionRequest"
      responses:
        "200":
          $ref: "#/components/responses/ProposalSuccess"
        "400":
          description: In case the current status of the proposal does not allow requesting a credit decision.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "404":
          description: In case the Proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
    delete:
      tags:
        - ProposalDecision
      summary: Cancel the credit decision request.
      description: This endpoint tries to cancel the current decision request and returns the new proposal status
      operationId: cancelDecisionRequest
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          $ref: "#/components/responses/ProposalSuccess"
        "400":
          description: In case the current status of the proposal does not allow requesting a credit decision .
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "404":
          description: In case the Proposal could not be found or there is no current credit decision.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/decision/pre-check:
    get:
      tags:
        - ProposalDecision
      summary: Check the pre-condition whether it's allowed to create a decision request.
      description: This endpoint checks the pre-conditions to be able to create a decision request for this proposal.
      operationId: checkPreconditionsForDecision
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: Result of the pre-check.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DecisionPrecheckResult"
        "404":
          description: In case the Proposal could not be found or there is no current credit decision.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/decision/decision-document/download:
    get:
      tags:
        - ProposalDecision
      summary: Download the decision document.
      description: This endpoint downloads the decision document for the proposal.
      operationId: downloadCreditDecisionDocument
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: The decision document as PDF.
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        "404":
          description: In case the Proposal could not be found or there is no current credit decision.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/documents/document-types:
    get:
      tags:
        - ProposalDocument
      summary: Get the document types available for the selected proposal.
      description: The endpoint returns the document types available for the selected proposal.
      operationId: getDocumentTypes
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: A list of document types.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/DocumentType"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/documents/download:
    post:
      tags:
        - ProposalDocument
      summary: Download selected documents of the proposal.
      description: The endpoint allows downloading the selected documents of the proposal.
      operationId: downloadDocument
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DownloadRequest"
        required: true
      responses:
        "200":
          description: The requested document(s) as PDF.
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        "404":
          description: In case the proposal or document could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "503":
          description: In case the document(s) can not be created and downloaded.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/documents:
    get:
      tags:
        - ProposalDocument
      summary: Get the documents available for a proposal.
      description: The endpoint returns documents for a proposal.
      operationId: getDocuments
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: A list of documents.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProposalDocument"
        "404":
          description: In case the proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/documents/uploaded-documents:
    get:
      tags:
        - ProposalDocument
      summary: Get the uploaded documents available for a proposal.
      description: The endpoint returns uploaded documents for a proposal.
      operationId: getUploadedDocuments
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: A list of documents.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProposalDocument"
        "404":
          description: In case the proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
    post:
      tags:
        - ProposalDocument
      summary: Upload document to DMS.
      description: The endpoint takes a document to upload to the DMS.
      operationId: uploadDocument
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DocumentUpload"
      responses:
        "200":
          description: Document was succesfully uploaded.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "404":
          description: In case the proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "422":
          description: In case the uploaded filetype is not supported.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "503":
          description: In case the offer document could not be uploaded.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/documents/signing/download:
    post:
      tags:
        - ProposalDocumentsSigning
      summary: Download the signed document.
      description: The endpoint allows downloading the signed document.
      operationId: downloadSignedDocument
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DocumentIdentifier"
        required: true
      responses:
        "200":
          description: The requested document as PDF.
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        "403":
          description: In case it is not allowed to download signed document.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "404":
          description: In case the proposal or document could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "503":
          description: In case the document can not be downloaded.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/documents/signing/delete:
    post:
      tags:
        - ProposalDocumentsSigning
      summary: Delete pending signing request.
      description: The endpoint allows to delete a document's pending signing request.
      operationId: deleteSigningRequest
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DocumentIdentifier"
        required: true
      responses:
        "204":
          description: The signing requested was deleted successfully.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          description: In case it is not allowed to delete the signing request of this document.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "404":
          description: In case the proposal or document could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/documents/signing/refresh:
    post:
      tags:
        - ProposalDocumentsSigning
      summary: Refresh and return the signing request's status.
      description: The endpoint allows to refresh the status of a document's signing request.
      operationId: refreshSigningRequest
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DocumentIdentifier"
        required: true
      responses:
        "200":
          description: The document with updated signing request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProposalDocument"
        "403":
          description: In case it is not allowed to refresh this signing request's status.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "404":
          description: In case the proposal or document could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        "503":
          description: In case the signing request's status can not be refreshed.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/documents/signing:
    post:
      tags:
        - ProposalDocumentsSigning
      summary: Request a signature for the given document.
      description: The endpoint initiates a signature request for the given document.
      operationId: requestSignature
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SendSigningRequest"
        required: true
      responses:
        "200":
          description: The document updated with the created signing request.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProposalDocument"
        "404":
          description: In case the proposal or document could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        "422":
          description: conditions were not met for the signing request.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "503":
          description: In case the signature request can not be created.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/loans:
    get:
      tags:
        - ProposalLoans
      summary: Get the loans available for this proposal.
      description: The endpoint returns the loans of this proposal.
      operationId: getLoans
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: A list of loans.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Loan"
        "404":
          description: In case the proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
    post:
      tags:
        - ProposalLoans
      summary: Adds a new loan to the proposal.
      description: This endpoint adds a new loan to the proposal and returns the new state.
      operationId: createLoan
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        description: The loan data to be applied
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Loan"
        required: true
      responses:
        "201":
          description: The created loan.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Loan"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the Proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/loans/{loan-id}:
    put:
      tags:
        - ProposalLoans
      summary: Updates the loan of the proposal.
      description: This endpoint updates a loan of the given proposal and returns the new state.All changes (including omissions) provided will overide existing values.
      operationId: updateLoan
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
        - $ref: "#/components/parameters/LoanIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Loan"
        required: true
      responses:
        "200":
          description: The updated loan.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Loan"
        "403":
          description: In case the proposal can no longer be updated.
        "404":
          description: In case the Proposal or Loan could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
    delete:
      tags:
        - ProposalLoans
      summary: Removes the loan from the proposal.
      description: This endpoint deletes a loan of the given proposal and returns the new state.
      operationId: deleteLoan
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
        - $ref: "#/components/parameters/LoanIdPathParam"
      responses:
        "204":
          description: Successful deletion.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the Proposal or Loan could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/upgrades:
    get:
      tags:
        - ProposalUpgrades
      summary: Get the upgrade agreements available for this proposal.
      description: The endpoint returns the upgrade agreements of this proposal.
      operationId: getUpgrades
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: A list of upgrade agreements.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Upgrade"
        "404":
          description: In case the proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
    post:
      tags:
        - ProposalUpgrades
      summary: Adds a new upgrade agreement to the proposal.
      description: This endpoint adds a new upgrade agreement to the proposal and returns the new state.
      operationId: createUpgrade
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        description: The upgrade data to be applied
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Upgrade"
        required: true
      responses:
        "201":
          description: The created upgrade.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Upgrade"
        "400":
          description: In case the upgrade could not be created.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the Proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/upgrades/{upgrade-id}:
    delete:
      tags:
        - ProposalUpgrades
      summary: Removes the upgrade agreement from the proposal.
      description: This endpoint deletes an upgrade agreement of the given proposal and returns the new state.
      operationId: deleteUpgrade
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
        - $ref: "#/components/parameters/UpgradeIdPathParam"
      responses:
        "204":
          description: Successful deletion.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the Proposal or Upgrade could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/equipment-suppliers:
    get:
      tags:
        - ProposalEquipmentSupplier
      summary: Get all assigned equipment suppliers.
      description: This endpoint returns all equipment suppliers assigned to the proposal.
      operationId: getEquipmentSuppliersFromProposal
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: The list of all assigned equipment suppliers
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/BusinessPartnerRef"
        "404":
          description: In case the proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
    post:
      tags:
        - ProposalEquipmentSupplier
      summary: Adds a new equipment supplier to the proposal.
      description: This endpoint adds a new equipment supplier to the proposal and returns the new state.
      operationId: addEquipmentSupplierToProposal
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        description: ID of the businesspartner to be set as the equipment supplier.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BusinessPartnerRef"
        required: true
      responses:
        "201":
          description: The equipment supplier.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BusinessPartnerRef"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the Proposal or Business Partner could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/equipment-suppliers/{equipment-supplier-ref}:
    delete:
      tags:
        - ProposalEquipmentSupplier
      summary: Remove the equipment supplier.
      description: This endpoint removes a equipment supplier from the proposal.
      operationId: removeEquipmentSupplierFromProposal
      parameters:
        - $ref: "#/components/parameters/ProposalIfMatchHeader"
        - $ref: "#/components/parameters/ProposalIdPathParam"
        - name: equipment-supplier-ref
          in: path
          description: The businesspartner registration number of the equipment supplier which should be removed from the proposal
          required: true
          style: simple
          explode: false
          schema:
            maxLength: 16
            type: string
      responses:
        "204":
          description: Successful deletion.
          headers:
            ETag:
              $ref: "#/components/headers/ProposalETagHeader"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the Proposal or EquipmentSupplierEntity could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "412":
          $ref: "#/components/responses/ProposalPreconditionFailed"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/guarantors/personal:
    post:
      tags:
        - ProposalGuarantors
      summary: Creates a new manual personal guarantor.
      description: This endpoint creates a new personal guarantor for this proposal.
      operationId: createPersonalGuarantorManually
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PartnerCreate"
        required: true
      responses:
        "200":
          description: The added guarantor
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Guarantor"
        "404":
          description: In case the Proposal or Guarantor could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "409":
          description: In case guarantor is already added to the proposal with the provided guarantee type.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/guarantors/personal/{guarantor-id}:
    post:
      tags:
        - ProposalGuarantors
      summary: Apply existing personal guarantor.
      description: This endpoint applies an already existing personal guarantor to this proposal. The endpoint takes the businesspartner id of the existing candidates as input and returns the created guarantor object. The returned guarantor id is needed for further operations on this guarantor.
      operationId: applyAvailablePersonalGuarantor
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
        - $ref: "#/components/parameters/GuarantorIdPathParam"
      responses:
        "200":
          description: The personal guarantor.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Guarantor"
        "403":
          $ref: "#/components/responses/ProposalModificationNotAllowed"
        "404":
          description: In case the proposal or asset could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
    delete:
      tags:
        - ProposalGuarantors
      summary: Remove a personal guarantor.
      description: This endpoint removes the corporate guarantors from this proposal.
      operationId: removePersonalGuarantor
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
        - $ref: "#/components/parameters/GuarantorIdPathParam"
      responses:
        "204":
          description: Successful deletion.
        "404":
          description: In case the Proposal or guarantor could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
    patch:
      tags:
        - ProposalGuarantors
      summary: Update guarantor.
      description: This endpoint updates a guarantor and returns it.
      operationId: updateGuarantor
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
        - $ref: "#/components/parameters/GuarantorIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              properties:
                ficoScore:
                  type: integer
                  description: The FICO score of the guarantor.
                  format: int32
      responses:
        "200":
          description: The updated guarantor
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Guarantor"
        "404":
          description: In case the Proposal or Guarantor could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/guarantors/personal/available:
    get:
      tags:
        - ProposalGuarantors
      summary: Returns the available personal guarantors.
      description: This endpoint returns the available personal guarantors of this customer.
      operationId: getAvailablePersonalGuarantors
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: The list of all available personal guarantors.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Partner"
        "404":
          description: In case the Proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/guarantors/corporate:
    post:
      tags:
        - ProposalGuarantors
      summary: Adds a new corporate guarantor
      description: This endpoint adds a new corporate guarantor to this proposal.
      operationId: addCorporateGuarantor
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CorporateGuarantorCreate"
      responses:
        "200":
          description: The added guarantor
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Guarantor"
        "404":
          description: In case the Proposal or Guarantor could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        "409":
          description: In case guarantor is already added to the proposal with the provided guarantee type.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/guarantors/corporate/{guarantor-id}:
    delete:
      tags:
        - ProposalGuarantors
      summary: Remove a corporate guarantor.
      description: This endpoint removes the corporate guarantors from this proposal.
      operationId: removeCorporateGuarantor
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
        - $ref: "#/components/parameters/GuarantorIdPathParam"
      responses:
        "204":
          description: Successful deletion.
        "404":
          description: In case the Proposal or guarantor could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /proposals/{proposal-id}/guarantors:
    get:
      tags:
        - ProposalGuarantors
      summary: Returns the guarantors.
      description: This endpoint returns the guarantors set to this proposal.
      operationId: getGuarantors
      parameters:
        - $ref: "#/components/parameters/ProposalIdPathParam"
      responses:
        "200":
          description: The list of all assigned guarantors.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Guarantor"
        "404":
          description: In case the Proposal could not be found.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemResponse"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /contracts/search:
    get:
      tags:
        - Contract
      summary: Returns contracts matching given query parameters.
      description: his endpoints returns a list of contracts which are matching the query parameters.
      operationId: findContracts
      parameters:
        - name: created-after
          in: query
          description: Returns contracts that were created after the indicated date.
          required: false
          style: form
          explode: true
          schema:
            type: string
            format: date
        - name: created-before
          in: query
          description: Returns contracts that were created before the indicated date.
          required: false
          style: form
          explode: true
          schema:
            type: string
            format: date
        - name: proposal-no
          in: query
          description: Returns contracts with this proposal number.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 50
            type: string
        - name: contract-no
          in: query
          description: Returns contracts with this contract number.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 50
            type: string
        - name: customer-reg-no
          in: query
          description: Returns contracts with this customer registration number.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 16
            type: string
        - name: customer-name
          in: query
          description: Returns contracts with this customer name.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 200
            type: string
        - name: customer-label
          in: query
          description: Returns contracts with this customer label.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 250
            type: string
        - name: equipment-supplier-name
          in: query
          description: Returns contracts with this equipment supplier name.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 250
            type: string
        - name: marketproduct-id
          in: query
          description: Returns contracts linked to the indicated market product.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: min-deal-value
          in: query
          description: Returns contracts that have deal value higher than the specified.
          required: false
          style: form
          explode: true
          schema:
            type: number
            format: double
        - name: max-deal-value
          in: query
          description: Returns contracts that have deal value higher than the specified.
          required: false
          style: form
          explode: true
          schema:
            type: number
            format: double
        - name: asset-desc
          in: query
          description: Returns contracts with assets that have the indicated description.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 100
            type: string
        - name: asset-serial
          in: query
          description: Returns contracts with assets that have the indicated serial number.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 60
            type: string
        - name: sales-contact-id
          in: query
          description: Returns contracts that are assigned to the sales contact indicated by this id.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: office-id
          in: query
          description: Returns contracts that are assigned to the office indicated by this id.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: portfolio-status
          in: query
          description: Returns contracts that fulfill this portfolio status filter criteria.
          required: false
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/PortfolioStatus"
        - name: filter-term-notice
          in: query
          description: Returns contracts that has/hasnt term notice.
          required: false
          style: form
          explode: true
          schema:
            type: boolean
        - name: start
          in: query
          description: Returns the elements starting with the indicated element (zero based).
          required: false
          style: form
          explode: true
          schema:
            minimum: 0
            type: integer
            format: int32
            default: 0
        - name: size
          in: query
          description: Returns the maximum count of elements as indicated by size.
          required: false
          style: form
          explode: true
          schema:
            maximum: 100
            minimum: 0
            type: integer
            format: int32
            default: 100
        - name: sort-by
          in: query
          description: Returns the elements sorted by this attribute.
          required: false
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/ContractSearchSortBy"
        - name: sort-order
          in: query
          description: Returns the elements ordered either ascending or descending.
          required: false
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/SortOrderEnum"
      responses:
        "200":
          description: Returns the results of the contract search operation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractSearchResult"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /contracts/{contract-id}:
    get:
      tags:
        - Contract
      summary: Returns a single contract.
      description: This endpoint returns a contract specified by its id.
      operationId: getContract
      parameters:
        - $ref: "#/components/parameters/ContractIdPathParam"
      responses:
        "200":
          description: The contract co-term proposal reference.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Contract"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /contracts/{contract-id}/business-partners:
    get:
      tags:
        - Contract
      summary: Returns the contract business partners.
      description: This endpoint returns the business partners related to the contract specified by its id.
      operationId: getContractBusinessPartners
      parameters:
        - $ref: "#/components/parameters/ContractIdPathParam"
      responses:
        "200":
          description: The list of contract's business partners.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ContractBusinessPartner"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /contracts/{contract-id}/assets:
    get:
      tags:
        - Contract
      summary: Returns the contract assets.
      description: This endpoint returns the assets related to the contract specified by its id.
      operationId: getContractAssets
      parameters:
        - $ref: "#/components/parameters/ContractIdPathParam"
      responses:
        "200":
          description: The list of contract's assets.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ContractAsset"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /contracts/{contract-id}/charges:
    get:
      tags:
        - Contract
      summary: Returns the contract charges.
      description: This endpoint returns the charges related to the contract specified by its id.
      operationId: getContractCharges
      parameters:
        - $ref: "#/components/parameters/ContractIdPathParam"
      responses:
        "200":
          description: The list of contract's charges.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ContractCharge"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /contracts/{contract-id}/rentals:
    get:
      tags:
        - Contract
      summary: Returns the contract rentals.
      description: This endpoint returns the rentals related to the contract specified by its id.
      operationId: getContractRentals
      parameters:
        - $ref: "#/components/parameters/ContractIdPathParam"
      responses:
        "200":
          description: The list of contract's rentals.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ContractRental"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /contracts/{contract-id}/securities:
    get:
      tags:
        - Contract
      summary: Returns the contract securities.
      description: This endpoint returns the securities related to the contract specified by its id.
      operationId: getContractSecurities
      parameters:
        - $ref: "#/components/parameters/ContractIdPathParam"
      responses:
        "200":
          description: The list of contract's securities.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ContractSecurity"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /contracts/{contract-id}/co-term:
    post:
      tags:
        - Contract
      summary: Create contract co-term.
      description: This endpoint creates a co-term proposal of the contract specified by its id.
      operationId: createContractCoterm
      parameters:
        - $ref: "#/components/parameters/ContractIdPathParam"
      responses:
        "200":
          description: The contract co-term proposal reference.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractCoterm"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /contracts/{contract-id}/upgrade:
    post:
      tags:
        - Contract
      summary: Create contract upgrade.
      description: This endpoint creates an upgrade proposal of the contract specified by its id.
      operationId: createContractUpgrade
      parameters:
        - $ref: "#/components/parameters/ContractIdPathParam"
      responses:
        "200":
          description: The contract upgrade proposal reference.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContractUpgrade"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /contracts/{contract-id}/upgrade-quotes:
    get:
      tags:
        - Contract
      summary: Returns contract upgrade quotes.
      description: This endpoint returns the upgrade quotes related to the contract specified by its id.
      operationId: getContractUpgradeQuotes
      parameters:
        - $ref: "#/components/parameters/ContractIdPathParam"
      responses:
        "200":
          description: Contract upgrade quotes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ContractUpgradeQuote"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        default:
          $ref: "#/components/responses/UnexpectedError"
    put:
      tags:
        - Contract
      summary: Fetches contract upgrade quotes.
      description: This endpoint fetches new upgrade quotes for the contract specified by its id and returns the updated list of quotes.
      operationId: fetchContractUpgradeQuotes
      parameters:
        - $ref: "#/components/parameters/ContractIdPathParam"
      responses:
        "200":
          description: Contract upgrade quotes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ContractUpgradeQuote"
        "403":
          $ref: "#/components/responses/ForbiddenError"
        "404":
          $ref: "#/components/responses/NotFoundError"
        default:
          $ref: "#/components/responses/UnexpectedError"
  /notifications/endpoint:
    get:
      tags:
        - NotificationEndpoints
      summary: Get customer notification endpoint URL.
      description: |
        Get the registered notification endpoint URL for the customer per introducer.
        The URL is used by the B2B API to send notifications to the customer via REST/JSON.
        # Notifications are events which inform the customer about e.g. proposal status changes.
        To receive proposal change events, the customer must subscribe to the event for each proposal individually.
      operationId: getEndpoint
      responses:
        "200":
          description: notification endpoint retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Endpoint"
        "404":
          description: no endpoint registered
    put:
      tags:
        - NotificationEndpoints
      summary: Update customer notification endpoint URL.
      description: Register a new notification endpoint URL for the customer. All subscribed events of the introducer will stay active.
      operationId: updateEndpoint
      requestBody:
        description: Register URL of the customer notification endpoint.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Endpoint"
      responses:
        "204":
          description: endpoint updated successfully
        "404":
          description: no endpoint registered
    post:
      tags:
        - NotificationEndpoints
      summary: Register customer notification endpoint URL.
      description: |
        Register a new notification endpoint URL for the customer per introducer.
        The URL is used by the B2B API to send notifications to the customer via REST/JSON.
        # Notifications are events which inform the customer about e.g. proposal status changes.
        To receive proposal change events, the customer must subscribe to the event for each proposal individually.
        The customer must provide the customer notification API as described in the corresponding openapi document.
      operationId: registerEndpoint
      requestBody:
        description: Register URL of the customer notification endpoint.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Endpoint"
      responses:
        "204":
          description: notification request created successfully
        "403":
          description: notification request already exists
    delete:
      tags:
        - NotificationEndpoints
      summary: Remove registration of customer notification endpoint URL.
      description: |
        The endpoint will be removed from the server. All subscribed events by the introducer will be removed.
        The URL registered before will never be called in the future.
      operationId: removeEndpoint
      responses:
        "204":
          description: notification endpoint removed successfully
        "404":
          description: no endpoint registered
  /notifications:
    post:
      tags:
        - Notifications
      summary: Subscribe for notification about events for a proposal.
      description: Create a subscription for events regarding specified proposal
      operationId: createNotificationSubscription
      parameters:
        - name: proposal-id
          in: query
          description: The unique identifier for the proposal.
          required: true
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: event-type
          in: query
          description: event type identifier
          required: true
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/EventTypeEnum"
      responses:
        "201":
          description: In case the notification subscription was successfully created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotificationResponse"
        "403":
          description: no endpoint registered or no permission to subscribe to event for specified proposal
        "404":
          description: proposal not found
  /notifications/{notification-uuid}:
    get:
      tags:
        - Notifications
      summary: Get proposal data belonging to a notification subscription
      description: Get proposal data belonging to a notification subscription for the specified proposal id
      operationId: getNotificationSubscriptionData
      parameters:
        - name: notification-uuid
          in: path
          description: The uuid of the notification subscription for the proposal.
          required: true
          style: simple
          explode: false
          schema:
            pattern: "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$"
            type: string
      responses:
        "200":
          description: |
            Notification data retrieved, data will be deleted on server.
            Response can be a generic json or proposal data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotificationDataResponse"
        "403":
          description: no endpoint registered or no permission to delete notification subscription for proposal
        "404":
          description: notification subscription not found
    delete:
      tags:
        - Notifications
      summary: delete notification subscription for a specific proposal
      description: Delete notification subscription for events regarding specified proposal
      operationId: deleteNotificationSubscription
      parameters:
        - name: notification-uuid
          in: path
          description: The uuid of the notification subscription for the proposal.
          required: true
          style: simple
          explode: false
          schema:
            pattern: "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$"
            type: string
      responses:
        "204":
          description: notification subscription deleted successfully
        "403":
          description: no endpoint registered or no permission to delete notification subscription for proposal
        "404":
          description: notification subscription not found
components:
  schemas:
    Problem:
      type: object
      properties:
        type:
          type: string
          description: A URI reference that uniquely identifies the problem type.
          format: uri-reference
          example: /problem/connection-error
          default: about:blank
        title:
          type: string
          description: A short summary of the problem type.
          example: Service Unavailable
        status:
          maximum: 600
          exclusiveMaximum: true
          minimum: 100
          type: integer
          description: The HTTP status code generated by the server.
          format: int32
          example: 503
        detail:
          type: string
          description: A human readable explanation of the problem.
          example: Connection to database timed out
        instance:
          type: string
          description: A URI reference that identifies the specific occurrence of the problem.
          format: uri-reference
          example: urn:uuid:58942337-1a55-4ca4-bcda-2a3a360b161a
      description: "This specification is based on \nhttps://github.com/zalando/restful-api-guidelines/blob/main/models/problem-1.0.1.yaml\n"
    ProblemResponse:
      required:
        - errors
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: "#/components/schemas/Problem"
      description: Represents a response reporting a problem.
    Country:
      required:
        - code
        - hasRegions
        - name
      type: object
      properties:
        code:
          maxLength: 4
          type: string
          description: The countries code
        name:
          maxLength: 255
          type: string
          description: The countries name
        hasRegions:
          type: boolean
          description: Flag whether the country uses local regions
      description: A Country entity.
    Region:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: integer
          description: The regions id
          format: int32
        name:
          maxLength: 50
          type: string
          description: The regions name
      description: Represents a Region.
    JobTitle:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        isCustom:
          type: boolean
      description: "Job title of the signatory. The Nordics are using the jobTitleText field instead of this field, so updates are not allowed to this field for these countries."
    LegalForm:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          description: The id of this legal form.
          format: int32
        name:
          maxLength: 50
          type: string
          description: The name of this legal form.
        code:
          maxLength: 10
          type: string
          description: The code of this legal form.
        partnership:
          type: boolean
          description: Indicates whether this legal form is a partnership.
    Lessor:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        siemensLessor:
          type: boolean
      description: Represents a lessor.
    LoanPurpose:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
    ProfessionType:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          description: The id of this profession.
          format: int32
        name:
          type: string
          description: The name of the profession.
      description: A person's profession.
    Title:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          description: The id of this title.
          format: int32
        name:
          maxLength: 50
          type: string
          description: The name of the title.
      description: A person's title.
    Address:
      required:
        - city
        - country
      type: object
      properties:
        id:
          type: integer
          description: The ID of this Address.
          format: int32
          example: 52533
        address1:
          maxLength: 100
          minLength: 0
          type: string
          description: Address line 1 of this Address.
          example: Main Street
        address2:
          maxLength: 100
          minLength: 0
          type: string
          description: Address line 2 of this Address.
          nullable: true
        houseNumber:
          maxLength: 35
          minLength: 0
          type: string
          description: House number of this address.
          example: "7"
        houseName:
          maxLength: 26
          minLength: 0
          type: string
          description: House name of this address.
          example: The Manor
        flatName:
          maxLength: 50
          minLength: 0
          type: string
          description: Flat name of this address.
          example: Unit 4
        city:
          maxLength: 30
          minLength: 1
          type: string
          example: London
        postalCode:
          maxLength: 10
          minLength: 0
          type: string
          example: "52236"
        phoneNumber:
          maxLength: 30
          minLength: 0
          type: string
          nullable: true
          example: +415877878
        mobilePhoneNumber:
          maxLength: 30
          minLength: 0
          type: string
          description: Mobile-Phonenumber of the address
          nullable: true
          example: +415877878
        email:
          maxLength: 200
          minLength: 0
          pattern: "^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$"
          type: string
          description: A valid e-mail.
          nullable: true
          example: jon.doe@xyz.com
        country:
          $ref: "#/components/schemas/Country"
        region:
          $ref: "#/components/schemas/Region"
      description: Represents an address (e.g. a postal address of a Business Partner)
    Office:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          description: The id of this Office.
          format: int32
        name:
          type: string
          description: The name of this Office.
        postalAddress:
          $ref: "#/components/schemas/Address"
      description: A Introducer Office.
    SalesContactRole:
      required:
        - alias
        - name
      type: object
      properties:
        alias:
          type: string
          description: The alias of this role.
        name:
          type: string
          description: The name of this role.
      description: Represents a role of a sales contact.
    SalesContact:
      required:
        - email
        - firstName
        - lastName
        - role
      type: object
      properties:
        id:
          type: integer
          description: The id of this sales contact.
          format: int32
        firstName:
          type: string
          description: The first name of this sales contact.
        lastName:
          type: string
          description: The last name of this sales contact.
        title:
          $ref: "#/components/schemas/Title"
        email:
          type: string
          description: The email of this sales contact. Not updateable.
        phone:
          type: string
          description: The phone of this sales contact.
        cellPhone:
          type: string
          description: The cell phone of this sales contact.
        fax:
          type: string
          description: The fax number of this sales contact.
        role:
          $ref: "#/components/schemas/SalesContactRole"
        blocked:
          type: boolean
          description: "A flag indicating if this sales contact is blocked for new business. Deprecated: Will be removed in future versions."
          deprecated: true
        blockedReason:
          type: string
          description: "The reason why this sales contact is blocked for new business. Deprecated: Will be removed in future versions."
          deprecated: true
        loginPresent:
          type: boolean
          description: A flag indication if a login is available for this sales contact.
        officeIds:
          type: array
          description: A list of office ids this sales contact is assigned to.
          items:
            type: integer
            description: A list of office ids this sales contact is assigned to.
            format: int32
      description: Represents a sales contact connected to an introducer.
    IacCode:
      type: object
      properties:
        iacCode:
          type: string
        name:
          type: string
      description: Represents an iacCode.
    AssetModel:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
    MarketProduct:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        loanOrHirePurchaseInNordics:
          type: boolean
        hpAnnuityOrStraightAmortization:
          type: boolean
        hirePurchaseInNordics:
          type: boolean
      description: The market product.
    PaymentPeriodEnum:
      type: string
      description: payment periods of a proposal
      enum:
        - MONTHLY
        - BIMONTHLY
        - QUARTER
        - TRIANNUALLY
        - HALFANNUALLY
        - ANNUALLY
    RateCard:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        pricelistName:
          type: string
        marketProduct:
          $ref: "#/components/schemas/MarketProduct"
        residualValue:
          type: number
          format: double
        paymentPeriod:
          $ref: "#/components/schemas/PaymentPeriodEnum"
        matrixHeader:
          type: array
          items:
            type: string
        matrixBody:
          type: array
          items:
            type: array
            items:
              type: string
    BusinessPartner:
      required:
        - id
        - name
        - officialAddress
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          maxLength: 200
          type: string
        registrationNumber:
          maxLength: 16
          type: string
          nullable: true
        officialAddress:
          $ref: "#/components/schemas/Address"
        rulesForSigning:
          maxLength: 4000
          type: string
          nullable: true
        legalForm:
          $ref: "#/components/schemas/LegalForm"
        businessBlocked:
          type: boolean
      description: Represents a SieSmart Business Partner.
      nullable: true
    CompanyTypeEnum:
      type: string
      description: The companies type.
      enum:
        - LIMITED
        - NONLIMITED
    BusinessPartnerRef:
      required:
        - registrationNumber
        - sourceCountryCode
      type: object
      properties:
        registrationNumber:
          maxLength: 16
          type: string
          description: The company registration number.
        companyType:
          $ref: "#/components/schemas/CompanyTypeEnum"
        sourceCountryCode:
          maxLength: 4
          type: string
          description: The country from businesspartners official address.
      description: External reference identifying a business partner outside of SieSmart.
    CustomerSearchResultItem:
      type: object
      properties:
        businessPartnerRef:
          $ref: "#/components/schemas/BusinessPartnerRef"
        name:
          type: string
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        postalCode:
          type: string
        countryCode:
          type: string
      description: A customer found due to a search.
    PriceList:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
      description: The pricelist.
    PaymentMethod:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
      description: The payment method to be used.
    Currency:
      type: object
      properties:
        currencyCode:
          type: string
        format:
          type: string
        fractionDigits:
          type: integer
          format: int32
      description: A currency.
    InterestRateConfig:
      type: object
      properties:
        min:
          type: number
          format: double
        max:
          type: number
          format: double
        fractionDigits:
          type: integer
          format: int32
    TariffConfig:
      type: object
      properties:
        fractionDigits:
          type: integer
          format: int32
        fractionDigitsNordics:
          type: integer
          format: int32
    MinMaxConfig:
      type: object
      properties:
        min:
          type: number
          format: double
        max:
          type: number
          format: double
    ResidualValueConfig:
      type: object
      properties:
        percentageMin:
          type: number
          format: double
        percentageMax:
          type: number
          format: double
        readonly:
          type: boolean
    PostponedStartAffectedParty:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
      description: Party responsible for covering the postponed start months.
    CommissionType:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        readonly:
          type: boolean
      description: Type definition of a commission.
    FeeType:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        readonly:
          type: boolean
        code:
          type: string
      description: Type definition of a fee.
    SpecialPaymentType:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        readonly:
          type: boolean
        downPaymentType:
          type: boolean
        code:
          type: string
      description: Type definition of a special payment.
    OperationEnum:
      type: string
      description: TODO
      enum:
        - CALC_RENTAL
        - CALC_RESIDUAL_VALUE
        - CALC_INTEREST_RATE
        - CALC_COMMISSIONS
        - CALC_ASSET_VALUE
        - CALC_TERM
        - CALC_KEEPING_CUSTOMER_PTO
    CalculationConfiguration:
      required:
        - currency
        - officeId
      type: object
      properties:
        officeId:
          type: integer
          format: int32
        office:
          $ref: "#/components/schemas/Office"
        marketProducts:
          type: array
          description: "The marketproducts available for calculation. If this list is empty, no calculation is possible."
          items:
            $ref: "#/components/schemas/MarketProduct"
        pricelists:
          type: array
          description: "The pricelists available for calculation. If this list is empty, no calculation is possible."
          items:
            $ref: "#/components/schemas/PriceList"
        paymentPeriods:
          type: array
          items:
            $ref: "#/components/schemas/PaymentPeriodEnum"
        paymentMethods:
          type: array
          items:
            $ref: "#/components/schemas/PaymentMethod"
        currency:
          $ref: "#/components/schemas/Currency"
        interestRateConfig:
          $ref: "#/components/schemas/InterestRateConfig"
        tariffConfig:
          $ref: "#/components/schemas/TariffConfig"
        assetValueConfig:
          $ref: "#/components/schemas/MinMaxConfig"
        residualValueConfig:
          $ref: "#/components/schemas/ResidualValueConfig"
        termConfig:
          $ref: "#/components/schemas/MinMaxConfig"
        postponedStartAffectedParties:
          type: array
          items:
            $ref: "#/components/schemas/PostponedStartAffectedParty"
        commissionTypes:
          type: array
          items:
            $ref: "#/components/schemas/CommissionType"
        feeTypes:
          type: array
          items:
            $ref: "#/components/schemas/FeeType"
        specialPaymentTypes:
          type: array
          items:
            $ref: "#/components/schemas/SpecialPaymentType"
        allowedOperations:
          type: array
          items:
            $ref: "#/components/schemas/OperationEnum"
        autoCalculateVat:
          type: boolean
      description: The configuration parameters of the calculation to be executed.
    PaymentModeEnum:
      type: string
      description: TODO
      enum:
        - IN_ADVANCE
        - ARREARS
    Rental:
      type: object
      properties:
        value:
          type: number
          format: double
        startDate:
          type: string
          format: date
        period:
          $ref: "#/components/schemas/PaymentPeriodEnum"
        numberOfRentals:
          type: integer
          format: int32
        paymentsPerRental:
          type: number
          format: double
      description: The rentals for this calculation.
    ResidualValue:
      type: object
      properties:
        amount:
          type: number
          format: double
        percentage:
          type: number
          format: double
        usePercentage:
          type: boolean
        manualSet:
          type: boolean
      description: The residual value after the lease.
    Commission:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/CommissionType"
        amount:
          type: number
          format: double
        percentage:
          type: number
          format: double
        usePercentage:
          type: boolean
        manualSet:
          type: boolean
      description: A commission to be paid
    Fee:
      type: object
      properties:
        feeType:
          $ref: "#/components/schemas/FeeType"
        name:
          type: string
        amount:
          type: number
          format: double
        manualSet:
          type: boolean
        feeIncluded:
          type: boolean
      description: A fee to be paid
    SpecialPayment:
      required:
        - amount
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/SpecialPaymentType"
        amount:
          minimum: 0
          type: number
          format: double
        equipmentDetails:
          type: string
        serialNumber:
          type: string
      description: A special payment (e.g. downpayment) to be included in the calculation.
    CalculationSheetResponse:
      type: object
      properties:
        created:
          type: string
          format: date-time
        marketProductId:
          type: integer
          format: int32
        introducerPricelistId:
          type: integer
          format: int32
        paymentPeriod:
          $ref: "#/components/schemas/PaymentPeriodEnum"
        paymentMethod:
          $ref: "#/components/schemas/PaymentMethod"
        paymentMode:
          $ref: "#/components/schemas/PaymentModeEnum"
        rentals:
          type: array
          items:
            $ref: "#/components/schemas/Rental"
        interestRate:
          type: number
          format: double
        customerPto:
          type: number
          format: double
        tariffRate:
          type: number
          format: double
        calcTariffRate:
          type: number
          format: double
        selloutTariffRate:
          type: number
          format: double
        upgradeValue:
          type: number
          format: double
        totalAssetValue:
          type: number
          format: double
        amountFinanced:
          type: number
          format: double
        vatAmount:
          type: number
          format: double
        residualValue:
          $ref: "#/components/schemas/ResidualValue"
        term:
          type: integer
          format: int32
        commissions:
          type: array
          items:
            $ref: "#/components/schemas/Commission"
        fees:
          type: array
          items:
            $ref: "#/components/schemas/Fee"
        specialPayments:
          type: array
          description: "A list of special payments (e.g. deposits, down payments)."
          items:
            $ref: "#/components/schemas/SpecialPayment"
        specialPaymentsSum:
          type: number
          description: Sum of the special payments.
          format: double
        optionFee:
          type: number
          format: double
      description: A calculation sheet represents the inputs and outputs of a finance calculation.
    CalculationConfigResponse:
      required:
        - calculationSheet
        - config
      type: object
      properties:
        config:
          $ref: "#/components/schemas/CalculationConfiguration"
        calculationSheet:
          $ref: "#/components/schemas/CalculationSheetResponse"
      description: TODO
    PaymentProfile:
      required:
        - profile1
        - profile2
      type: object
      properties:
        profile1:
          type: integer
          format: int32
        profile2:
          type: integer
          format: int32
      description: The payment profile to be used.
    CalculationSheetRequest:
      required:
        - introducerPricelistId
        - marketProductId
        - paymentMethod
        - paymentMode
        - paymentPeriod
        - term
      type: object
      properties:
        marketProductId:
          type: integer
          format: int32
        introducerPricelistId:
          type: integer
          format: int32
        paymentPeriod:
          $ref: "#/components/schemas/PaymentPeriodEnum"
        paymentMethod:
          $ref: "#/components/schemas/PaymentMethod"
        paymentMode:
          $ref: "#/components/schemas/PaymentModeEnum"
        paymentProfile:
          $ref: "#/components/schemas/PaymentProfile"
        paymentPerMonth:
          type: number
          format: double
        customerPto:
          type: number
          format: double
        residualValue:
          $ref: "#/components/schemas/ResidualValue"
        term:
          type: integer
          format: int32
        commissions:
          type: array
          items:
            $ref: "#/components/schemas/Commission"
        fees:
          type: array
          items:
            $ref: "#/components/schemas/Fee"
        specialPayments:
          type: array
          description: "A list of special payments (e.g. deposits, down payments)."
          items:
            $ref: "#/components/schemas/SpecialPayment"
        optionFee:
          type: number
          format: double
      description: A calculation sheet represents the inputs and outputs of a finance calculation.
    CalculationRequest:
      required:
        - sheet
      type: object
      properties:
        operation:
          $ref: "#/components/schemas/OperationEnum"
        sheet:
          $ref: "#/components/schemas/CalculationSheetRequest"
      description: A request to perform a calculation.
    CalculationResponse:
      type: object
      properties:
        sheet:
          $ref: "#/components/schemas/CalculationSheetResponse"
        errors:
          type: array
          items:
            type: string
        warnings:
          type: array
          items:
            type: string
      description: The result of a calculation.
    PartnerCreate:
      required:
        - address
        - dateOfBirth
        - firstName
        - lastName
        - monthAtAddress
        - title
      type: object
      properties:
        firstName:
          maxLength: 100
          type: string
        lastName:
          maxLength: 200
          type: string
        secondLastName:
          maxLength: 200
          type: string
        title:
          $ref: "#/components/schemas/Title"
        address:
          $ref: "#/components/schemas/Address"
        dateOfBirth:
          type: string
          format: date
        monthAtAddress:
          type: integer
          format: int32
        ssn:
          type: string
          description: The SSN of this Partner. Only shows the last 4 digits on read.
      description: Represents a partner of a customer.
    CustomerManual:
      required:
        - companyName
        - legalForm
      type: object
      properties:
        legalForm:
          $ref: "#/components/schemas/LegalForm"
        professionType:
          $ref: "#/components/schemas/ProfessionType"
        companyName:
          type: string
        dateOfIncorporation:
          type: string
          format: date-time
        registrationNumber:
          maxLength: 16
          type: string
        address:
          $ref: "#/components/schemas/Address"
        partners:
          maxItems: 3
          minItems: 0
          type: array
          items:
            $ref: "#/components/schemas/PartnerCreate"
    ServiceTypeEnum:
      type: string
      description: TODO
      enum:
        - LIMITED
        - FULL
    PricePerUnit:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
    PricePerUnitValue:
      type: object
      properties:
        id:
          type: integer
          format: int32
        pricePerUnit:
          $ref: "#/components/schemas/PricePerUnit"
        value:
          type: number
          format: double
        valueIncluded:
          type: number
          format: double
    ServiceAgreement:
      required:
        - pricePerUnitValues
        - serviceType
      type: object
      properties:
        serviceType:
          $ref: "#/components/schemas/ServiceTypeEnum"
        pricePerUnitValues:
          type: array
          items:
            $ref: "#/components/schemas/PricePerUnitValue"
      description: The Service Agreement relates to an Asset.
    AssetConditionEnum:
      type: string
      description: condition of the asset
      enum:
        - NEW
        - REFURBISHED
        - USED
        - REMANUFACTORED
        - RETAINED
    Asset:
      required:
        - assetIacCode
        - condition
        - description
        - quantity
        - valuePerAsset
      type: object
      properties:
        id:
          type: integer
          format: int32
        quantity:
          maximum: 9999
          minimum: 1
          type: integer
          format: int32
        description:
          maxLength: 50
          minLength: 1
          type: string
        valuePerAsset:
          maximum: 10000000
          exclusiveMaximum: false
          minimum: 0
          exclusiveMinimum: false
          type: number
        assetIacCode:
          maxLength: 10
          minLength: 3
          type: string
        serialNumber:
          maxLength: 50
          minLength: 0
          type: string
        serviceAgreement:
          $ref: "#/components/schemas/ServiceAgreement"
        equipmentSupplier:
          $ref: "#/components/schemas/BusinessPartnerRef"
        assetModel:
          $ref: "#/components/schemas/AssetModel"
        location:
          maxLength: 50
          minLength: 0
          type: string
        condition:
          $ref: "#/components/schemas/AssetConditionEnum"
        ageInMonth:
          minimum: 1
          type: integer
          format: int32
      description: The Asset represents an item (e.g. equipment or economic good) to be financed.
    Loan:
      required:
        - loanPurpose
        - value
      type: object
      properties:
        id:
          type: integer
          format: int32
        value:
          maximum: 10000000
          exclusiveMaximum: false
          minimum: 0
          exclusiveMinimum: false
          type: number
        loanPurpose:
          $ref: "#/components/schemas/LoanPurpose"
      description: Represents a loan.
    ProposalCreate:
      required:
        - officeId
      type: object
      properties:
        officeId:
          type: integer
          format: int32
        salesContactId:
          type: integer
          description: mandatory in all countries except GB
          format: int32
        label:
          maxLength: 30
          minLength: 0
          type: string
        specialConditionText:
          maxLength: 450
          minLength: 0
          type: string
        scheduleAssetsDescription:
          maxLength: 1000
          minLength: 0
          type: string
        customer:
          $ref: "#/components/schemas/BusinessPartnerRef"
        customerManual:
          $ref: "#/components/schemas/CustomerManual"
        equipmentSupplier:
          $ref: "#/components/schemas/BusinessPartnerRef"
        assets:
          type: array
          items:
            $ref: "#/components/schemas/Asset"
        loan:
          $ref: "#/components/schemas/Loan"
        calculation:
          $ref: "#/components/schemas/CalculationRequest"
      description: Represents a proposal create request.
    CustomerInvoiceContact:
      type: object
      properties:
        name:
          maxLength: 30
          minLength: 0
          type: string
          nullable: true
        email:
          maxLength: 200
          minLength: 0
          pattern: "^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$"
          type: string
          description: A valid e-mail.
          nullable: true
        phone:
          maxLength: 30
          minLength: 0
          type: string
          nullable: true
      description: Represents the invoice contact of the proposal's customer.
    ProposalCustomer:
      type: object
      properties:
        businessPartner:
          $ref: "#/components/schemas/BusinessPartnerRef"
        introducerCustomerLabel:
          maxLength: 30
          minLength: 0
          type: string
          nullable: true
        customerPartnerLimit:
          type: integer
          format: int32
          nullable: true
        address:
          $ref: "#/components/schemas/Address"
        invoiceAddress:
          $ref: "#/components/schemas/Address"
        invoiceContact:
          $ref: "#/components/schemas/CustomerInvoiceContact"
      description: Represents a proposal's customer and its details like the related SieSmart business partner and selected invoice address.
    SignatoryActionEnum:
      type: string
      description: Signatory Status
      enum:
        - SIGNED
        - DELEGATED
        - OPENED
        - ACCEPTED
        - APPROVED
        - WAITING
    SignatoryTypeEnum:
      type: string
      description: The signatories type.
      enum:
        - CUSTOMER
        - CUSTOMER_CURRENT
        - INTRODUCER
        - GUARANTOR
        - EQUIPMENT_SUPPLIER
        - SIEMENS
        - SIEMENS_MANAGER
        - CC
    Signatory:
      required:
        - firstName
        - lastName
      type: object
      properties:
        firstName:
          maxLength: 50
          minLength: 1
          type: string
        lastName:
          maxLength: 50
          minLength: 1
          type: string
        registrationNumber:
          maxLength: 20
          minLength: 0
          type: string
        email:
          maxLength: 200
          minLength: 0
          pattern: "^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$"
          type: string
          description: A valid e-mail.
        phone:
          maxLength: 30
          minLength: 0
          type: string
        jobTitle:
          $ref: "#/components/schemas/JobTitle"
        jobTitleCustom:
          maxLength: 35
          minLength: 0
          type: string
          description: Job title of the signatory as a freetext field. It can only be used if the job title custom flag is true
        boardmemberId:
          type: integer
          description: An optional id of a customer's boardmember on which this signatory is based on.
          format: int32
          writeOnly: true
        boardmember:
          type: boolean
          description: Indicating whether this signatory is based on a boardmember.
        status:
          $ref: "#/components/schemas/SignatoryActionEnum"
        type:
          $ref: "#/components/schemas/SignatoryTypeEnum"
      description: Represents a signatory of a proposal.
    DecisionStatusEnum:
      type: string
      description: TODO
      enum:
        - NOT_AVAILABLE
        - PENDING
        - ACCEPTED
        - DECLINED
        - MORE_INFORMATION_REQUIRED
        - CANCELED
        - UNKNOWN
        - AMEND
        - ACCEPTED_WITH_CONDITIONS
        - EXPIRED
        - DECLINED_INTERNAL
    Decision:
      type: object
      properties:
        decisionStatus:
          $ref: "#/components/schemas/DecisionStatusEnum"
        decisionRequestedDate:
          type: string
          format: date-time
        decisionDate:
          type: string
          format: date-time
        decisionValidUntilDate:
          type: string
          format: date-time
        comment:
          type: string
        condition:
          type: string
        reason:
          type: string
        commentToRiskAnalyst:
          maxLength: 450
          minLength: 0
          type: string
        siemensMayContactCustomer:
          type: boolean
      description: "Represents a credit decision on a proposal "
      nullable: true
    ProposalStatusEnum:
      type: string
      description: Represents the status of a proposal
      enum:
        - OFFER
        - PROSPECT
        - DEAL_AMENDMENT
        - MORE_INFORMATION_REQUIRED
        - WAITING_FOR_DECISION
        - PENDING
        - CREDIT_APPROVED
        - WAITING_FOR_PRINT
        - WAITING
        - WAITING_FOR_E_SIGNATURE
        - DOCUMENTS_ARRIVED
        - DOCUMENTS_COMPLETED
        - CONTRACT_STARTED
        - WAITING_BACKEND
        - ACTIVATED
        - PAID
        - EXPIRED
        - DECLINED
        - WAITING_ACTIVATION
    Proposal:
      type: object
      properties:
        id:
          type: integer
          format: int32
        proposalNumber:
          type: integer
          format: int32
        contractNumber:
          type: string
        label:
          maxLength: 30
          minLength: 0
          type: string
        specialConditionText:
          maxLength: 450
          minLength: 0
          type: string
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
        currency:
          type: string
          description: iso code of the currency
        officeId:
          type: integer
          format: int32
        salesContactId:
          type: integer
          format: int32
        customer:
          $ref: "#/components/schemas/ProposalCustomer"
        equipmentSuppliers:
          type: array
          items:
            $ref: "#/components/schemas/BusinessPartnerRef"
        signatories:
          type: array
          items:
            $ref: "#/components/schemas/Signatory"
        currentCalculation:
          $ref: "#/components/schemas/CalculationSheetResponse"
        decision:
          $ref: "#/components/schemas/Decision"
        status:
          $ref: "#/components/schemas/ProposalStatusEnum"
      description: Represents a proposal.
    WorkflowStatusEnum:
      type: string
      description: Workflow status NOT_EXP - Not Expired OFF - Offer PRO - Proposal MIR - More info required PRO_MIR - More info require MORE_INFO - More Information required PEN - Pending WFD - Pending WFP - Accepted WFA - Waiting for documents WFE - Waiting for e-signature DA - Documents arrived COS - Contract started ACT - Contract activated EXP - Expired WAR - Waiting for Activation DC - Documents completed DEC - Declined PAI - Paid
      nullable: true
      enum:
        - NOT_EXP
        - "OFF"
        - PRO
        - MIR
        - PRO_MIR
        - MORE_INFO
        - PEN
        - WFD
        - WFP
        - WFA
        - WFE
        - DA
        - COS
        - ACT
        - EXP
        - WAR
        - DC
        - DEC
        - PAI
    DocumentStatusEnum:
      type: string
      description: Document Status
      nullable: true
      enum:
        - VALID
        - INVALID
        - UNCHECKED
        - MISSING
        - INCOMPLETE
        - COMPLETED
        - DELAYED
    SignatureStatusEnum:
      type: string
      description: Signature Status
      enum:
        - FINALIZED
        - WAITING_FOR_SIGNATURE
        - SIGNED
        - EXPIRED
        - ABORTED
        - AUTHORING
        - NOT_VALID
    ProposalSearchSortByEnum:
      type: string
      description: TODO
      default: UPDATED
      enum:
        - ID
        - PROPOSAL_NO
        - LABEL
        - CREATED
        - UPDATED
    SortOrderEnum:
      type: string
      description: TODO
      default: DESC
      enum:
        - ASC
        - DESC
    ProposalSearchResult:
      type: object
      properties:
        data:
          type: array
          nullable: true
          items:
            $ref: "#/components/schemas/Proposal"
        errors:
          $ref: "#/components/schemas/ProblemResponse"
      description: Result of a proposal search. Contains a list of proposals matching the query parameter of the proposal search operation.
    FileData:
      type: object
      properties:
        data:
          type: string
          description: Base64-encoded contents of the file.
          format: byte
          nullable: true
        contentType:
          type: string
          description: Content type of the file.
          nullable: true
          example: application/ms-excel
        fileName:
          type: string
          description: File name.
          nullable: true
          example: document.pdf
      description: Represents a file.
      nullable: true
    FileBasedPaginatedResponse:
      type: object
      properties:
        data:
          $ref: "#/components/schemas/FileData"
        errors:
          $ref: "#/components/schemas/ProblemResponse"
    ProposalCalculationResponse:
      type: object
      properties:
        calculationResponse:
          $ref: "#/components/schemas/CalculationResponse"
        proposal:
          $ref: "#/components/schemas/Proposal"
      description: The result of a calculation in the context of a proposal.
    Boardmember:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          description: The id of this board member.
          format: int32
        title:
          $ref: "#/components/schemas/Title"
        firstName:
          maxLength: 50
          type: string
          description: The first name of board member.
        lastName:
          maxLength: 150
          type: string
          description: The last name of board member.
        email:
          maxLength: 100
          minLength: 0
          pattern: "^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$"
          type: string
          description: Email of board member.
          nullable: true
          example: jon.doe@xyz.com
        jobTitle:
          $ref: "#/components/schemas/JobTitle"
        jobTitleCustom:
          maxLength: 35
          type: string
          description: Job title of the signatory as a freetext field. It can only be used if the job title custom flag is true
        registrationNumber:
          maxLength: 20
          type: string
          description: The registration number of board member.
        phoneCountryCode:
          maxLength: 30
          type: string
          description: Phone country code of board member.
        phone:
          maxLength: 30
          type: string
          description: Phone number of board member.
        signatoryType:
          $ref: "#/components/schemas/SignatoryTypeEnum"
      description: A board member of a customer.
    BankAccount:
      required:
        - email
        - iban
        - swiftBic
      type: object
      properties:
        iban:
          maxLength: 27
          minLength: 24
          type: string
          description: The IBAN of the bank account.
        swiftBic:
          maxLength: 11
          minLength: 7
          type: string
          description: The SWIFT/BIC of the bank account.
        email:
          maxLength: 50
          type: string
          description: The email of the bank account.
          format: email
          example: jon.doe@xyz.com
    DecisionRequest:
      type: object
      properties:
        commentToRiskAnalyst:
          maxLength: 450
          minLength: 0
          type: string
        siemensMayContactCustomer:
          type: boolean
        siemensMayRequestCreditData:
          type: boolean
        prelease:
          type: boolean
      description: Represents the request for a decision
    DecisionPrecheckViolation:
      type: object
      properties:
        code:
          type: string
        userMessage:
          type: string
      description: Represents a failed but necessary precondition before performing a decision check
    DecisionPrecheckResult:
      type: object
      properties:
        requestAllowed:
          type: boolean
        cancelAllowed:
          type: boolean
        preconditionViolations:
          type: array
          items:
            $ref: "#/components/schemas/DecisionPrecheckViolation"
      description: Represents the result for the credit decision precheck. Credit decision request/cancel can only be performed if this check allows it
    DocumentType:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          format: int32
        code:
          type: string
        name:
          type: string
    DocumentIdentifierTypeEnum:
      type: string
      description: TODO
      enum:
        - CREDIT_DOCUMENT_ID
        - DOCUMENT_ID
        - DOCUMENT_TYPE
    DocumentIdentifier:
      required:
        - type
        - value
      type: object
      properties:
        value:
          type: integer
          format: int32
        type:
          $ref: "#/components/schemas/DocumentIdentifierTypeEnum"
    PrintOption:
      type: object
      properties:
        name:
          type: string
        selected:
          type: boolean
    PrintDocumentIdentifier:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/DocumentIdentifier"
        printOptions:
          type: array
          items:
            $ref: "#/components/schemas/PrintOption"
    DownloadRequest:
      required:
        - documentIds
      type: object
      properties:
        documentIds:
          maxItems: 2147483647
          minItems: 1
          type: array
          items:
            $ref: "#/components/schemas/PrintDocumentIdentifier"
    SigningRequest:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/SignatureStatusEnum"
        documentVersion:
          maxLength: 50
          minLength: 0
          type: string
        password:
          maxLength: 50
          minLength: 0
          type: string
        refreshAllowed:
          type: boolean
        deleteAllowed:
          type: boolean
        downloadAllowed:
          type: boolean
        sendReminderAllowed:
          type: boolean
        senderFirstName:
          maxLength: 150
          minLength: 0
          type: string
        senderLastName:
          maxLength: 150
          minLength: 0
          type: string
        senderGid:
          maxLength: 50
          minLength: 0
          type: string
        sendDate:
          type: string
          format: date-time
        signatories:
          type: array
          items:
            $ref: "#/components/schemas/Signatory"
      description: Represents a document signing request including the corresponding status.
    ProposalDocument:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/DocumentIdentifier"
        documentType:
          $ref: "#/components/schemas/DocumentType"
        printOptions:
          type: array
          items:
            $ref: "#/components/schemas/PrintOption"
        downloadAllowed:
          type: boolean
          description: Indicates whether this document is allowed be downloaded.
        downloadSignedAllowed:
          type: boolean
          description: Indicates whether the signed document is allowed to be downloaded.
        downloadUploadedAllowed:
          type: boolean
          description: Indicates whether the uploaded document is allowed to be downloaded.
        sendByEmailAllowed:
          type: boolean
          description: Indicates whether this document is allowed to be sent by e-mail.
        required:
          type: boolean
          description: Indicates whether this document is required to be sent to SFS.
        received:
          type: boolean
          description: Indicates whether this document is received by SFS.
        receivedDate:
          type: string
          description: Indicates when this document is received by SFS.
          format: date-time
        valid:
          type: boolean
          description: Indicates whether this document is valid. It's null if not yet validated.
        validationDate:
          type: string
          description: Indicates when this document is validated by SFS.
          format: date-time
        reason:
          type: string
          description: Indicates the reason if this document is not valid.
        reasonNote:
          type: string
          description: Indicates the reason note if this document is not valid
        eligibleForSigning:
          type: boolean
          description: Indicates whether this document is enabled to be signed via e-signature service.
        signingEnabled:
          type: boolean
          description: Indicates whether this document is enabled to be signed via e-signature service.
        sendSigningRequestAllowed:
          type: boolean
          description: Indicates whether this document is ready to be sent to e-signature service.
        canBeSignedCombined:
          type: boolean
          description: Can be signed in combination with other documents
        signingRequest:
          $ref: "#/components/schemas/SigningRequest"
        alias:
          type: string
          description: Alias (or title) of this document.
        fileName:
          type: string
          description: Filename of this document with which it was updloaded.
    DocumentUpload:
      required:
        - alias
        - fileContent
        - filename
        - type
      type: object
      properties:
        alias:
          type: string
        note:
          type: string
        filename:
          maxLength: 100
          type: string
        fileContent:
          type: string
          description: The content can be a PDF or PNG.
        type:
          $ref: "#/components/schemas/DocumentType"
    UploadedDocument:
      required:
        - fileContent
        - type
      type: object
      properties:
        fileContent:
          type: string
        type:
          $ref: "#/components/schemas/DocumentType"
      description: Represents an uploaded document that is sent to signature service directly (i.e. VSA).
    SendSigningRequest:
      required:
        - documentIds
        - signatories
      type: object
      properties:
        documentIds:
          type: array
          items:
            $ref: "#/components/schemas/DocumentIdentifier"
        signatories:
          type: array
          items:
            $ref: "#/components/schemas/Signatory"
        emailsInCC:
          type: string
        uploadedDocument:
          $ref: "#/components/schemas/UploadedDocument"
    Upgrade:
      type: object
      properties:
        id:
          type: integer
          format: int32
        lessor:
          $ref: "#/components/schemas/Lessor"
        contractNumber:
          type: string
        quoteTotalValue:
          type: number
          format: double
        rentalDate:
          type: string
          format: date-time
          nullable: true
      description: Represents an upgrade of a contract.
    Partner:
      required:
        - address
        - dateOfBirth
        - firstName
        - lastName
        - title
      type: object
      properties:
        id:
          type: integer
          description: The ID of this Partner.
          format: int32
        businesspartner:
          $ref: "#/components/schemas/BusinessPartner"
        firstName:
          maxLength: 100
          type: string
        lastName:
          maxLength: 200
          type: string
        secondLastName:
          maxLength: 200
          type: string
        title:
          $ref: "#/components/schemas/Title"
        address:
          $ref: "#/components/schemas/Address"
        dateOfBirth:
          type: string
          format: date
        monthAtAddress:
          type: integer
          format: int32
        ssn:
          type: string
          description: The SSN of this Partner. Only shows the last 4 digits on read.
      description: Represents a partner of a customer.
    GuaranteeType:
      type: object
      properties:
        name:
          type: string
        alias:
          type: string
        personalGuarantee:
          type: boolean
      description: Type of guarantee that the guarantor provides for the credit.
    Guarantor:
      required:
        - id
        - partner
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        registrationNumber:
          type: string
        officialAddress:
          $ref: "#/components/schemas/Address"
        partner:
          $ref: "#/components/schemas/Partner"
        guaranteeType:
          $ref: "#/components/schemas/GuaranteeType"
        fico:
          type: integer
          description: The optional FICO score of this Guarantor. An existing value is never shown but indicated by the 'hasFico' property.
          format: int32
          writeOnly: true
        hasFico:
          type: boolean
          description: Indicates whether a score value is set for this Guarantor.
      description: Represents a guarantor.
    CorporateGuarantorCreate:
      required:
        - BusinessPartnerRef
        - guaranteeType
      type: object
      properties:
        BusinessPartnerRef:
          $ref: "#/components/schemas/BusinessPartnerRef"
        guaranteeType:
          $ref: "#/components/schemas/GuaranteeType"
      description: Represents the request to add a corporate guarantor to a proposal.
    PortfolioStatus:
      type: string
      description: Portfolio status.
      enum:
        - ACTIVE
        - LIVE
        - EXTENSION
        - MATURED
        - TERMINATED
        - ALL
    ContractSearchSortBy:
      type: string
      description: Available options to sort by a contracts search result set.
      default: CONTRACT_NO
      enum:
        - CONTRACT_NO
    ContractStatus:
      type: string
      enum:
        - LIVE
        - EXTENSION
        - MATURED
        - TERMINATED
    Contract:
      type: object
      properties:
        id:
          type: integer
          format: int32
        contractNumber:
          type: string
        amountFinanced:
          type: number
          format: double
        currency:
          $ref: "#/components/schemas/Currency"
        customer:
          $ref: "#/components/schemas/BusinessPartner"
        customerAddress:
          $ref: "#/components/schemas/Address"
        marketProduct:
          $ref: "#/components/schemas/MarketProduct"
        latestFetchedUpgradeQuoteValue:
          type: number
          format: double
        salesPerson:
          $ref: "#/components/schemas/SalesContact"
        salesOffice:
          $ref: "#/components/schemas/Office"
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
        term:
          type: integer
          format: int32
        terminationNoticeDate:
          type: string
          format: date
        completedTerm:
          type: integer
          format: int32
        remainingTerm:
          type: integer
          format: int32
        remainingRentals:
          type: integer
          format: int32
        paymentMethodCode:
          type: string
        nextInvoiceDate:
          type: string
          format: date
        paymentDate:
          type: string
          format: date
        primaryArrearsValue:
          type: number
          format: double
        residualValue:
          type: number
          format: double
        inExtension:
          type: boolean
        fetchUpgradeQuoteAllowed:
          type: boolean
        createUpgradeAllowed:
          type: boolean
        createCoTermAllowed:
          type: boolean
        guaranteeTypeRepurchaserForSecurities:
          type: boolean
        contractSecurities:
          type: boolean
        terminationReceivedNotice:
          type: string
        contractStatus:
          $ref: "#/components/schemas/ContractStatus"
      description: Represents a contract.
    ContractSearchResult:
      type: object
      properties:
        data:
          type: array
          nullable: true
          items:
            $ref: "#/components/schemas/Contract"
        errors:
          $ref: "#/components/schemas/ProblemResponse"
      description: Result of a contract search. Contains a list of contracts matching the query parameter of the contract search operation.
    ContractBusinessPartner:
      type: object
      properties:
        name:
          maxLength: 200
          type: string
        registrationNumber:
          maxLength: 16
          type: string
          nullable: true
        roleAlias:
          type: string
        address:
          $ref: "#/components/schemas/Address"
    ContractAsset:
      type: object
      properties:
        description:
          type: string
        quantity:
          type: integer
          format: int32
        serialNumber:
          type: string
        equipmentSupplier:
          $ref: "#/components/schemas/BusinessPartner"
        location:
          type: string
        presentValue:
          type: number
          format: double
        paymentDate:
          type: string
          format: date
      description: Represents a asset related to a contract.
    ContractCharge:
      type: object
      properties:
        startDate:
          type: string
          format: date
        amount:
          type: number
          format: double
        frequency:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
        description:
          type: string
        businessPartner:
          $ref: "#/components/schemas/BusinessPartner"
      description: Represents a charge related to a contract.
    ContractRental:
      type: object
      properties:
        startDate:
          type: string
          format: date
        amount:
          type: number
          format: double
        frequency:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
        businessPartner:
          $ref: "#/components/schemas/BusinessPartner"
      description: Represents a rental related to a contract.
    ContractSecurity:
      type: object
      properties:
        guarantee:
          type: string
        limit:
          type: number
          format: double
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
        businessPartner:
          $ref: "#/components/schemas/BusinessPartner"
      description: Represents a security related to a contract.
    ContractCoterm:
      type: object
      properties:
        proposalId:
          type: integer
          format: int32
      description: Coterm proposal reference generated from a contract
    ContractUpgrade:
      type: object
      properties:
        proposalId:
          type: integer
          format: int32
      description: Upgrade proposal reference generated from a contract
    OfferType:
      type: string
      enum:
        - TERMINATION
        - UPGRADE
        - BOTH
    QuoteType:
      type: string
      enum:
        - QUOTE_TECH_REFRESH
        - QUOTE_WITH_SALE
        - QUOTE_WITH_RETURN
    EarlyCancellationOffer:
      type: object
      properties:
        id:
          type: integer
          format: int32
        offerType:
          $ref: "#/components/schemas/OfferType"
        quoteTypes:
          maxItems: 3
          minItems: 1
          type: array
          description: The types of which quotes included in the offer.
          items:
            $ref: "#/components/schemas/QuoteType"
        recipient:
          type: string
          description: The offer recipient email.
          format: email
          example: jon.doe@xyz.com
        sentDate:
          type: string
          format: date-time
        sentBy:
          type: string
    QuoteValue:
      type: object
      properties:
        id:
          type: integer
          format: int32
        type:
          $ref: "#/components/schemas/QuoteType"
        value:
          type: number
          format: double
    Period:
      type: object
      properties:
        period:
          type: integer
          format: int32
        rentalDate:
          type: string
          format: date
        validTo:
          type: string
          format: date
        values:
          type: array
          items:
            $ref: "#/components/schemas/QuoteValue"
        allowedForUpgrade:
          type: boolean
    ContractUpgradeQuote:
      type: object
      properties:
        id:
          type: integer
          format: int32
        created:
          type: string
          format: date
        offers:
          type: array
          items:
            $ref: "#/components/schemas/EarlyCancellationOffer"
        periods:
          type: array
          items:
            $ref: "#/components/schemas/Period"
      description: Contract upgrade quote
    Endpoint:
      type: object
      properties:
        apiKey:
          type: string
          description: apiKey token the B2B api must provide when alling the customer provided notification endpoint.
          example: sdJH67ZZHHJj23dsf
        basePath:
          type: string
          description: "base path of the customer's interface consisting of host, port, context."
          example: https://myb2bhost.de:8080/b2b/api/notification
        created:
          type: string
          description: date with time endpoint was registered
          format: date-time
        updated:
          type: string
          description: date with time endpoint was last changed
          format: date-time
      description: |
        endpoint URI for registration
    EventTypeEnum:
      type: string
      description: Event Type
      enum:
        - CREDIT_STATUS_CHANGED
        - DOCUMENTS_STATUS_CHANGED
        - DECISION_RECEIVED
    NotificationResponse:
      type: object
      properties:
        uuid:
          pattern: "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$"
          type: string
          description: The uuid of the notification subscription for the proposal.
      description: Response to notification subscription request
    NotificationDataResponse:
      type: object
      properties:
        proposalId:
          type: integer
          description: The proposal id
          format: int32
        eventType:
          $ref: "#/components/schemas/EventTypeEnum"
      description: Response to notification subscription data request
  responses:
    UnexpectedError:
      description: Unexpected error
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemResponse"
    ProposalPreconditionFailed:
      description: In case the preconditions to update the proposal are not met. The ETag indicated by the If-Match header will be compared with the current ETag of the proposal. In case they do not match this response is returned.
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemResponse"
    ProposalSuccess:
      description: The proposal.
      headers:
        ETag:
          $ref: "#/components/headers/ProposalETagHeader"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Proposal"
    ProposalModificationNotAllowed:
      description: In case the proposal is no longer modifiable.
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemResponse"
    ForbiddenError:
      description: No permissions to execute the given operation.
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemResponse"
    NotFoundError:
      description: The requested resource could not be found.
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemResponse"
  parameters:
    CountryCodePathParam:
      name: country-code
      in: path
      description: The unique identifier for the country.
      required: true
      style: simple
      explode: false
      schema:
        maxLength: 2
        minLength: 2
        type: string
    ProposalIfMatchHeader:
      name: If-Match
      in: header
      description: "The If-Match HTTP request header makes the request conditional. For PUT and other modifying methods, it will only modify the resource in case the ETag indicated by the If-Match header is identical to the resource's current ETag."
      required: true
      style: simple
      explode: false
      schema:
        type: string
    ProposalIdPathParam:
      name: proposal-id
      in: path
      description: The unique identifier for the proposal.
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        format: int32
    OptionalProposalIfMatchHeader:
      name: If-Match
      in: header
      description: "The If-Match HTTP request header makes the request conditional. For PUT and other modifying methods, it will only modify the resource in case the ETag indicated by the If-Match header is identical to the resource's current ETag."
      required: false
      style: simple
      explode: false
      schema:
        type: string
    AssetIdPathParam:
      name: asset-id
      in: path
      description: The unique identifier for the asset.
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        format: int32
    LoanIdPathParam:
      name: loan-id
      in: path
      description: The unique identifier for the loan.
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        format: int32
    UpgradeIdPathParam:
      name: upgrade-id
      in: path
      description: The unique identifier for the upgrade.
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        format: int32
    GuarantorIdPathParam:
      name: guarantor-id
      in: path
      description: The unique identifier for the guarantor.
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        format: int32
    ContractIdPathParam:
      name: contract-id
      in: path
      description: The unique identifier for the contract.
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        format: int32
  headers:
    ProposalETagHeader:
      description: 'HTTP response header as an identifier for a specific version of a proposal. The ETag value has to be sent back to the server as a If-Match request header for every modifiying request (POST, PUT, DELETE). This helps to prevent simultaneous updates of a proposal from overwriting each other ("mid-air collisions"). Refer to operations for details.'
      required: true
      style: simple
      explode: false
      schema:
        type: string
  securitySchemes:
    oAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://sfs-q-001.siemens-sfs.auth0app.com/oauth/token
          scopes: {}
