Changing the payment tolerance
Description
This web service applies payment tolerance rate on a lending account. Also, it commits changes to the database and returns the updated lending account.
Definition
https://<domain>/services/apexrest/peer/v1/loanAccounts/postPaymentTolerance/*
Parameters
The table given below provides details of the request parameters used by this web service:
Field |
Type |
Description |
---|---|---|
loanId* |
String |
|
paymentTolerance* |
Integer |
This is the Payment Tolerance rate (this is a whole number). |
transactionDate |
Date |
|
startDate* |
Date |
This is the Start date to apply payment tolerance. |
endDate* |
Date |
This is the End date for the payment tolerance. |
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 |
Unable to parse the Request parameters. |
UNABLE_PARSE_REQ_PARAMS |
If error occurs while parsing request parameters. |
400 |
INVALID_INPUT |
Unknown Exception : <exception_message> |
UNKNOWN_EXCEPTION |
Unknown exception while parsing request parameters. |
400 |
INVALID_INPUT |
Loan Account Id is null. |
LOAN_ACCOUNT_ID_NULL |
Loan Account Id for Loan is not specified in the request parameters. |
400 |
INVALID_INPUT |
No parameters specified in the JSON body request. |
INVALID_JSON_BODY_IN_POST_REQUEST |
Empty JSON body passed in the HTTP Post Request. |
400 |
INVALID_INPUT |
Unable to find the Loan Account. |
LOAN_ACCOUNT_NOT_FOUND |
No record exists in the system for Loan Id (loanId) specified in the request parameters for a lending account. |
400 |
INVALID_INPUT |
Payment Tolerance Rate cannot be null or a negative value. |
INVALID_PAYMENT_TOLERANCE_RATE |
Payment Tolerance Rate specified in the request parameters is less than zero or null. |
400 |
API_EXCEPTION |
<exception_message> |
Not Applicable |
If any validation fails or any unexpected error occurs during the processing of the request, system will raise the exception. |
500 |
Sample request
The sample request to be sent is as shown below:
https://na11.salesforce.com/services/apexrest/peer/v1/loanAccounts/postPaymentTolerance
Sample response
This sample response contains the updated loan application. The sample response is as shown below:
{
"status": "SUCCESS",
"response": [],
"errorMessage": null,
"errorCode": "NO_ERROR",
"content": [
{
"attributes": {
"type": "loan__Loan_Account__c",
"url": "/services/data/v32.0/sobjects/loan__Loan_Account__c/a1WG00000050j5pMAA"
},
"Name": "LAI-00024354",
"loan__Loan_Status__c": "Active - Good Standing",
"loan__Payment_Tolerance_Start_Date__c": "2014-11-28",
"loan__Last_Transaction_Timestamp__c": "2014-11-28T18:11:17.000+0000",
"loan__Pmt_Amt_Cur__c": 94.62,
"Id": "a1WG00000050j5pMAA",
"loan__Payment_Tolerance_Rate__c": 6,
"loan__Payment_Tolerance_End_Date__c": "2014-12-23",
"loan__Last_Transaction_Type__c": "Payment Tolerance Change"
}
]
}