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 for
Attribute Data Type Description Mandatory
service_request_type stringString Type of service request (foreclosure) Yes
service_request_subtype stringString Subtype of service requestYes
service_typeStringType of service requested (2)if applicable) No
loan_id stringString ID of the loan associated with the requestYes
request_dataObjectData related to the service requestYes
closure_dateStringDate of closure for the loan Yes
balance_tenurestringRemaining tenure of the loanNo
total_duesnumberTotal outstanding dues on the loanNo
unrealized_receiptstringUnrealized receipt amountNo
last_due_datestringDate of the last due paymentNo
closure_datestringDate of foreclosure closureYes
interest_till_date stringString Date until which interest is calculated Yes
loan_service_charge_rate numberString Rate of loan service charge No
loan_service_charge_amountnumberAmount ofthe loan service chargeNo
refundsnumberRefund amountNo
interest_duenumberDue amount of interestNo
balance_principalstringRemaining principal balanceNo
principal_outstandingnumberOutstanding principal amount Yes
excess_moneyis_write_off stringBoolean ExcessIndicates moneyif availablethe request is for a write-off (Default "False") NoYes
advance_installmentoutstanding_charges numberArray Advance installment

Array amountof outstanding charges and waivers

(Outstanding Charge Details)

NoYes
per_day_interestcharge_code numberString InterestCode accruedidentifying perthe daytype of charge NoYes
net_closure_amountwaiver numberString NetAmount closurewaived amountfor the particular charge NoYes
lockin_periodremarks numberString Lock-inAdditional periodremarks durationregarding the request 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_typestring
Fetched for Synofin master
Key
own_fund
external_bt
internal_bt
 
Yes
waiver_usersstringUsers eligible for waiverNo
uploadFilestringFile upload for documentationNo
total_waiver_amountnumberTotal amount waivedNo
is_write_offbooleanFlag indicating if it's a write-offNo
write_off_amountnumberAmount to write offNo
settled_amountnumberSettled amountNo
outstanding_chargesarray

Array of outstanding charges

(Outstanding Charges Details)

No
remarksstringAdditional remarksNo
payment_on_hold_reasonstringString Reason for holding paymentNo
other_reasonstringAny other reasonNo
total_waived_amountnumberTotal amount waivedNo
transaction_datestringDate of the transactionservice request Yes
service_request_id stringString 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": {
        "balance_tenure"closure_date": "2023-09-27",
        "interest_till_date": "2023-09-27",
        "loan_service_charge_rate": "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"customer_swap_charges",
                "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"400"
            },
            {
                "charge_id": 456,
                "charge_label"charge_code": "Total Interest Outstanding"total_principal_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"1400000"
            }
        ],
        "remarks": "",
        "payment_on_hold_reason"reason": "",
        "other_reason": "",
        "total_waived_amount": 0,
        "transaction_date": "2029-03-03"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