Retrieving the payoff quote for a loan account
Description
This web service returns the payoff quote for a loan account as on the input payoff date.
Definition
GET https://<domain>/services/apexrest/peer/v1/loanAccounts/payoff/id
Parameters
The table given below provides details of the request parameters used by this web service:
Field | Type | Description |
---|---|---|
loanId* | String |
|
transactionDate | Date | This is the creation date for pay off object. If null, then the current system date is considered. |
payOffDate | Date | This is the date for which pay off quote has to be generated. If null, then the current system date is considered for calculating the payoff amount. |
payoffQuoteName | String | This is the name of the payoff quote. |
applyFuturePayments | Boolean | This indicates whether future payments will be paid on time or not. |
generateQuoteForEntireFacility | Boolean | This indicates whether the payoff quote is to be generated for the entire Master Facility or not. |
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 | Loan Account ID (loanId) is not specified in the request URL | 400 |
INVALID_INPUT | Unable to find the Loan Account | LOAN_ACCOUNT_NOT_FOUND | No record exists in the system for the Loan Account ID (loanId) specified in the request URL | 400 |
API_EXCEPTION | Unable to generate the Payoff Quote. | PAYOFF_QUOTE_NOT_GENERATED | System is unable to generate a Payoff Quote because of an unknown reason | 500 |
API_EXCEPTION | <exception_message> | NA | 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:
GET /services/apexrest/peer/v1/loanAccounts/payoff/a7w6g000000bw4cAAA?transactionDate=2017-01-18&payOffDate=2017-05-18&payoffQuoteName=sample&applyFuturePayments=true&generateQuoteForEntireFacility=true
Sample response
This sample response contains the payments between the specified dates for the given loan account. The sample response is as shown below:
{ "status":"SUCCESS", "response":[ ], "errorMessage":null, "errorCode":"NO_ERROR", "content":[ { "attributes":{ "type":"loan__Payoff_Quote__c" }, "loan__Poq_Interest_Per_Diem__c":4.45, "loan__Poq_Interest_Rate__c":8.9, "loan__Poq_Unpaid_Interest__c":1139.2, "loan__Poq_valid_till_Dt__c":"2014-08-28", "loan__Poq_Excess_Amount_Paid__c":0, "loan__Poq_Trust_Balance__c":0, "loan__Poq_Next_Payment_Due_Dt__c":"2014-01-12", "loan__Poq_Principal_Bal__c":18000, "loan__Poq_Total_Payoff_Amount__c":19139.2, "loan__Poq_Accrued_Late_Charges__c":0, "loan__Poq_Accrued_Interest__c":0, "loan__Poq_Maturity_Date__c":"2016-12-12", "loan__Poq_Interest_Paid_Till_Dt__c":0, "loan__Poq_Other_Fees__c":0, "loan__Poq_Unpaid_Late_Charges__c":0, "loan__Poq_Prepayment_Penalty__c":0, "loan__Poq_Unpaid_Charges__c":0, "loan__Loan_Account__c":"a1WG0000000jMuzMAE", "loan__Poq_Transaction_Date__c":"2014-06-13" } ] }