Retrieving Loan Payments
Description
This web service returns the Loan Payment Transactions of a Loan Account.
Definition
https://<domain>/services/apexrest/peer/v1/loanAccounts/payments/*'
Parameters
The table given below provides details of the request parameters used by this web service:
Fields | Type | Description |
---|---|---|
loanId* |
String |
|
startDate |
String |
|
endDate |
String |
|
Error messages
When you post a 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 |
INVALID_INPUT |
Unknown Exception : <exception_message> |
UNKNOWN_EXCEPTION |
You will receive this error if there is any error while parsing the request parameters. |
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:
https://na11.salesforce.com/services/apexrest/peer/v1/loanAccounts/payments/LAI-00000426?startDate=2013-12-18&endDate=2013-12-19
Sample response
The sample response that you will receive is as shown below:
{
"status": "SUCCESS",
"response": [],
"errorMessage": null,
"errorCode": "NO_ERROR",
"content": [
{
"attributes": {
"type": "loan__Loan_Payment_Transaction__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Payment_Transaction__c/a1dG00000003KOkIAM" },
"loan__Transaction_Time__c": "2013-12-19T08:40:06.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": 96.72821928240741,
"loan__Transaction_Date__c": "2013-12-19",
"loan__Transaction_Amount__c": 100,
"Name": "LPT-000000618",
"CreatedDate": "2014-07-01T07:40:06.000+0000",
"Id": "a1dG00000003KOkIAM",
"loan__Interest__c": 3.2717807175925926,
"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" }
},
{
"attributes": {
"type": "loan__Loan_Payment_Transaction__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Payment_Transaction__c/a1dG00000003LA6IAM" },
"loan__Transaction_Time__c": "2013-12-19T14:19:13.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": 100,
"loan__Transaction_Date__c": "2013-12-19",
"loan__Transaction_Amount__c": 100,
"Name": "LPT-000000764",
"CreatedDate": "2014-07-04T13:19:13.000+0000",
"Id": "a1dG00000003LA6IAM",
"loan__Interest__c": 0,
"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" }
},
{
"attributes": {
"type": "loan__Loan_Payment_Transaction__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Payment_Transaction__c/a1dG00000003LABIA2" },
"loan__Transaction_Time__c": "2013-12-19T14:19:24.000+0000",
"loan__Reversed__c": false,
"loan__Rejected__c": false,
"loan__Cleared__c": true,
"loan__Excess__c": 0,
"loan__Payment_Mode__c": "a2AG00000002bpLMAQ",
"loan__Fees__c": 0,
"loan__Principal__c": 100,
"loan__Transaction_Date__c": "2013-12-19",
"loan__Transaction_Amount__c": 100,
"Name": "LPT-000000765",
"CreatedDate": "2014-07-04T13:19:24.000+0000",
"Id": "a1dG00000003LABIA2",
"loan__Interest__c": 0,
"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" }
},
{
"attributes": {
"type": "loan__Loan_Payment_Transaction__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Payment_Transaction__c/a1dG00000003LAGIA2" },
"loan__Transaction_Time__c": "2013-12-19T14:19:32.000+0000",
"loan__Reversed__c": false,
"loan__Rejected__c": false,
"loan__Cleared__c": true,
"loan__Excess__c": 0,
"loan__Payment_Mode__c": "a2AG00000002bpLMAQ",
"loan__Fees__c": 0,
"loan__Principal__c": 100,
"loan__Transaction_Date__c": "2013-12-19",
"loan__Transaction_Amount__c": 100,
"Name": "LPT-000000766",
"CreatedDate": "2014-07-04T13:19:32.000+0000",
"Id": "a1dG00000003LAGIA2",
"loan__Interest__c": 0,
"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" }
},
{
"attributes": {
"type": "loan__Loan_Payment_Transaction__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Payment_Transaction__c/a1dG00000003MsZIAU" },
"loan__Transaction_Time__c": "2013-12-19T13:30:15.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": 100,
"loan__Transaction_Date__c": "2013-12-19",
"loan__Transaction_Amount__c": 100,
"Name": "LPT-000000889",
"CreatedDate": "2014-07-10T12:30:15.000+0000",
"Id": "a1dG00000003MsZIAU",
"loan__Interest__c": 0,
"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" }
},
{
"attributes": {
"type": "loan__Loan_Payment_Transaction__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Payment_Transaction__c/a1dG00000003QyLIAU" },
"loan__Transaction_Time__c": "2013-12-19T14:03:48.000+0000",
"loan__Reversed__c": false,
"loan__Rejected__c": false,
"loan__Cleared__c": false,
"loan__Excess__c": 0,
"loan__Payment_Mode__c": "a2AG00000002bpKMAQ",
"loan__Fees__c": 0,
"loan__Principal__c": 0,
"loan__Transaction_Date__c": "2013-12-19",
"loan__Transaction_Amount__c": 100,
"Name": "LPT-000000978",
"CreatedDate": "2014-07-23T13:03:48.000+0000",
"Id": "a1dG00000003QyLIAU",
"loan__Interest__c": 0,
"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" }
},
{
"attributes": {
"type": "loan__Loan_Payment_Transaction__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Payment_Transaction__c/a1dG00000003Uv3IAE" },
"loan__Transaction_Time__c": "2013-12-19T07:23:07.000+0000",
"loan__Reversed__c": false,
"loan__Rejected__c": false,
"loan__Cleared__c": false,
"loan__Excess__c": 0,
"loan__Payment_Mode__c": "a2AG00000002bpKMAQ",
"loan__Fees__c": 0,
"loan__Principal__c": 0,
"loan__Transaction_Date__c": "2013-12-19",
"loan__Transaction_Amount__c": 100,
"Name": "LPT-000001329",
"CreatedDate": "2014-09-03T07:23:08.000+0000",
"Id": "a1dG00000003Uv3IAE",
"loan__Interest__c": 0,
"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" }
}
]
}