# Create Loan **POST /v1/borrowers/{borrower_id}/loans/{loan_id}/create** Create a new loan for a borrower, if the borrower does not exist it will be created ## Servers - Production Server: https://lms.kordev.io (Production Server) - Sandbox Server: https://sandbox.lms.kordev.io (Sandbox Server) ## Parameters ### Path parameters - **borrower_id** (string) - **loan_id** (string) ### Query parameters - **is_migration** (boolean) 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. ### Body: application/json (object) - **loan** (object) - **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. - **request_id** (string) ## Responses ### 200 OK #### Body: application/json (object) - **amount_financed** (number) The initial principal amount of the loan - **config_id** (string) The ID of the loan configuration associated with this 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. - **delinquency_interest_rate** (number) The effective annual interest rate charged on the overdue balance of the loan, as a percentage. If configured above the usury rate it will adjusted according to the behavior specified in the loan configuration. - **due_dates** (array[string(date-time)] | null) A list of due dates for the loan, expressed as a datetime object with timezone information. The time can be overridden depending on the loan configuration attribute: due_date_preference, the final due dates will be displayed in the response. - **guarantee_provider** (null | string) The type of installment fee to be charged. - **id** (string) Identifier for the loan used by the lender. - **installment_fee_2_charge** (null | number) Same as installment_fee_charge - **installment_fee_charge** (null | number) Specifies the total fee amount to be charged throughout the lifetime of the loan. The fee will be split and charged in equal amounts on the due dates of the loan. - **interest_rate** (number) The effective annual interest rate charged throughout the loan, as a percentage. If the interest rate exceeds the usury rate at the time of origination, it will be adjusted according to the usury rules defined in the loan configuration. - **kordev_id** (integer) Identifier for the loan used internally by Kordev. The ID is unique for each borrower but not globally unique. - **origination_date** (string(date-time)) The origination date is the starting date and time for the loan, expressed as a datetime object with timezone information. Interest and fees begin accruing from this point onward. The time part can be overridden depending on the loan configuration attribute: origination_date_preference. - **owner** (null | string) The ID of the owner of the loan. - **request_id** (string) Optional field that will be returned unmodified in each response. Especially useful for keeping track of responses in batch requests. ### 400 Bad Request #### Body: application/json (object) - **code** (integer) Application-specific error code. - **context** (object) Application context. - **error** (string) Error message. - **status** (string) Status text. ### 404 Not Found #### Body: application/json (object) - **code** (integer) Application-specific error code. - **context** (object) Application context. - **error** (string) Error message. - **status** (string) Status text. ### 409 Conflict #### Body: application/json (object) - **code** (integer) Application-specific error code. - **context** (object) Application context. - **error** (string) Error message. - **status** (string) Status text. ### 500 Internal Server Error #### Body: application/json (object) - **code** (integer) Application-specific error code. - **context** (object) Application context. - **error** (string) Error message. - **status** (string) Status text. [Powered by Bump.sh](https://bump.sh)