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 are the methods users 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", //Change with actual laon Id
    "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 (foreclosure) Yes
service_request_subtype string Subtype of service request (2) No
loan_id string ID of the loan Yes
balance_tenure string Remaining tenure of the loan No
total_dues number Total outstanding dues on the loan No
unrealized_receipt string Unrealized receipt amount No
last_due_date string Date of the last due payment No
closure_date string Date of foreclosure closure Yes
interest_till_date string Date until which interest is calculated Yes
loan_service_charge_rate number Rate of loan service charge No
loan_service_charge_amount number Amount of loan service charge No
refunds number Refund amount No
interest_due number Due amount of interest No
balance_principal string Remaining principal balance No
principal_outstanding number Outstanding principal amount Yes
excess_money string Excess money available No
advance_installment number Advance installment amount No
per_day_interest number Interest accrued per day No
net_closure_amount number Net closure amount No
lockin_period number Lock-in period duration No
reason

string


Fetched for Synofin Master

In the following key-value pair, 
the user is required to pass the key corresponding to the desired closure reason.

Click the link below to get the key for the foreclosure reason.
Get Foreclosure Master 

Yes
closure_type string
Fetched for Synofin master
Key
own_fund
external_bt
internal_bt
 
Yes
waiver_users string Users eligible for waiver No
uploadFile string File upload for documentation No
total_waiver_amount number Total amount waived No
is_write_off boolean Flag indicating if it's a write-off No
write_off_amount number Amount to write off No
settled_amount number Settled amount No
outstanding_charges array

Array of outstanding charges

(Outstanding Charges Details)

No
remarks string Additional remarks No
payment_on_hold_reason string Reason for holding payment No
other_reason string Any other reason No
total_waived_amount number Total amount waived No
transaction_date string Date of the transaction Yes
service_request_id string ID of the service request 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": {
        "balance_tenure": "0",
        "total_dues": 0,
        "unrealized_receipt": "0",
        "last_due_date": "04-06-2028",
        "closure_date": "2029-03-03",
        "interest_till_date": "2029-03-03",
        "loan_service_charge_rate": 8,
        "loan_service_charge_amount": 0,
        "refunds": 10001.5,
        "interest_due": 0,
        "balance_principal": "0",
        "principal_outstanding": 206250,
        "excess_money": "0",
        "advance_installment": 10000,
        "per_day_interest": 0,
        "net_closure_amount": 20001.5,
        "lockin_period": 0,
        "reason": "1332",
        "closure_type": "own_fund",
        "waiver_users": "others",
        "uploadFile": "",
        "total_waiver_amount": 278811.62,
        "is_write_off": false,
        "write_off_amount": 206250,
        "settled_amount": 0,
        "outstanding_charges": [
            {
                "charge_id": 1234,
                "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,
                "waiver": "75685.2"
            },
            {
                "charge_id": 456,
                "charge_label": "Total Interest Outstanding",
                "total_outstanding_amount": null,
                "type": null,
                "original_amount": null,
                "charge_definition_id": -2,
                "excess_money_id": null,
                "loan_id": null,
                "disbursal_schedule_id": null,
                "charge_code": null,
                "outstanding_amount": 9068,
                "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,
                "waiver": "9068"
            }
        ],
        "remarks": "",
        "payment_on_hold_reason": "",
        "other_reason": "",
        "total_waived_amount": 0,
        "transaction_date": "2029-03-03"
    },
    "service_request_id": ""
}

Response:

Success: 200 OK
Schema
Expected Error Code and Message
Error CodeError MessageResolution
1015000Interest till date can't be emptyEnsure that the interest till date is provided.
1015000Maturity Closure Date is not givenProvide the maturity closure date.
1015000Maturity Closure Date cannot be nullEnsure that the maturity closure date is not null.
1015000Pay or revert all TDSPay or revert all TDS (Tax Deducted at Source).
1015000Principal waiver amount should be less than total payable amountEnsure that the principal waiver amount is less than the total payable amount.
1016008Please Realize all the receipts before foreclosureRealize all receipts before proceeding with foreclosure.
101626There is no pending installment, cannot do ForeclosureEnsure that there are pending installments before initiating foreclosure.
1017032Loan is not activeActivate the loan before proceeding.
1017033Total payable is less than total duesEnsure that the total payable amount is greater than or equal to the total dues.
1017034Net closure amount should not be greater than 0Ensure that the net closure amount is not greater than 0.
1017035Waived amount should be less than or equal to the outstanding amountEnsure that the waived amount is less than or equal to the outstanding amount.
101774Please approve or reject already initiated requestsTake action on already initiated requests by either approving or rejecting them.
101784Cannot proceed for Foreclosure if Loan is not fully DisbursedEnsure that the loan is fully disbursed before proceeding with foreclosure.
30028There are outstanding installments after foreclosure request was created. Please reject previous request and create a new foreclosure requestReject previous requests and create a new foreclosure request.
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
AttributeTypeDescriptionMandatory
responseBooleanResponse statusYes
dataObjectData object containing additional detailsNo
        unique_transaction_numberAnyUnique transaction numberNo
errorObjectError object containing error detailsNo
        codeIntegerError codeNo
        textStringError messageNo
Body
{
    "response": false,
    "data": {
        "unique_transaction_number": null
    },
    "error": {
        "code": 101626,
        "text": "There is no pending installment, cannot do Foreclosure"
    }
}