Skip to main content

Loan Action : Adhoc Receivable

POST Adhoc Receivable

This API facilitates the initiation of adhoc receivable requests within the SynoFin system. Users can create receivables associated with specific loan accounts by providing relevant details through the request body.

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 adhoc receivable, users must gather data for charges and other necessary information. This enables them to execute the adhoc receivable process effectively. Here is the method user can employ to retrieve the required data for adhoc receivable:

Retrieve Data for adhoc receivable

In order to retrieve information for Adhoc Receivable charges, 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": "adhoc_receivable"
}

Response Body

{
    "response": true,
    "data": {
        "tax_amount": null,
        "effective_amount": null,
        "receivableDueDate": "2029-10-10",
        "receivable_charge": [
            {
                "key": "imd_income",
                "value": "IMD income",
                "is_tax_applicable": true
            }
        ]
    },
    "error": null
}


Another important API for Adhoc charges comes into play when the charge that is added is tax/GST applicable. This endpoint helps the user calculate the tax configured in the Synofin LMS system. If not configured, it can be added or reconfigured using the Synofin admin panel. Here is the method users can employ to calculate the taxed amount for adhoc receivables:

Calculate taxed amount for adhoc receivable

This API calculates the tax amount and total amount including tax for a given adhoc charge.

Note: All charges that are tax-applicable will be retrieved using the getDataForLoanAction with the key in the response as:

getDataForLoanAction Reference JSON

"receivable_charge": [
      {
        "key": "imd_income", //charge code that need to be passed in the request param
        "value": "IMD income",
        "is_tax_applicable": true //if tax/GST is applicable as configured in SynoFin Admin else by default false 
      }
	]
},


API Endpoint: {{base_url}}/loan-modification/v1/gst-calculation

Run in Postman: Calculate Tax/GST

Request Body

GET https://api-preprod.synofin.tech/lms/loan-modification/v1/gst-calculation?amount=10000&charge_code=repossession_charge

Response Body

{
    "response": true,
    "data": {
        "tax_amount": 1800.0,
        "total_amount": 11800.0
    },
    "error": null
}
URL: {{base_url}}/loan-modification/v1/service-request/save
Run in Postman: Adhoc Receivable

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 No
loan_id string ID of the loan associated with the request Yes
request_data object Additional data related to the request Yes
receivableDueDate string Due date for the receivable Yes
receivable_charge string Type of receivable charge Yes
amount string Amount of the receivable Yes
reason string Reason for the request Yes
tax_amount string Amount of tax associated with the request Yes
total_amount string Total amount of the request including tax Yes
uploadFile string File uploaded with the request No
remarks string Additional remarks regarding the request No
transaction_date string Date of the transaction Yes
service_request_id string ID of the service request No
Body
{
    "service_request_type": "adhoc_receivable",
    "service_request_subtype": "2",
    "service_type": "",
    "loan_id": "1234",  //replace with actual Loan Id
    "request_data": {
        "receivableDueDate": "2024-03-08",
        "receivable_charge": "interest_due_fc_charge",
        "amount": "10000",
        "reason": "1380",
        "tax_amount": "0",
        "total_amount": "10000",
        "uploadFile": "",
        "remarks": "",
        "transaction_date": "2024-03-08"
    },
    "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
1017039 Loan is foreclosed Loan Id is foreclosed. Please check the loan status
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": 1017039,
        "text": "Loan is foreclosed"
    }
}


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