Create Loan Consolidation

POST /v1/borrowers/{borrower_id}/loans/consolidations/{consolidation_id}/create

Consolidate multiple loans into one

Query parameters

  • When this parameter is set to True, the transaction will be handled as if it had occurred on the date specified in the occurred_on field, rather than the current date and time. This is useful when migrating data from a legacy system or for building test cases.

    Default value is false.

application/json

Body

  • Additional properties are allowed.

    Hide loan_consolidation attributes Show loan_consolidation attributes object
    • The ID of the consolidation configuration, this configuration specifies waivers for old loans and bucket reallocation from the old loans into the consolidated loan.

    • daily_fee_charge null | number

      The fee charged for each day the loan is outstanding. The fee is accrued daily until reaching the max_charge specified in the loan configuration.

    • The interest rate applied to the loan when it is in delinquency. This rate is used to calculate the interest accrued on the loan when it is in arrears.

    • due_dates array[string(date-time)] | null
    • effective_date string(date-time)

      The date on which the loans are consolidated. The effective date will also be the origination date of the consolidated loan.

    • The interest rate applied to the loan. This rate is used to calculate the interest accrued on the loan.

    • The ID of the loan configuration associated with the consolidated loan.

    • original_loans array[string] | null

      The IDs of the loans that are being consolidated. The loans are consolidated into a single loan with a new ID.

    • owner null | string

      Starting owner of the consolidated loan.

  • occurred_on string(date-time)

    Represents the date and time at which the lender reported the transaction. This field is expressed as a datetime object with timezone information and is provided for reference purposes only. Please note that the 'occurred on' date is not used in loan management operations and does not affect the processing or status of the transaction. It is provided solely to track when the lender believes the transaction occurred, regardless of when it was actually processed by the loan management system. However if the request comes with the is_migration parameter set to true the occurred_on field will be used to handle the request as if it had happened on that date.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string
    • kordev_id integer
    • Additional properties are allowed.

      Hide loan_consolidation attributes Show loan_consolidation attributes object
      • The ID of the consolidation configuration, this configuration specifies waivers for old loans and bucket reallocation from the old loans into the consolidated loan.

      • daily_fee_charge null | number

        The fee charged for each day the loan is outstanding. The fee is accrued daily until reaching the max_charge specified in the loan configuration.

      • The interest rate applied to the loan when it is in delinquency. This rate is used to calculate the interest accrued on the loan when it is in arrears.

      • due_dates array[string(date-time)] | null
      • effective_date string(date-time)

        The date on which the loans are consolidated. The effective date will also be the origination date of the consolidated loan.

      • The interest rate applied to the loan. This rate is used to calculate the interest accrued on the loan.

      • The ID of the loan configuration associated with the consolidated loan.

      • original_loans array[string] | null

        The IDs of the loans that are being consolidated. The loans are consolidated into a single loan with a new ID.

      • owner null | string

        Starting owner of the consolidated loan.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

  • 409 application/json

    Conflict

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • code integer

      Application-specific error code.

    • context object

      Application context.

      Additional properties are allowed.

    • error string

      Error message.

    • status string

      Status text.

POST /v1/borrowers/{borrower_id}/loans/consolidations/{consolidation_id}/create
curl \
 --request POST 'https://lms.kordev.io/v1/borrowers/{borrower_id}/loans/consolidations/{consolidation_id}/create' \
 --header "Content-Type: application/json" \
 --data '{"loan_consolidation":{"consolidation_config":"string","daily_fee_charge":null,"delinquency_interest_rate":42.0,"due_dates":["2025-05-04T09:42:00Z"],"effective_date":"2025-05-04T09:42:00Z","interest_rate":42.0,"loan_config":"string","original_loans":["string"],"owner":"BANK_1"},"occurred_on":"2020-01-01T10:15:20-05:00","request_id":"string"}'
Request examples
{
  "loan_consolidation": {
    "consolidation_config": "string",
    "daily_fee_charge": null,
    "delinquency_interest_rate": 42.0,
    "due_dates": [
      "2025-05-04T09:42:00Z"
    ],
    "effective_date": "2025-05-04T09:42:00Z",
    "interest_rate": 42.0,
    "loan_config": "string",
    "original_loans": [
      "string"
    ],
    "owner": "BANK_1"
  },
  "occurred_on": "2020-01-01T10:15:20-05:00",
  "request_id": "string"
}
Response examples (200)
{
  "id": "string",
  "kordev_id": 42,
  "loan_consolidation": {
    "consolidation_config": "string",
    "daily_fee_charge": null,
    "delinquency_interest_rate": 42.0,
    "due_dates": [
      "2025-05-04T09:42:00Z"
    ],
    "effective_date": "2025-05-04T09:42:00Z",
    "interest_rate": 42.0,
    "loan_config": "string",
    "original_loans": [
      "string"
    ],
    "owner": "BANK_1"
  },
  "request_id": "string"
}
Response examples (400)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}
Response examples (404)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}
Response examples (409)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}
Response examples (500)
{
  "code": 42,
  "context": {},
  "error": "string",
  "status": "string"
}