openapi: 3.0.0
info:
  version: '1.0'
  title: Trade Finance
servers:
  - url: https://api.solaris-sandbox.de
    description: Sandbox
  - url: https://api.solarisbank.de
    description: Production
security: []
tags: []
paths:
  /v1/businesses/{business_id}/trade_finance_applications:
    post:
      tags:
        - Business Trade Finance
      summary: Create Trade Finance application
      description: >-
        Creates an application for a trade credit line for the business
        specified in the request URL. Solarisbank will process the application
        manually. Use the `GET` endpoint to retrieve information about the
        application's status.
      security:
        - oauth2:
            - solaris_service_business_trade_finance_application#create
      responses:
        '200':
          description: The application was successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTradeFinanceApplicationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: Information related to the Trade Finance application.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTradeFinanceApplicationRequest'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: ID of the business requesting the trade credit line.
      operationId: TradeFinanceWeb.V1.Applications.CreateOperation
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/trade_finance_applications/{id}:
    get:
      tags:
        - Business Trade Finance
      summary: Retrieve a Trade Finance application
      description: >-
        Returns the Trade Finance application specified in the request URL. Use
        this endpoint to display the status of the application to the customer.
      security:
        - oauth2:
            - solaris_service_business_trade_finance_application#find
      responses:
        '200':
          description: Successful result of the operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTradeFinanceApplicationResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: ID of the business that submitted the application.
        - schema:
            type: string
          required: true
          name: id
          in: path
          description: ID of the application.
      operationId: TradeFinanceWeb.V1.Applications.ShowOperation
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/trade_finance_applications/{id}/documents:
    post:
      tags:
        - Business Trade Finance
      summary: Add document to a Trade Finance application
      description: >-
        Attaches a previously uploaded document to the business's Trade Finance
        application. Note that you must upload the document using the `POST
        Upload a document for a business` endpoint.
      security:
        - oauth2:
            - solaris_service_business_trade_finance_application#link_document
      responses:
        '204':
          description: No Content
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: Information related to the document.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TradeFinance.AddApplicationDocumentRequest'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: ID of the business that submitted the application.
        - schema:
            type: string
          required: true
          name: id
          in: path
          description: ID of the Trade Finance application.
      operationId: TradeFinanceWeb.V1.Applications.AddDocumentOperation
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/trade_credit_line/trades:
    post:
      tags:
        - Business Trade Finance
      summary: Create trade
      description: >-
        Creates a trade. Note that you must upload the documents related to the
        trade using the `POST Upload business document` endpoint and then attach
        them to the trade using the `POST Add document to trade` endpoint. 
      security:
        - oauth2:
            - solaris_service_business_trade_finance_trade#create
      responses:
        '200':
          description: The trade was successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTradeResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: Information about the trade.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTradeRequest'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: Business ID
      operationId: TradeFinanceWeb.V1.Trades.CreateOperation
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/trade_credit_line/trades/{id}:
    get:
      tags:
        - Business Trade Finance
      summary: Retrieve a trade
      description: >-
        Returns the Trade Finance application specified in the request URL. Use
        this endpoint to display the status of the application to the customer.
      security:
        - oauth2:
            - solaris_service_business_trade_finance_trade#find
      responses:
        '200':
          description: Successful result of the operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTradeResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: ID of the business who requested the trade.
        - schema:
            type: string
          required: true
          name: id
          in: path
          description: ID of the trade.
      operationId: TradeFinanceWeb.V1.Trades.ShowOperation
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/trade_credit_line/trades/{trade_id}/documents:
    post:
      tags:
        - Business Trade Finance
      summary: Add document to trade
      description: >-
        Adds a supporting document (e.g., the trade invoice) to a trade. Note
        that you must first upload these documents using the `POST Upload a
        document for a business` endpoint.
      security:
        - oauth2:
            - solaris_service_business_trade_finance_trade#link_document
      responses:
        '204':
          description: No Content
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: Information related to the document.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TradeFinance.AddTradeDocumentRequest'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: ID of the business who requested the trade.
        - schema:
            type: string
          required: true
          name: trade_id
          in: path
          description: ID of the trade.
      operationId: TradeFinanceWeb.V1.Trades.AddDocumentOperation
      deprecated: false
      callbacks: {}
  /v1/businesses/{business_id}/trade_credit_line/trades/{trade_id}/payback_plan:
    put:
      tags:
        - Business Trade Finance
      summary: Add payback plan to trade
      description: >-
        Adds a payback plan to a trade, which determines when the loan will be
        paid out to the business and when the business must pay it back.
      security:
        - oauth2:
            - solaris_service_business_trade_finance_trade_payback_plan#create
      responses:
        '204':
          description: No Content
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: Information related to the payback plan.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TradeFinance.CreateTradePaybackPlanRequest'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: ID of the business that requested the trade.
        - schema:
            type: string
          required: true
          name: trade_id
          in: path
          description: ID of the trade.
      operationId: TradeFinanceWeb.V1.Trades.CreatePaybackPlanOperation
      deprecated: false
  /v1/businesses/{business_id}/trade_credit_line:
    patch:
      tags:
        - Business Trade Finance
      summary: Attach account to business trade credit line
      description: >-
        Attaches a business account to the trade credit line for the business
        specified in the request URL.
      security:
        - oauth2:
            - solaris_service_business_trade_finance_trade_credit_line#update
      responses:
        '200':
          description: The account was successfully attached.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCreditLineResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
        '409':
          description: The trade credit line already has an attached account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolarisToolkit.Web.Json.ErrorBody'
      requestBody:
        required: false
        description: The credit line attributes
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCreditLineRequest'
      parameters:
        - schema:
            type: string
          required: true
          name: business_id
          in: path
          description: Business ID
      operationId: TradeFinanceWeb.V1.CreditLines.UpdateOperation
      deprecated: false
      callbacks: {}
components:
  schemas:
    MoneyEur:
      type: object
      title: MoneyEur
      required:
        - value
        - currency
        - unit
      properties:
        value:
          type: integer
          description: The amount value
        unit:
          type: string
          enum:
            - cents
          description: The unit of the given value
        currency:
          type: string
          enum:
            - EUR
          description: The currency of the given value
      example:
        value: 1000
        unit: cents
        currency: EUR
    CreateTradeFinanceApplicationRequest:
      type: object
      title: CreateTradeFinanceApplicationRequest
      required:
        - identification_id
        - requested_credit_line
        - nominal_interest_rate
        - recipient_iban
        - creditreform_pd
        - creditreform_score
        - partner_contact_name
        - partner_contact_number
        - partner_reference_number
        - partner_score
        - application_date
      properties:
        requested_credit_line:
          description: >-
            The amount of money requested for the business's trade credit line
            (in Euro cents).
          example:
            value: 100000
            currency: EUR
            unit: cents
          allOf:
            - $ref: '#/components/schemas/MoneyEur'
        recipient_iban:
          type: string
          example: DE32110101001000000029
          description: IBAN of the account where the trade loans should be paid out.
        partner_score:
          type: string
          example: B
          description: An optional scoring value to apply to the Trade Finance application.
        partner_reference_number:
          type: string
          example: 3738dbd0-a547-4c11-99e7-770066a39292
          description: Reference identifier at partner
        partner_contact_number:
          type: string
          example: '+49303003000'
          description: The telephone number of a contact person in your organization.
        partner_contact_name:
          type: string
          example: Contact Name
          description: The name of a contact person in your organization.
        nominal_interest_rate:
          type: number
          minimum: -1
          maximum: 1
          exclusiveMinimum: true
          exclusiveMaximum: true
          description: >-
            The nominal interest rate to apply to the trade credit line,
            expressed as a value between `0.0` (i.e., 0%) and `1.0` (i.e., 100%)
            with up to four decimal places. For example, `0.01` would apply a
            nominal interest rate of 1% to the trade credit line
          example: 0.02
        identification_id:
          type: string
          example: e876f41e9b8642bdaaff883ec2f0e144bid
          description: The ID of the associated business identification
        creditreform_score:
          type: integer
          example: 150
          description: The creditreform score
        creditreform_pd:
          type: string
          example: '1.2'
          description: The creditreform probability of default
        application_date:
          type: string
          format: date
          example: '2019-08-24'
          description: The date of the application
      additionalProperties: false
    GetTradeFinanceApplicationResponse:
      type: object
      title: GetTradeFinanceApplicationResponse
      properties:
        status_detail:
          type: string
          example: ''
          description: Status details of the application
        status:
          type: string
          example: pending
          enum:
            - pending
            - waiting_for_bussiness_identification
            - cdd_pending
            - successful_finished
            - rejected
            - deleted
          description: Status of the application
        requested_credit_line:
          description: The request credit line amount in EUR
          allOf:
            - $ref: '#/components/schemas/MoneyEur'
        recipient_iban:
          type: string
          example: DE92370601930002130041
          description: The IBAN of the recipient's account
        partner_score:
          type: string
          example: '4'
          description: Partner score
        partner_reference_number:
          type: string
          example: 3738dbd0-a547-4c11-99e7-770066a39292
          description: Reference identifier at partner
        partner_contact_number:
          type: string
          example: '123456789'
          description: Number of the partner contact
        partner_contact_name:
          type: string
          example: Contact Name
          description: Name of the partner contact
        nominal_interest_rate:
          type: number
          minimum: -1
          maximum: 1
          exclusiveMinimum: true
          exclusiveMaximum: true
          description: >-
            The nominal interest rate to apply to the trade credit line,
            expressed as a value between `0.0` (i.e., 0%) and `1.0` (i.e., 100%)
            with up to four decimal places. For example, `0.01` would apply a
            nominal interest rate of 1% to the trade credit line.
          example: 0.02
        identification_id:
          type: string
          example: e876f41e9b8642bdaaff883ec2f0e144bid
          description: The ID of the associated business identification
        id:
          type: string
          example: 55f39e2d78424ac9a9ad5b09adffece2btfa
          description: The ID of the trade finance application
        creditreform_score:
          type: integer
          example: 150
          description: The creditreform score
        creditreform_pd:
          type: string
          example: '1.2'
          description: The creditreform probability of default
        application_date:
          type: string
          format: date
          example: '2019-08-24'
          description: The date of the application
    SolarisToolkit.Web.Json.Error:
      type: object
      title: SolarisToolkit.Web.Json.Error
      required:
        - id
        - status
        - code
        - title
        - detail
      properties:
        title:
          type: string
          description: Some short human friendly string
        status:
          type: integer
          description: The HTTP status
        source:
          type: object
          required:
            - field
            - message
          properties:
            message:
              type: string
            field:
              type: string
          nullable: true
          example:
            message: is_required
            field: name
          description: Optional computer-friendly error source description
        id:
          type: string
          description: A UUID, preferably the request ID
        detail:
          type: string
          description: 'Some human friendly-ish detail: field is required'
        code:
          type: string
          description: some_computer_friendly_string
        backtrace:
          type: array
          nullable: true
          items:
            type: string
          description: Optional array of backtrace lines
    SolarisToolkit.Web.Json.ErrorBody:
      type: object
      title: SolarisToolkit.Web.Json.ErrorBody
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/SolarisToolkit.Web.Json.Error'
    TradeFinance.AddApplicationDocumentRequest:
      type: object
      title: TradeFinance.AddApplicationDocumentRequest
      required:
        - document_id
        - type
      properties:
        type:
          type: string
          example: xml/credit_summary
          enum:
            - pdf/bwa_susa
            - pdf/complete_annual_statements
            - pdf/signed_contract
            - xml/credit_summary
            - xml/creditreform_wirtschaftsauskunft
          description: MIME type of the file
        document_id:
          type: string
          example: 5004c4c8f24b4c4990a646b740647e09cdoc
          description: The ID of the uploaded document
    Error400:
      x-struct: Elixir.SolarisToolkit.Web.Schemas.HttpError.Error400
      type: object
      title: Error400
      properties:
        title:
          type: string
          example: Failed to build pagination headers.
        status:
          type: string
          example: '400'
        id:
          type: string
          example: a95f2aaf-4e0c-4d49-8021-8a16a884ed86
        detail:
          type: string
          example: Cannot connect to database.
        code:
          type: string
          example: build_pagination_headers_failure
    Money:
      type: object
      title: Money
      required:
        - value
        - currency
        - unit
      properties:
        value:
          type: integer
          description: The amount value
        unit:
          type: string
          description: The unit of the given value
        currency:
          type: string
          description: The currency of the given value
      example:
        value: 1000
        unit: cents
        currency: EUR
    Incoterm:
      type: string
      title: Incoterm
      example: CFR
      enum:
        - EXW
        - FCA
        - CPT
        - CIP
        - DAT
        - DAP
        - DDP
        - FAS
        - FOB
        - CFR
        - CIF
        - Other
    CreateTradeRequest:
      type: object
      title: CreateTradeRequest
      required:
        - business_trade_no
        - financing_term
        - incoterm
        - invoice_date
        - original_invoice_amount
        - original_invoice_number
        - partner_reviewer
        - requested_payout_amount
        - trade_company_address
        - trade_company_name
        - trade_company_registration
        - trade_company_website
        - trade_origin_country
        - trade_purpose
      properties:
        trade_purpose:
          type: string
          example: Buy machinery
          description: Purpose of the trade.
        trade_origin_country:
          type: string
          minLength: 2
          maxLength: 2
          example: DE
          description: ISO 3166-1 alpha-2 code of the country of the seller.
        trade_company_website:
          type: string
          example: example.com
          description: Website of the seller.
        trade_company_registration:
          type: string
          example: ACME-123
          description: Registration of the seller.
        trade_company_name:
          type: string
          example: Acme
          description: Name of the seller.
        trade_company_address:
          type: string
          example: Fake street 1A, 10178 Berlin
          description: Address of the seller.
        seller_bank_account_details:
          type: object
          properties:
            iban:
              type: string
              example: DE82110101004206642492
              description: IBAN of the seller
            description:
              type: string
              example: seller description
              description: Description of the seller
          nullable: true
          description: Seller bank account details
        requested_trade_currency:
          type: string
          nullable: true
          example: USD
          description: Requested currency by the customer.
        requested_payout_amount:
          description: The requested payout amount
          allOf:
            - $ref: '#/components/schemas/Money'
        reason_for_extension:
          type: string
          nullable: true
          example: A reason
          description: Reason to postpone the payback.
        partner_score:
          type: string
          nullable: true
          example: A
          enum:
            - A
            - B
          description: Score calculated by partner controlling auto-approval behaviour
        partner_reviewer:
          type: string
          example: Partner Reviewer
          description: Person from the partner side who reviewed the trade.
        original_invoice_number:
          type: string
          example: ABC123
          description: Alphanumeric identifier of the invoice generated by the seller.
        original_invoice_amount:
          description: The original amount listed on the invoice of the trade.
          allOf:
            - $ref: '#/components/schemas/Money'
        order_reference:
          type: string
          nullable: true
          example: 32b4ad38e6984b65808c83c6633a5758
          description: Reference for partner to match trade with created order
        invoice_date:
          type: string
          format: date
          example: '2019-08-24'
          description: The date invoice should be paid.
        incoterm:
          $ref: '#/components/schemas/Incoterm'
        fx_rate:
          type: number
          nullable: true
          example: 10.32
          description: Foreign Exchange (FX) rate
        financing_term:
          type: integer
          format: int32
          example: 30
          description: The number of days until pay back.
        business_trade_no:
          type: string
          example: f8978c7d14f7495f802a6cfd5c04fba7
          description: Serial number generated by the partner to identify the trade.
    Document:
      type: object
      title: Document
      required:
        - document_id
        - type
      properties:
        type:
          type: string
          enum:
            - invoice
            - other
        document_id:
          type: string
      example:
        type: invoice
        document_id: string
        created_at: '2018-10-18T15:57:01.000000Z'
    GetTradeResponse:
      type: object
      title: GetTradeResponse
      required:
        - id
        - status
        - documents
        - business_trade_no
        - financing_term
        - incoterm
        - invoice_date
        - original_invoice_amount
        - original_invoice_number
        - partner_reviewer
        - requested_payout_amount
        - trade_company_address
        - trade_company_name
        - trade_company_registration
        - trade_company_website
        - trade_origin_country
        - trade_purpose
      properties:
        trade_purpose:
          type: string
          example: Buy machinery
          description: Purpose of the trade.
        trade_origin_country:
          type: string
          minLength: 2
          maxLength: 2
          example: DE
          description: ISO 3166-1 alpha-2 code of the country of the seller.
        trade_company_website:
          type: string
          example: example.com
          description: Website of the seller.
        trade_company_registration:
          type: string
          example: ACME-123
          description: Registration of the seller.
        trade_company_name:
          type: string
          example: Acme
          description: Name of the seller.
        trade_company_address:
          type: string
          example: Fake street 1A, 10178 Berlin
          description: Address of the seller.
        status_detail:
          type: string
          nullable: true
          example: ''
          description: Additional details about the trade's current status.
        status:
          type: string
          example: approved
          description: The status of the trade.
        seller_bank_account_details:
          type: object
          properties:
            iban:
              type: string
              example: DE82110101004206642492
              description: IBAN of the seller
            description:
              type: string
              example: seller description
              description: Description of the seller
          nullable: true
          description: Seller bank account details
        requested_trade_currency:
          type: string
          nullable: true
          example: USD
          description: Requested currency by the customer.
        requested_payout_amount:
          description: The requested payout amount
          allOf:
            - $ref: '#/components/schemas/Money'
        reason_for_extension:
          type: string
          nullable: true
          example: A reason
          description: Reason to postpone the payback.
        partner_score:
          type: string
          nullable: true
          example: A
          enum:
            - A
            - B
          description: Score calculated by partner controlling auto-approval behaviour
        partner_reviewer:
          type: string
          example: Partner Reviewer
          description: Person from the partner side who reviewed the trade.
        original_invoice_number:
          type: string
          example: ABC123
          description: Alphanumeric identifier of the invoice generated by the seller.
        original_invoice_amount:
          description: The original invoice amount
          allOf:
            - $ref: '#/components/schemas/Money'
        order_reference:
          type: string
          nullable: true
          example: 32b4ad38e6984b65808c83c6633a5758
          description: Reference for partner to match trade with created order
        invoice_date:
          type: string
          format: date
          example: '2019-08-24'
          description: The date invoice should be paid.
        incoterm:
          $ref: '#/components/schemas/Incoterm'
        id:
          type: string
          nullable: true
          example: 722e12c6f2254972a1b70de6b07f6dacbtra
          description: ID of the trade
        fx_rate:
          type: number
          nullable: true
          example: 10.32
          description: Foreign Exchange (FX) rate
        financing_term:
          type: integer
          format: int32
          example: 30
          description: The number of days until pay back.
        documents:
          type: array
          items:
            $ref: '#/components/schemas/Document'
          description: Array of documents attached to the trade.
        business_trade_no:
          type: string
          example: f8978c7d14f7495f802a6cfd5c04fba7
          description: Serial number generated by the partner to identify the trade.
        beneficiary_id:
          type: string
          nullable: true
          example: ABCDEF
          description: ID of the benificiary of the trade
    TradeFinance.AddTradeDocumentRequest:
      type: object
      title: TradeFinance.AddTradeDocumentRequest
      required:
        - document_id
        - type
      properties:
        type:
          type: string
          example: invoice
          enum:
            - invoice
            - other
          description: Type of the document
        document_id:
          type: string
          example: 5004c4c8f24b4c4990a646b740647e09cdoc
          description: The ID of the uploaded document
    TradeFinance.CreateTradePaybackPlanRequest:
      type: object
      title: TradeFinance.CreateTradePaybackPlanRequest
      required:
        - payout_date
        - payback_date
        - customer_fees_expected
        - partner_transaction_charges_expected
        - other_charges
      properties:
        payout_date:
          type: string
          format: date
          example: '2019-08-24'
          description: Date on which the payout is expected to happen.
        payback_date:
          type: string
          format: date
          example: '2019-09-30'
          description: >-
            Date on which the business is expected to payback the full bullet
            amount. Generally payout_date + financing_term should be equal to
            payback_date, so if payout_date moves, payback_date also moves.
        partner_transaction_charges_expected:
          description: >-
            Object representing the total amount of transaction charges you
            expect to collect for the trade.
          allOf:
            - $ref: '#/components/schemas/MoneyEur'
        other_charges:
          description: >-
            Object representing the total amount of other charges you expect to
            collect for the trade.
          allOf:
            - $ref: '#/components/schemas/MoneyEur'
        customer_fees_expected:
          description: >-
            Object representing the total amount of customer fees expected for
            this trade.
          allOf:
            - $ref: '#/components/schemas/MoneyEur'
        beneficiary_id:
          type: string
          nullable: true
          example: ABCDEF
          description: ID of the benificiary of the trade
      example:
        payout_date: '2020-01-01'
        payback_date: '2020-01-31'
        partner_transaction_charges_expected:
          value: 1250
          unit: cents
          currency: EUR
        other_charges:
          value: 6700
          unit: cents
          currency: EUR
        customer_fees_expected:
          value: 10000
          unit: cents
          currency: EUR
    UpdateCreditLineRequest:
      type: object
      title: UpdateCreditLineRequest
      required:
        - account_id
      properties:
        account_id:
          type: string
          example: 7751af565f994450831a15ff8b7d0d8ccacc
          description: ID of the account
    GetCreditLineResponse:
      type: object
      title: GetCreditLineResponse
      properties:
        requested_credit_line:
          $ref: '#/components/schemas/MoneyEur'
        nominal_interest_rate:
          type: number
        business_id:
          type: string
        account_id:
          type: string
