# Cancel Loan **POST /v1/borrowers/{borrower_id}/loans/{loan_id}/cancel** Cancel a loan for a borrower, if the loan is not found it will return an error ## 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_cancellation** (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) - **effective_date** (string(date-time)) - **id** (null | string) Unique identifier for the loan cancellation event. - **kordev_id** (integer) Identifier for the loan used internally by Kordev. The ID is unique for each borrower but not globally unique. - **loan_id** (string) Identifier for the loan used by the lender. - **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)