Skip to main content

Loan Action: Fore Closure

POST Foreclosure

The SynoFin Foreclosure API endpoint allows users to start foreclosure processes for loans. It's a handy tool for initiating foreclosure requests, specifying important details like outstanding charges, closure type, and transaction dates.

To make use of this API effectively, certain attributes fetched from the master need to be added to SynoFin Master either through the Admin panel or by contacting the Synoriq support team. Sample values are provided in the API documentation, which can be utilized for testing purposes.

To carry out a loan foreclosure, users must gather data for charges and other necessary information. This enables them to execute the foreclosure process effectively. Here is the method user can employ to retrieve the required data for loan foreclosure:

Retrieve Data for Loan Foreclosure

In order to retrieve information for loan foreclosure, users are required to utilize the SynoFin getDataForLoanAction API. This API facilitates the retrieval of all necessary information.

API Endpoint: {{base_url}}/loan-modification/v1/service-request/getDataForLoanActions

Run in Postman: Get Data for Loan Action

Request Body

{
    "loan_id": "123", //replace with actual loanId
    "request_id": "foreclosure"
}

Response Body

{
    "balance_tenure": 0,
    "total_dues": 503289.2,
    "loan_service_charge_rate": 8,
    "loan_service_charge_amount": 0,
    "refunds": 0,
    "principal_outstanding": 418536,
    "unrealized_receipt": 0,
    "outstanding_charges": [
        {
            "charge_id": 123,
            "charge_label": "Late Payment Interest",
            "total_outstanding_amount": null,
            "type": "charges",
            "original_amount": 75685.2,
            "charge_definition_id": null,
            "excess_money_id": null,
            "loan_id": null,
            "disbursal_schedule_id": null,
            "charge_code": "lpp",
            "outstanding_amount": 75685.2,
            "amount_in_process": null,
            "payment_status": null,
            "paid_amount": null,
            "total_paid_amount": null,
            "total_paid_amount_in_process": null,
            "paid_amount_in_process": null,
            "allocated_amount": null,
            "reason": null,
            "payment_date": null,
            "repayment_id": null
        }
    ],
    "interest_due": 0,
    "pending_installment_amount": 427604,
    "total_waived_amount": 0,
    "per_day_interest": 0,
    "next_installment_presentation_date": null,
    "excess_money": 0,
    "net_closure_amount": 503289.2,
    "last_due_date": "06-09-2028",
    "overdue_principal": 0,
    "lockin_period": 0,
    "total_waiver_amount": null,
    "balance_principal": 0,
    "advance_installment": 0,
    "settled_amount": null,
    "write_off_amount": null
}



URL: {{base_url}}/loan-modification/v1/service-request/save
Run in Postman: Loan Foreclosure

Request: 

Request Type: POST
Authorization: Bearer Token

Query Params:
Schema
Attribute Data Type Description Mandatory
service_request_type String Type of service request Yes
service_request_subtype String Subtype of service request Yes
service_type String Type of service requested (if applicable) No
loan_id String ID of the loan associated with the request Yes
request_data Object Data related to the service request Yes
closure_date String Date of closure for the loan Yes
interest_till_date String Date until interest is calculated Yes
loan_service_charge_rate String Rate of service charge for the loan Yes
is_write_off Boolean Indicates if the request is for a write-off (Default "False") Yes
outstanding_charges Array

Array of outstanding charges and waivers

(Outstanding Charge Details)

Yes
charge_code String Code identifying the type of charge Yes
waiver String Amount waived for the particular charge Yes
remarks String Additional remarks regarding the request No
reason String Reason for the service request Yes
service_request_id String ID of the service request (if applicable) No
Outstanding Charge Details
Attribute Data Type Description Mandatory
charge_id Integer Unique identifier for the charge Yes
charge_label String Label describing the charge Yes
total_outstanding_amount Double Total outstanding amount (if applicable) No
type String Type of charge (e.g., charges) Yes
original_amount Double Original amount of the charge Yes
charge_definition_id Null Identifier for charge definition (if applicable) No
excess_money_id Integer Identifier for excess money (if applicable) No
loan_id Integer Identifier for the loan (if applicable) No
disbursal_schedule_id integer Identifier for disbursal schedule (if applicable) No
charge_code String Code representing the charge Yes
outstanding_amount Double Current outstanding amount for the charge Yes
amount_in_process Double Amount currently in process (if applicable) No
payment_status String Status of payment (if applicable) No
paid_amount Double Amount paid (if applicable) No
total_paid_amount Double Total amount paid (if applicable) No
total_paid_amount_in_process Double Total amount paid in process (if applicable) No
paid_amount_in_process Double Amount paid in process (if applicable) No
allocated_amount Double Amount allocated (if applicable) No
reason String Reason for the charge (if applicable) No
payment_date Date Date of payment (if applicable) No
repayment_id Null Identifier for repayment (if applicable) No
waiver String Amount waived for the charge Yes
Body
{
    "service_request_type": "foreclosure",
    "service_request_subtype": "2",
    "service_type": "",
    "loan_id": "123",
    "request_data": {
        "closure_date": "2023-09-27",
        "interest_till_date": "2023-09-27",
        "loan_service_charge_rate": "0",
        "is_write_off": false,
        "outstanding_charges": [
            {
                "charge_code": "customer_swap_charges",
                "waiver": "400"
            },
            {
                "charge_code": "total_principal_outstanding",
                "waiver": "1400000"
            }
        ],
        "remarks": "",
        "reason": "1403"
    },
    "service_request_id": ""
}

Response:

Success: 200 OK
Schema
Attribute Type Description Mandatory
response Boolean Response status Yes
data Object Data object No
      result String Result value No
      status String Status of the request No
      service_request_id Integer ID of the service request No
      unique_transaction_number String Unique transaction number No
error Any Error details No
Body
{
    "response": true,
    "data": {
        "result": null,
        "status": "initiated",
        "service_request_id": 1234,
        "unique_transaction_number": null
    },
    "error": null
}

Internal Validation Error: 200 OK
Schema
Expected Error code and Error Message
Error Code Error Message Resolution
1015000 Interest till date can't be empty Ensure that the interest till date is provided.
1015000 Maturity Closure Date is not given Provide the maturity closure date.
1015000 Maturity Closure Date cannot be null Ensure that the maturity closure date is not null.
1015000 Pay or revert all TDS Pay or revert all TDS (Tax Deducted at Source).
1015000 Principal waiver amount should be less than total payable amount Ensure that the principal waiver amount is less than the total payable amount.
1016008 Please Realize all the receipts before foreclosure Realize all receipts before proceeding with foreclosure.
101626 There is no pending installment, cannot do Foreclosure Ensure that there are pending installments before initiating foreclosure.
1017032 Loan is not active Activate the loan before proceeding.
1017033 Total payable is less than total dues Ensure that the total payable amount is greater than or equal to the total dues.
1017034 Net closure amount should not be greater than 0 Ensure that the net closure amount is not greater than 0.
1017035 Waived amount should be less than or equal to the outstanding amount Ensure that the waived amount is less than or equal to the outstanding amount.
101774 Please approve or reject already initiated requests Take action on already initiated requests by either approving or rejecting them.
101784 Cannot proceed for Foreclosure if Loan is not fully Disbursed Ensure that the loan is fully disbursed before proceeding with foreclosure.
30028 There are outstanding installments after foreclosure request was created. Please reject previous request and create a new foreclosure request Reject previous requests and create a new foreclosure request.
Attribute Type Description Mandatory
response Boolean Response status Yes
data Object Data object containing additional details No
        unique_transaction_number Any Unique transaction number No
error Object Error object containing error details No
        code Integer Error code (Expected Error code and Error Message) No
        text String Error message(Expected Error code and Error Message) No
Body
{
    "response": false,
    "data": {
        "unique_transaction_number": null
    },
    "error": {
        "code": 101626,
        "text": "There is no pending installment, cannot do Foreclosure"
    }
}


Service Request Action:


Once the request is successfully initiated, the Checker user is required to approve the request for closure to take effect.
To approve or reject the service request,
Service Request Actions | SynoFin Docs