Retrieving the investment details of a loan account
Description
This web service returns investment details of a loan account. Investment Details include average bid size and number of Investors for the loan account.
Definition
GET https://<domain>/services/apexrest/peer/v1/loanAccounts/getInvestmentDetails/*
Parameters
The table given below provides details of the request parameter used by this web service:
Field | Type | Description |
---|---|---|
loanId* | String |
|
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:
https://na11.salesforce.com/services/apexrest/peer/v1/loanAccounts/getInvestmentDetails/LAI-00000254
Sample response
The sample request to be sent is as shown below:
{ "status": "SUCCESS", "response": [ { "noOfInvestors": 7, "avgBidSize": 628.5714285714286 } ], "errorMessage": null, "errorCode": "NO_ERROR", "content": [] }