Retrieve Customized Application
Description
This web service can be used to get details of an application or all applications of a particular borrower. Web service accepts a JSON with key as Child Relationship Name (with __r) and namespace and value as a comma-separated list of fields of this object with namespace, so any type of child records can be retrieved. Also, it returns all the fields of Application__c including the ones which are from custom implementation. Related records and their fields can be retrieved by the use of additionFields param e.g. “genesis__Contact__r.Name” can be mentioned in this parameter value.
Definition
POST https://<domain>/services/apexrest/genesis/v1/applications/getDetails/
Request Parameters
The following table provides details of the request parameters used by this web service:
Field (*1 => Either of them should be provided) | Type | Description |
---|---|---|
applicationId*1 | String |
|
borrowerId*1 | String |
|
allowedStatuses | String |
|
additionalFields | String |
|
childObjects | JSON |
|
Error Messages
When you use this web service you can receive the possible error messages as shown in the following table:
Error Number | Error Code | Error Message | System.Label | Reason | HTTP Status Code |
---|---|---|---|---|---|
00002 | INVALID_INPUT | Unable to parse the Request parameters. | System.label.UNABLE_PARSE_REQ_PARAMS | Error getting the request params from the request body. | 400 |
00001 | INVALID_INPUT | Required parameters are missing. | System.label.REQUIRED_PARAMS_MISSING | One of the mandatory parameters is missing. | 400 |
00032 | INVALID_INPUT | Exception message | <NA> | Exception while parsing request parameters. This may be due to the invalid format of input parameters. | 400 |
00006 | INVALID_INPUT | Both Contact & Account found null. Please provide at least one of them. | System.label.ACCOUNT_CONTACT_ID_NULL | Both Contact and Account information is not found in request parameters. At least one should be provided. | 400 |
00005 | INVALID_INPUT | Exception message | <NA> | Exception while committing Business Information. This may be due to if any mandatory field is missing or any custom validation rule is not satisfied | 400 |
00003 | INVALID_INPUT | Exception message | <NA> | Exception while committing Account (new borrower) Information. This may be due to any mandatory field is missing or any custom validation rule is not satisfied | 400 |
00004 | INVALID_INPUT | Exception message | <NA> | Exception while committing Contact (new borrower) Information. This may be due to any mandatory field is missing or any custom validation rule is not satisfied | 400 |
00008 | INVALID_INPUT | No object found with name <object name> | OBJECT_NOT_FOUND | The object name i.e, key mentioned in JSON of “childObjects” is not a valid object name. | 400 |
00009 | INVALID_INPUT | Unable to find the Account. | ACCOUNT_NOT_FOUND | There is no valid record of the borrower account for which the application is to be created. | 400 |
00010 | INVALID_INPUT | Unable to find the Contact. | CONTACT_NOT_FOUND | There is no valid record of Borrower contact for which application is to be created. | 400 |
00012 | INVALID_INPUT | Unable to find the Company. | COMPANY_NOT_FOUND | The company specified for the application is not a valid one. | 400 |
00013 | INVALID_INPUT | Unable to find the Lending Product. | LENDING_PRODUCT_NOT_FOUND | The product specified for the application is not a valid one. | 400 |
00014 | INVALID_INPUT | Invalid Product Type | PRODUCT_TYPE_NOT_FOUND | The product Type of the application is either null or not valid | 400 |
00015 | INVALID_INPUT | Invalid Payment Frequency. | PAYMENT_FREQUENCY_NOT_FOUND | The payment frequency specified for the application is not a valid value. | 400 |
00016 | INVALID_INPUT | Loan Amount is null or invalid | LOAN_AMOUNT_NULL | The loan Amount is either null or invalid. | 400 |
00017 | INVALID_INPUT | Term is null or invalid. | TERM_NULL | The term is null or invalid | 400 |
00018 | INVALID_INPUT | Interest Rate is null or invalid. | INTEREST_RATE_NULL | The interest rate is either null or invalid. | 400 |
0029 | INVALID_INPUT | Draw Term is null or invalid. | DRAW_TERM_INVALID | Draw Term is either null or invalid. | 400 |
00030 | INVALID_INPUT | Credit Limit is null or invalid. | CREDIT_LIMIT_INVALID | The credit limit is either null or invalid. | 400 |
00031 | INVALID_INPUT | Draw Term cannot be greater than Contract Term. | DRAW_TERM_TERM_INVALID | The draw term is greater than the contractual term. | 400 |
00027 | INVALID_INPUT | Product Sub Type is null or invalid. | PRODUCT_SUB_TYPE_NOT_FOUND | Product subtype is either null or invalid. | 400 |
00024 | INVALID_INPUT | Pricing method is null or invalid. | PRICING_METHOD_INVALID | The pricing method is either null or invalid. | 400 |
00022 | INVALID_INPUT | Sales Division is null or invalid. | SALES_DIVISION_INVALID | Sales Division is either null or invalid. | 400 |
00028 | INVALID_INPUT | Expected First Payment Date should be greater than Expected Start Date. | FIRST_PAYMENT_DATE_VALIDATION | The expected first payment date for the new application is before the expected start date. | 400 |
00025 | INVALID_INPUT | Days Convention is invalid. | DAYS_CONVENTION_INVALID | Value for the field Days Convention is invalid. | 400 |
00026 | INVALID_INPUT | Interest calculation method is invalid. | INTEREST_CALC_METHOD_INVALID | Value for the field Interest Calculation Method is invalid. | 400 |
00023 | INVALID_INPUT | Customer Cash Used For is invalid. | CUST_CASH_USED_FOR_INVALID | Value for the field Customer Cash Used For is invalid. | 400 |
00021 | INVALID_INPUT | Bank Account Type is invalid. | BANK_ACCOUNT_TYPE_INVALID | Value for the field Bank Account Type is invalid. | 400 |
00020 | INVALID_INPUT | Healthcare Procedure is invalid. | HEATH_CARE_PROC_INVALID | Value for the field Healthcare Procedure is invalid. | 400 |
00019 | INVALID_INPUT | Id Type is invalid. | ID_TYPE_INVALID | Value for the field Id Type is invalid. | 400 |
00007 | API_EXCEPTION | <Exception_message> | <NA> | Any runtime exception occurred while creating the new application. | 500 |
Sample Request 1
The ID of the application must be passed in the URL of the service as shown below:
POST:
https://na22.salesforce.com/services/apexrest/genesis/v1/applications/getDetails/a1d15000002mzmL
{ "additionalFields" : "genesis__CL_Product__r.Name,genesis__CL_Purpose__r.Name", "childObjects" : "{\"genesis__Employment_Information__r\" : \"genesis__Average_Monthly_Income__c, genesis__Name_of_employer__c,genesis__Position__c\",\"genesis__Fees__r\": \"clcommon__Original_Amount__c\"}" }
Sample Response 1
{
"status": "SUCCESS",
"rowNumber": null,
"response": [],
"errorNumber": null,
"errorMessage": null,
"errorCode": "NO_ERROR",
"content": [
{
"attributes": {
"type": "genesis__Applications__c",
"url": "/services/data/v34.0/sobjects/genesis__Applications__c/a6k3k000001U2YIAA0"
},
"Id": "a6k3k000001U2YIAA0",
"Name": "APP-0000002925",
"OwnerId": "0053k00000B7T8WAAV",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"RecordTypeId": "0123k0000010ipUAAQ",
"CreatedDate": "2021-02-08T18:33:29.000+0000",
"CreatedById": "0053k00000B7T8WAAV",
"LastModifiedDate": "2021-02-08T19:15:03.000+0000",
"LastModifiedById": "0053k00000B7T8WAAV",
"SystemModstamp": "2021-02-08T19:15:03.000+0000",
"genesis__Account__c": "0013k00002vYoS3AAK",
"genesis__Additional_Cash_Required__c": 0,
"genesis__Agricultural_Use__c": false,
"genesis__Application_Submission_Date__c": "2021-02-09",
"genesis__Arrears__c": false,
"genesis__Asset_Class__c": "Consumer Secured",
"genesis__Auto_Decisioning__c": false,
"genesis__Bank_Transactions_Fetched__c": false,
"genesis__Beneficial_Owner_Exempt__c": false,
"genesis__CL_Product_Name__c": "TestConsumerProduct",
"genesis__CL_Product__c": "a0X3k00000DSY79EAH",
"genesis__Calculation_Action__c": "Calculate Maturity Date",
"genesis__Cap_Reduction__c": 0,
"genesis__Cash_Collected_By_Dealer__c": 0,
"genesis__Collateral_Value__c": 0,
"genesis__Days_Convention__c": "365/365",
"genesis__Documentation_Charges__c": 0,
"genesis__Down_Payment__c": 0,
"genesis__Due_Day__c": 9,
"genesis__E_Signatures__c": false,
"genesis__Estimated_Selling_Price__c": 0,
"genesis__Expected_Close_Date__c": "2021-02-09",
"genesis__Expected_First_Payment_Date__c": "2021-03-09",
"genesis__Expected_Start_Date__c": "2021-02-09",
"genesis__Fees_Amount__c": 0,
"genesis__Florida_Stamp_Tax__c": false,
"genesis__Funding_in_Tranches__c": false,
"genesis__Gross_Annual_Income__c": 0,
"genesis__HMDA__c": false,
"genesis__Interest_Calculation_Method__c": "Declining Balance",
"genesis__Interest_Rate__c": 12,
"genesis__Is_Get_Yield_Enabled__c": false,
"genesis__Is_Indirect__c": false,
"genesis__Is_Renewal__c": false,
"genesis__Is_Secured__c": false,
"genesis__Is_over_21__c": false,
"genesis__Landing_Sequence__c": 2,
"genesis__Loan_Amount__c": 2100,
"genesis__Maturity_Date__c": "2024-02-09",
"genesis__Maximum_Loan_Amount_DTI__c": 0,
"genesis__No_Of_Payments_Required_Upfront__c": 0,
"genesis__Number_of_Pieces_of_Equipment__c": 0,
"genesis__Payable_On_Demand__c": false,
"genesis__Payment_Amount__c": 497.99,
"genesis__Payment_Frequency__c": "MONTHLY",
"genesis__Prepayment_Penalty__c": false,
"genesis__Probability__c": 100,
"genesis__Product_Sub_Type__c": "UNDEFINED",
"genesis__Product_Type__c": "LOAN",
"genesis__Rate_Discount__c": false,
"genesis__Rate_Lock__c": false,
"genesis__Repayment_Procedure__c": "Equal Monthly Installments",
"genesis__Requested_Loan_Amount__c": 15000,
"genesis__Required_Customer_Cash__c": 0,
"genesis__Residual_Amount__c": 0,
"genesis__Retained_Amount__c": 0,
"genesis__Skip_Usage_On_Parent_Application__c": false,
"genesis__Solved_For__c": "None",
"genesis__Status__c": "NEW - ENTERED",
"genesis__Sublimit_Variance__c": 2100,
"genesis__Tax_Amount__c": 0,
"genesis__Term__c": 36,
"genesis__Total_Cash_Due_from_Customer__c": 0,
"genesis__Total_Dealer_Payable__c": 0,
"genesis__Total_Dealer_Price__c": 0,
"genesis__Total_Estimated_Interest__c": 2927.54,
"genesis__Total_Facilities__c": 0,
"genesis__Total_Facility_Amount__c": 0,
"genesis__Total_Facility_Variance__c": 2100,
"genesis__Total_Fee_Amount__c": 3000,
"genesis__Total_Pledged_Collateral_Amount__c": 0,
"genesis__Total_Upfront_Payments__c": 0,
"genesis__Valid_Pricing_Flag__c": false,
"genesis__Warranty_Amount__c": 0,
"genesis__SubLimit_Total__c": 0,
"genesis__Total_Assets__c": 0,
"genesis__Total_Score__c": 0,
"genesis__Interest_in_Advance__c": false,
"genesis__Nature_of_Credit_Facility__c": "Non-Revolving",
"genesis__Seasonal_Payment__c": false,
"genesis__Status_of_Credit_Facility__c": "Pending Approval",
"genesis__Total_Amount_Repaid__c": 0,
"genesis__Customer_Enrollment_Status__c": false,
"genesis__Adverse_Action_Based_On_Outside_Info__c": false,
"genesis__Index_Linked__c": false,
"genesis__Interest_Rate_Type__c": "Fixed",
"genesis__Employment_Information__r": {
"totalSize": 1,
"done": true,
"records": [
{
"attributes": {
"type": "genesis__Employment_Information__c",
"url": "/services/data/v34.0/sobjects/genesis__Employment_Information__c/ a7K3k000000D1MZEA0"
},
"genesis__Application__c": "a6k3k000001U2YIAA0",
"Id": "a7K3k000000D1MZEA0",
"Name": "a7K3k000000D1MZ",
"genesis__Average_Monthly_Income__c": 1000,
"genesis__Name_of_employer__c": "Bank",
"genesis__Position__c": "QA"
}
]
},
"genesis__Fees__r": {
"totalSize": 1,
"done": true,
"records": [
{
"attributes": {
"type": "clcommon__Fee__c",
"url": "/services/data/v34.0/sobjects/clcommon__Fee__c/a1l3k00000Bqcb7AAB"
},
"genesis__Application__c": "a6k3k000001U2YIAA0",
"Id": "a1l3k00000Bqcb7AAB",
"Name": "FEE-00000459",
"clcommon__Original_Amount__c": 3000
}
]
},
"genesis__CL_Product__r": {
"attributes": {
"type": "clcommon__CL_Product__c",
"url": "/services/data/v34.0/sobjects/clcommon__CL_Product__c/a0X3k00000DSY79EAH"
},
"Id": "a0X3k00000DSY79EAH",
"Name": "PRO-00000034"
}
}
]
}
Sample Request 2
POST https://na22.salesforce.com/services/apexrest/genesis/v1/applications/getDetails/a1d15000002mzmL { "additionalFields" : "Contact__r.Employment_status__c, Contact__r.BirthDate", "childObjects" : "{\"Application_Document_Category__r\" : \"Active__c, Document_Category__c\"}" } Note: The borrower ID in the application must be passed in the URL of the service as shown below: URL - https://na22.salesforce.com/services/apexrest/genesis/v1/applications/getDetails/ Sample Request body for Borrower ID: { "borrowerId" : "a1d15000002mzmL", "additionalFields" : "Contact__r.Employment_status__c, Contact__r.BirthDate", "childObjects" : "{\"Application_Document_Category__r\" : \"Active__c, Document_Category__c\"}" }
Sample Response 2
{ "status": "SUCCESS", "rowNumber": null, "response": [], "errorNumber": null, "errorMessage": null, "errorCode": "NO_ERROR", "content": [ { "attributes": { "type": "Applications__c", "url": "/services/data/v34.0/sobjects/Applications__c/a1d15000002mzmLAAQ" }, "Id": "a1d15000002mzmLAAQ", "Name": "APP-0000002752", "OwnerId": "00515000005bZmxAAE", "IsDeleted": false, "RecordTypeId": "01215000000oIpMAAU", "CreatedDate": "2015-08-18T14:21:21.000+0000", "CreatedById": "00515000005bZmxAAE", "LastModifiedDate": "2015-08-31T23:00:21.000+0000", "LastModifiedById": "00515000005bZmxAAE", "SystemModstamp": "2015-08-31T23:00:21.000+0000", "Action__c": "a1P150000037fTvEAI", "Arrears__c": false, "Auto_Decisioning__c": true, "CL_Product__c": "a1H1500000DdZr2EAF", "Cap_Reduction__c": 0, "Cash_Collected_By_Dealer__c": 0, "Collateral_Value__c": 0, "Company__c": "a1j15000006AlAlAAK", "Contact__c": "0031500001Z73yhAAB", "Credit_Rating__c": "a1l15000000728iAAA", "Days_Convention__c": "365/365", "Bank_Transactions_Fetched__c": false, "Down_Payment__c": 0, "Expected_Close_Date__c": "2015-09-20", "Expected_First_Payment_Date__c": "2015-10-20", "Expected_Start_Date__c": "2015-08-25", "Funding_in_Tranches__c": false, "Gross_Annual_Income__c": 0, "Interest_Calculation_Method__c": "Declining Balance", "Interest_Rate__c": 12, "Is_over_21__c": false, "Landing_Sequence__c": 2, "Loan_Amount__c": 15000, "Maximum_Loan_Amount_DTI__c": 0, "No_Of_Payments_Required_Upfront__c": 0, "Number_of_Pieces_of_Equipment__c": 0, "Payment_Amount__c": 0, "Payment_Frequency__c": "MONTHLY", "Probability__c": 100, "Product_Sub_Type__c": "OPEN ENDED", "Product_Type__c": "LOAN", "Required_Customer_Cash__c": 0, "Residual_Amount__c": 0, "Status__c": "NEW - PRICING GENERATED", "Tax_Amount__c": 0, "Term__c": 12, "Total_Cash_Due_from_Customer__c": 0, "Total_Dealer_Payable__c": 0, "Total_Dealer_Price__c": 0, "Total_Estimated_Interest__c": 1094.56, "Total_Upfront_Payments__c": 0, "Valid_Pricing_Flag__c": true, "Warranty_Amount__c": 0, "Total_Score__c": 200, "CL_Purpose__c": "a2T150000001l8QEAQ", "Collateral_Type__c": "a1I15000002UlfVEAS", "Application_Document_Category__r": { "totalSize": 12, "done": true, "records": [ { "attributes": { "type": "Application_Document_Category__c", "url": "/services/data/v34.0/sobjects/Application_Document_Category__c/ a1V15000002OA0hEAG" }, "Application__c": "a1d15000002mzmLAAQ", "Id": "a1V15000002OA0hEAG", "Name": "test 1 Borrower Financials", "Active__c": true, "Document_Category__c": "a1n15000001C966AAC" }, { "attributes": { "type": "Application_Document_Category__c", "url": "/services/data/v34.0/sobjects/Application_Document_Category__c/ a1V15000002O953EAC" }, "Application__c": "a1d15000002mzmLAAQ", "Id": "a1V15000002O953EAC", "Name": "Leased Equipments", "Active__c": true, "Document_Category__c": "a1n15000001CAaiAAG" } ] }