Creating an Investor Fund Transaction
Description
This web service creates unclear investor fund transactions and commits it to the database. This can be used to create investor fund transaction for deposit and withdrawal.
Definition
POST https://<domain>/services/apexrest/peer/v1/investorFundTransactions
Parameters
The table given below provides details of the request parameters used by this web service:
Fields | Type | Description |
---|---|---|
investorId* |
String |
|
amount* |
Decimal |
|
transactionDate |
Date |
|
paymentMode | String |
|
accountId |
String |
|
sms_Token |
String |
|
sms_Unique_Id |
String |
|
ipaddress |
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 | Unable to parse the request parameters | UNABLE_PARSE_REQ_PARAMS | You will receive this error while parsing request parameters. |
400 |
INVALID_INPUT | Unknown Exception <exception_message> | UNKNOWN_EXCEPTION |
You will receive this error if an unknown exception while parsing request parameters. |
400 |
INVALID_INPUT |
Investor ID is null |
INVESTOR_ID_NULL |
You will receive this error if the Account ID for investor (investorId) is not specified in the request parameters. |
400 |
INVALID_INPUT |
Unable to find the Investor Account |
INVESTOR_ACCOUNT_NOT_FOUND |
You will receive this error if no record exists in the system for Account Id (investorId) specified in the request parameters for investor. |
400 |
INVALID_INPUT |
Investor Fund Transaction Amount is null |
INVESTOR_FUND_TXN_AMT_NULL |
You will receive this error if the transaction amount is not specified in the request parameters or is null. |
400 |
INVALID_INPUT |
Investor Fund Transaction date is null |
INVESTOR_FUND_TXN_DATE_NULL |
You will receive this error if the system is not able to get the current system date. |
400 |
INVALID_INPUT |
Payment mode is not valid |
PAYMENT_MODE_NOT_VALID |
You will receive this error if the payment mode specified in the request parameters are invalid. |
401 |
SMS_ERROR |
SMS Parameters are not provided |
NO_PARAMS_SMS |
You will receive this error if the parameters required for SMS verification are not specified in the request parameters. |
401 |
SMS_ERROR |
SMS verification failed |
INCORRECT_SMS |
You will receive this error if the SMS verification has failed. |
401 |
SMS_ERROR |
SMS has been resent maximum allowed times. |
MAX_RETRY_SMS |
You will receive this error if the maximum Limit of SMS retries has been reached. |
401 |
SMS_ERROR |
SMS has already been verified. |
VERIFIED_SMS |
You will receive this error if the SMS has been verified already. |
401 |
SMS_ERROR |
SMS verification has been timed out. |
TIMEOUT_SMS |
You will receive this error if the SMS has timed out. |
401 |
API_EXCEPTION |
<exception_message> |
NA |
You will receive this error if the validation fails or if an 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/investorFundTransactions
{ "investorId":"001G000001Phdoe", "amount":-1500 }
Sample response
This sample response contains the newly created loan application for the given borrower. The sample response that you will receive is as shown below:
{ "status":"SUCCESS", "response":[ ], "errorMessage":null, "errorCode":"NO_ERROR", "content":[ { "attributes":{ "type":"loan__Investor_Fund_Transaction__c", "url":"/services/data/v30.0/sobjects/loan__Investor_Fund_Transaction__c/a1HG000000677VzMAI" }, "loan__Transaction_Date__c":"2014-06-18", "loan__Transaction_Amount__c":-1500, "Id":"a1HG000000677VzMAI", "loan__Payment_Mode__c":"a2AG00000002bpLMAQ", "loan__Account__c":"001G000001PhdoeIAB" } ] }