Retrieving a loan account with related list of parameters
Description
This web service returns the details of a loan account such as Payments, Charges, Amortization schedule, Payment schedule summary and Other Transactions.
Definition
GET https://<domain>/services/apexrest/peer/v1/loanAccounts/getDetails/*
Parameters
The table given below provides details of the request parameters used by this web service:
Fields | Type | Description |
---|---|---|
loanId* |
String |
|
additionalLoanFields |
String | This is a comma separated list of additional loan account fields. |
additionalPaymentFields |
String | This is a comma separated list of additional loan payment fields. |
additionalChargeFields |
String | This is a comma separated list of additional charge fields. |
additionalPmtSchdSummaryFields |
String | This is a comma separated list of additional Payment Schedule Summary fields. |
additionalAmzSchdFields |
String | This is a comma separated list of additional Amortization Schedule fields. |
additionalOtherTxnFields |
String | This is a comma separated list of additional Other Transactions fields. |
Error messages
When you use this web service you can receive the possible error messages as shown in the table below:
Error code | Error Message | System.Label | Reason | HTTP Status Code |
---|---|---|---|---|
INVALID_INPUT |
Loan Account Id is null |
LOAN_ACCOUNT_ID_NULL |
You will receive this error if the loan Account Id (loanId) is not specified in the Request URL. |
400 |
INVALID_INPUT |
Unable to find the Loan Account |
LOAN_ACCOUNT_NOT_FOUND |
You will receive this error if no record exists in the system for the Loan Account Id (loanId) specified in the Request URL. |
400 |
API_EXCEPTION |
<exception_message> |
NA |
You will receive this error if any validation fails or any unexpected error occurs during the processing of the request, the system will raise the exception. |
500 |
Sample request
The sample request to be sent is as shown below:
Sample response
This sample response contains the payments between the specified dates for the given loan account. The sample response that you will receive is as shown below:
{ "status":"SUCCESS", "response":[ ], "errorMessage":null, "errorCode":"NO_ERROR", "content":[ { "attributes":{ "type":"loan__Loan_Account__c", "url":"/services/data/v30.0/sobjects/loan__Loan_Account__c/a1WG0000000jLIvMAM" }, "loan__Interest_Accrued_Not_Due__c":38.95, "loan__Total_Amount_Paid__c":3872.5, "loan__Active_Investor__c":false, "loan__Disbursal_Date__c":"2015-03-04", "loan__Principal_Remaining__c":8127.5, "loan__Maturity_Date_Current__c":"2016-02-05", "loan__Expected_Disbursal_Date__c":"2015-03-04", "loan__Loan_Status__c":"Active - Good Standing", "loan__Other_Loan_Transactions__r":{ "totalSize":1, "done":true, "records":[ { "attributes":{ "type":"loan__Other_Transaction__c", "url":"/services/data/v30.0/sobjects/loan__Other_Transaction__c/a23G0000000M4IbIAK" }, "Name":"OLTID-0000000003", "loan__OT_ACH_Debit_Date__c":"2014-12-22", "loan__Passed_Term__c":0, "loan__Additional_Interest_Amt__c":0, "loan__Repayment_Start_Date__c":"2014-07-18", "loan__Txn_Date__c":"2013-12-21", "loan__Transaction_Type__c":"One Time ACH", "loan__Txn_Amt__c":0, "Id":"a23G0000000M4IbIAK", "loan__Same_monthly_payment__c":false, "loan__Loan_Account__c":"a1WG0000000jLIvMAM", "loan__Interest_Only_Period__c":0 } ] }, "loan__Repayment_Schedule_Summary__r":{ "totalSize":1, "done":true, "records":[ { "attributes":{ "type":"loan__Repayment_Schedule_Summary__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule_Summary__c/a2KG00000000mzfMAA" }, "Name":"RSS-0000000008", "loan__RSS_Repayment_Amt__c":1118.7183333333332, "loan__RSS_Primary_flag__c":true, "loan__RSS_Repayment_Dt__c":"2015-03-05", "loan__RSS_No_Of_Pmts__c":12, "Id":"a2KG00000000mzfMAA", "loan__RSS_Loan_Account__c":"a1WG0000000jLIvMAM", "loan__RSS_Seq__c":1 } ] }, "loan__Pay_Off_Amount_As_Of_Today__c":8091.451878767123, "loan__Interest_Waived__c":0, "loan__Pmt_Amt_Cur__c":1118.72, "loan__Loan_Amount__c":12000, "loan__Last_Payment_Date__c":"2013-12-12", "loan__Fees_Remaining__c":25, "loan__Last_Installment_Date__c":"2016-02-05", "loan__Interest_Remaining__c":0, "loan__Next_Installment_Date__c":"2015-03-05", "loan__Due_Day__c":5, "loan__Number_of_Days_Overdue__c":0, "loan__Pre_Bill_Days__c":0, "loan__Charges__r":{ "totalSize":1, "done":true, "records":[ { "attributes":{ "type":"loan__Charge__c", "url":"/services/data/v30.0/sobjects/loan__Charge__c/a0TG000000KvIY3MAN" }, "loan__Interest_Bearing__c":false, "loan__Paid__c":false, "loan__Date__c":"2013-12-19", "loan__Total_Due_Amount__c":25, "loan__Interest_Due__c":0, "loan__Principal_Due__c":25, "loan__Waive__c":false, "Name":"CHG-00000007", "loan__Paid_Amount__c":0, "loan__Original_Amount__c":25, "Id":"a0TG000000KvIY3MAN", "loan__Calculated_Interest3__c":0, "loan__Fee__c":"a13G0000002WIYrIAO", "loan__Charge_Type__c":"NSF Fees", "loan__Loan_Account__c":"a1WG0000000jLIvMAM" } ] }, "loan__Interest_Rate__c":24.99, "loan__Last_Transaction_Timestamp__c":"2013-12-19T09:46:34.000+0000", "loan__Amount_to_Current__c":0, "loan__Last_Accrual_Date__c":"2013-12-12", "loan__Loan_Payment_Transactions__r":{ "totalSize":2, "done":true, "records":[ { "attributes":{ "type":"loan__Loan_Payment_Transaction__c", "url":"/services/data/v30.0/sobjects/loan__Loan_Payment_Transaction__c/a1dG00000003CfKIAU" }, "loan__Transaction_Time__c":"2013-12-19T09:46:33.000+0000", "loan__Reversed__c":true, "loan__Rejected__c":false, "loan__Cleared__c":true, "loan__Excess__c":0, "loan__Payment_Mode__c":"a2AG00000002bpLMAQ", "loan__Fees__c":0, "loan__Principal__c":61.04812123287671, "loan__Transaction_Date__c":"2013-12-19", "loan__Transaction_Amount__c":100, "Name":"LPT-000000539", "CreatedDate":"2014-06-25T08:46:33.000+0000", "Id":"a1dG00000003CfKIAU", "loan__Interest__c":38.95187876712329, "loan__Payment_Mode__r":{ "attributes":{ "type":"loan__Payment_Mode__c", "url":"/services/data/v30.0/sobjects/loan__Payment_Mode__c/a2AG00000002bpLMAQ" }, "Name":"ACH", "Id":"a2AG00000002bpLMAQ" }, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Loan_Payment_Transaction__c", "url":"/services/data/v30.0/sobjects/loan__Loan_Payment_Transaction__c/a1dG00000002xomIAA" }, "loan__Transaction_Time__c":"2013-12-12T08:06:42.000+0000", "loan__Reversed__c":false, "loan__Rejected__c":false, "loan__Cleared__c":true, "loan__Excess__c":0, "loan__Payment_Mode__c":"a2AG00000002bpKMAQ", "loan__Fees__c":0, "loan__Principal__c":3872.50301369863, "loan__Transaction_Date__c":"2013-12-12", "loan__Transaction_Amount__c":200, "Name":"LPT-000000001", "CreatedDate":"2014-04-08T07:06:42.000+0000", "Id":"a1dG00000002xomIAA", "loan__Interest__c":-3672.50301369863, "loan__Payment_Mode__r":{ "attributes":{ "type":"loan__Payment_Mode__c", "url":"/services/data/v30.0/sobjects/loan__Payment_Mode__c/a2AG00000002bpKMAQ" }, "Name":"Cash", "Id":"a2AG00000002bpKMAQ" }, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" } ] }, "Name":"LAI-00000003", "loan__Frequency_of_Loan_Payment__c":"Monthly", "loan__Next_Due_Generation_Date__c":"2015-03-05", "loan__Write_off_Tolerance_Amount__c":0, "loan__Accrual_Stop_Indicator__c":false, "Id":"a1WG0000000jLIvMAM", "loan__Interest_Calculation_Method__c":"Declining Balance", "loan__Repayment_Schedule__r":{ "totalSize":12, "done":true, "records":[ { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMMMA2" }, "Name":"RSI-0000000096", "loan__Balance__c":10889.501666666667, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":1110.4983333333332, "loan__Due_Date__c":"2015-03-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMMMA2", "loan__Due_Interest__c":8.22, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMNMA2" }, "Name":"RSI-0000000097", "loan__Balance__c":10001.903333333334, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":887.5983333333334, "loan__Due_Date__c":"2015-04-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMNMA2", "loan__Due_Interest__c":231.12, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMOMA2" }, "Name":"RSI-0000000098", "loan__Balance__c":9088.625, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":913.2783333333333, "loan__Due_Date__c":"2015-05-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMOMA2", "loan__Due_Interest__c":205.44, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMPMA2" }, "Name":"RSI-0000000099", "loan__Balance__c":8162.806666666666, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":925.8183333333334, "loan__Due_Date__c":"2015-06-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMPMA2", "loan__Due_Interest__c":192.9, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMQMA2" }, "Name":"RSI-0000000100", "loan__Balance__c":7211.748333333333, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":951.0583333333333, "loan__Due_Date__c":"2015-07-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMQMA2", "loan__Due_Interest__c":167.66, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMRMA2" }, "Name":"RSI-0000000101", "loan__Balance__c":6246.09, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":965.6583333333333, "loan__Due_Date__c":"2015-08-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMRMA2", "loan__Due_Interest__c":153.06, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMSMA2" }, "Name":"RSI-0000000102", "loan__Balance__c":5259.941666666667, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":986.1483333333333, "loan__Due_Date__c":"2015-09-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMSMA2", "loan__Due_Interest__c":132.57, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMTMA2" }, "Name":"RSI-0000000103", "loan__Balance__c":4249.263333333333, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":1010.6783333333333, "loan__Due_Date__c":"2015-10-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMTMA2", "loan__Due_Interest__c":108.04, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMUMA2" }, "Name":"RSI-0000000104", "loan__Balance__c":3220.735, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":1028.5283333333334, "loan__Due_Date__c":"2015-11-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMUMA2", "loan__Due_Interest__c":90.19, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMVMA2" }, "Name":"RSI-0000000105", "loan__Balance__c":2168.1666666666665, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":1052.5683333333334, "loan__Due_Date__c":"2015-12-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMVMA2", "loan__Due_Interest__c":66.15, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMWMA2" }, "Name":"RSI-0000000106", "loan__Balance__c":1095.4683333333332, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":1072.6983333333333, "loan__Due_Date__c":"2016-01-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMWMA2", "loan__Due_Interest__c":46.02, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" }, { "attributes":{ "type":"loan__Repayment_Schedule__c", "url":"/services/data/v30.0/sobjects/loan__Repayment_Schedule__c/a2LG00000002IMXMA2" }, "Name":"RSI-0000000107", "loan__Balance__c":4e-36, "loan__Total_Due_Fees__c":0, "loan__Due_Principal__c":1095.4683333333332, "loan__Due_Date__c":"2016-02-05", "loan__Total_Installment__c":1118.72, "Id":"a2LG00000002IMXMA2", "loan__Due_Interest__c":23.25, "loan__Loan_Account__c":"a1WG0000000jLIvMAM" } ] }, "loan__Last_Transaction_Type__c":"Payment Transaction", "loan__Time_Counting_Method__c":"Actual Days" } ] }