Retrieving Investment Bookings
Description
This web service returns all the investment bookings that belong to an investor.
Definition
https://<domain>/services/apexrest/peer/v1/investmentBookings
Parameters
The table given below provides details of the request parameters used by this web service:
Fields | Type | Description |
---|---|---|
investorId * |
String |
|
status |
String |
Examples - Partial Winning, Winning, Losing and Uncommitted. |
stage |
String |
Examples - In Funding, Funded, Expired, Cancelled etc.. |
loanApplicationStatus |
String |
Examples - New, In Funding, Funded, Expired, Canceled etc.. |
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 |
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 |
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/investmentBookings?investorId=001G000001Phdoe&stage=In Funding,New
Sample Response
The sample response that you will receive is as shown below:
{
"status": "SUCCESS",
"response": [],
"errorMessage": null,
"errorCode": "NO_ERROR",
"content": [
{
"attributes": {
"type": "peer__Investment_Booking__c",
"url": "/services/data/v30.0/sobjects/peer__Investment_Booking__c/a2tG00000004iJxIAI" },
"peer__Stage__c": "In Funding",
"peer__Status__c": "Winning",
"peer__Service_Rate__c": 9,
"peer__Investment_Amount__c": 10000,
"peer__Booking_Order__r": {
"attributes": {
"type": "peer__Booking_Order__c",
"url": "/services/data/v30.0/sobjects/peer__Booking_Order__c/a2uG00000005hp5IAA" },
"peer__Investor__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v30.0/sobjects/Account/001G000001PhdoeIAB" },
"Name": "Anil Bhat market place",
"loan__Undeployed_Funds__c": 47197.31,
"loan__Deployed_Funds__c": 281580,
"peer__Nickname__c": "Anil",
"Id": "001G000001PhdoeIAB",
"loan__Reinvest_Principal__c": false,
"loan__Reinvest_Interest__c": false
},
"peer__Investor__c": "001G000001PhdoeIAB",
"peer__Funded_Amount__c": 15000,
"peer__Amount__c": 25000,
"peer__Number_of_Bookings__c": 3,
"Id": "a2uG00000005hp5IAA",
"peer__Amount_In_Funding__c": 10000
},
"Name": "IB-00008687",
"peer__Loan_Application__r": {
"attributes": {
"type": "peer__Loan_Application__c",
"url": "/services/data/v30.0/sobjects/peer__Loan_Application__c/a2qG00000009FdSIAU" },
"peer__Borrower__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v30.0/sobjects/Account/001G000001KY8byIAD" },
"peer__Nickname__c": "Shivam",
"Id": "001G000001KY8byIAD" },
"peer__Borrower__c": "001G000001KY8byIAD",
"peer__Loan_Purpose_1__c": "a1hG0000000JR1tIAG",
"peer__Loan__c": "a1WG0000000jwIOMAY",
"peer__Expiry_Date__c": "2013-12-31T15:46:00.000+0000",
"peer__Loan_Purpose_1__r": {
"attributes": {
"type": "loan__Loan_Purpose__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Purpose__c/a1hG0000000JR1tIAG" },
"Name": "Family",
"Id": "a1hG0000000JR1tIAG" },
"peer__Loan__r": {
"attributes": {
"type": "loan__Loan_Account__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Account__c/a1WG0000000jwIOMAY" },
"loan__Loan_Status__c": "Partial Application",
"loan__Expected_Disbursal_Date__c": "2014-01-09",
"loan__Active_Investor__c": true,
"loan__Interest_Rate__c": 9,
"Id": "a1WG0000000jwIOMAY",
"loan__Principal_Remaining__c": 0
},
"Id": "a2qG00000009FdSIAU",
"peer__Percent_Funded__c": 65.36,
"peer__Time_Left__c": "-3 Days -23 Hours -36 Minutes",
"peer__Term__c": 12
},
"peer__Certificate_Rate__c": 2,
"peer__Share__c": 65.36,
"CreatedDate": "2014-07-30T14:40:07.000+0000",
"Id": "a2tG00000004iJxIAI",
"peer__Loan_Application__c": "a2qG00000009FdSIAU",
"peer__Booking_Order__c": "a2uG00000005hp5IAA" },
{
"attributes": {
"type": "peer__Investment_Booking__c",
"url": "/services/data/v30.0/sobjects/peer__Investment_Booking__c/a2tG00000004ouqIAA" },
"peer__Stage__c": "In Funding",
"peer__Safe_Fund_Amount__c": 45,
"peer__Status__c": "Winning",
"peer__Service_Rate__c": 1,
"peer__Investment_Amount__c": 5000,
"peer__Booking_Order__r": {
"attributes": {
"type": "peer__Booking_Order__c",
"url": "/services/data/v30.0/sobjects/peer__Booking_Order__c/a2uG00000005oGdIAI" },
"peer__Investor__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v30.0/sobjects/Account/001G000001PhdoeIAB" },
"Name": "Anil Bhat market place",
"loan__Undeployed_Funds__c": 47197.31,
"loan__Deployed_Funds__c": 281580,
"peer__Nickname__c": "Anil",
"Id": "001G000001PhdoeIAB",
"loan__Reinvest_Principal__c": false,
"loan__Reinvest_Interest__c": false
},
"peer__Investor__c": "001G000001PhdoeIAB",
"peer__Funded_Amount__c": 0,
"peer__Amount__c": 9910.8,
"peer__Number_of_Bookings__c": 2,
"Id": "a2uG00000005oGdIAI",
"peer__Date__c": "2014-07-25",
"peer__Amount_In_Funding__c": 9910.8
},
"Name": "IB-00018590",
"peer__Loan_Application__r": {
"attributes": {
"type": "peer__Loan_Application__c",
"url": "/services/data/v30.0/sobjects/peer__Loan_Application__c/a2qG00000009JnOIAU" },
"peer__Minimum_Interest_Rate__c": 7.99,
"peer__Borrower__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v30.0/sobjects/Account/001G000001VMLHQIA5" },
"peer__Nickname__c": "Borrower1 Nickname",
"Id": "001G000001VMLHQIA5" },
"peer__Borrower__c": "001G000001VMLHQIA5",
"peer__Loan_Purpose_1__c": "a1hG0000000IL3mIAG",
"peer__Loan__c": "a1WG0000004fqhaMAA",
"peer__Expiry_Date__c": "2014-06-23T00:00:00.000+0000",
"peer__Loan_Purpose_1__r": {
"attributes": {
"type": "loan__Loan_Purpose__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Purpose__c/a1hG0000000IL3mIAG" },
"Name": "Personal",
"Id": "a1hG0000000IL3mIAG" },
"peer__Loan__r": {
"attributes": {
"type": "loan__Loan_Account__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Account__c/a1WG0000004fqhaMAA" },
"loan__Loan_Status__c": "Partial Application",
"loan__Expected_Disbursal_Date__c": "2014-06-23",
"loan__Active_Investor__c": true,
"loan__Interest_Rate__c": 8.99,
"Id": "a1WG0000004fqhaMAA",
"loan__Principal_Remaining__c": 0
},
"Id": "a2qG00000009JnOIAU",
"peer__Percent_Funded__c": 100,
"peer__Time_Left__c": "171 Days -15 Hours -22 Minutes",
"peer__Term__c": 12
},
"peer__Certificate_Rate__c": 8.8,
"peer__Share__c": 100,
"CreatedDate": "2014-09-28T11:57:47.000+0000",
"peer__Bid_Date__c": "2014-07-25T11:57:46.000+0000",
"Id": "a2tG00000004ouqIAA",
"peer__Loan_Application__c": "a2qG00000009JnOIAU",
"peer__Booking_Order__c": "a2uG00000005oGdIAI" },
{
"attributes": {
"type": "peer__Investment_Booking__c",
"url": "/services/data/v30.0/sobjects/peer__Investment_Booking__c/a2tG00000004ourIAA" },
"peer__Stage__c": "In Funding",
"peer__Safe_Fund_Amount__c": 44.19,
"peer__Status__c": "Winning",
"peer__Service_Rate__c": 1,
"peer__Investment_Amount__c": 4910.8,
"peer__Booking_Order__r": {
"attributes": {
"type": "peer__Booking_Order__c",
"url": "/services/data/v30.0/sobjects/peer__Booking_Order__c/a2uG00000005oGdIAI" },
"peer__Investor__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v30.0/sobjects/Account/001G000001PhdoeIAB" },
"Name": "Anil Bhat market place",
"loan__Undeployed_Funds__c": 47197.31,
"loan__Deployed_Funds__c": 281580,
"peer__Nickname__c": "Anil",
"Id": "001G000001PhdoeIAB",
"loan__Reinvest_Principal__c": false,
"loan__Reinvest_Interest__c": false
},
"peer__Investor__c": "001G000001PhdoeIAB",
"peer__Funded_Amount__c": 0,
"peer__Amount__c": 9910.8,
"peer__Number_of_Bookings__c": 2,
"Id": "a2uG00000005oGdIAI",
"peer__Date__c": "2014-07-25",
"peer__Amount_In_Funding__c": 9910.8
},
"Name": "IB-00018591",
"peer__Loan_Application__r": {
"attributes": {
"type": "peer__Loan_Application__c",
"url": "/services/data/v30.0/sobjects/peer__Loan_Application__c/a2qG00000009ORwIAM" },
"peer__Minimum_Interest_Rate__c": 8,
"peer__Borrower__r": {
"attributes": {
"type": "Account",
"url": "/services/data/v30.0/sobjects/Account/001G000001KY8byIAD" },
"peer__Nickname__c": "Shivam",
"Id": "001G000001KY8byIAD" },
"peer__Borrower__c": "001G000001KY8byIAD",
"peer__Loan_Purpose_1__c": "a1hG0000000JR1tIAG",
"peer__Loan__c": "a1WG00000050ZhGMAU",
"peer__Expiry_Date__c": "2014-06-23T00:00:00.000+0000",
"peer__Loan_Purpose_1__r": {
"attributes": {
"type": "loan__Loan_Purpose__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Purpose__c/a1hG0000000JR1tIAG" },
"Name": "Family",
"Id": "a1hG0000000JR1tIAG" },
"peer__Loan__r": {
"attributes": {
"type": "loan__Loan_Account__c",
"url": "/services/data/v30.0/sobjects/loan__Loan_Account__c/a1WG00000050ZhGMAU" },
"loan__Loan_Status__c": "Active - Bad Standing",
"loan__Expected_Disbursal_Date__c": "2014-06-23",
"loan__Number_of_Days_Overdue__c": 2,
"loan__Active_Investor__c": true,
"loan__Interest_Rate__c": 9,
"Id": "a1WG00000050ZhGMAU",
"loan__Principal_Remaining__c": 15300
},
"Id": "a2qG00000009ORwIAM",
"peer__Percent_Funded__c": 100,
"peer__Time_Left__c": "171 Days -15 Hours -22 Minutes",
"peer__Term__c": 12
},
"peer__Certificate_Rate__c": 8.8,
"peer__Share__c": 98.22,
"CreatedDate": "2014-09-28T11:57:47.000+0000",
"peer__Bid_Date__c": "2014-07-25T11:57:46.000+0000",
"Id": "a2tG00000004ourIAA",
"peer__Loan_Application__c": "a2qG00000009ORwIAM",
"peer__Booking_Order__c": "a2uG00000005oGdIAI" }
]
}