Update an Application (V1)
Description
This web service updates an application and its related and child object records if any.
Prior to the Oxygen release, this web service was not updating the contact if the "Use Contact as Account" flag was enabled. But now this web service is enhanced to update the contact associated with the application irrespective of the status of the "Use Contact as Account" flag.
Definition
POST https://<domain>/services/apexrest/genesis/v1/applications/update/
Request Parameters
The following table provides details of the request parameters used by this web service:
Field | Type | Description |
---|---|---|
application | String |
|
relatedObjects | String |
|
childObjects | String |
|
This returns the updated application object.
Scenario 1 - Update Contact and Application Details
Sample Request
The sample request to be sent is as shown below:
{ "application": "{\"attributes\" : {\"type\" : \"Applications__c\"},\"Id\" : \"a6k3k000001U2YIAA0\",\"genesis__account__c\":\"0013k00002vYoS3AAK\",\"genesis__Interest_Rate__c\" : 12.0000,\"genesis__Loan_Amount__c\" : 2100.00}" , "relatedObjects": "{\"genesis__contact__c\" : {\"attributes\":{\"type\":\"Contact\"}, \"Id\":\"0033k00003UiRgBAAV\",\"FirstName\":\"Rajat\",\"LastName\":\"Sharma\", \"clcommon__Legal_Entity_Type__c\" : \"a283k000006imLS\"}}" }
Sample Response
{
"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-08T18:53:03.000+0000",
"LastModifiedById": "0053k00000B7T8WAAV",
"SystemModstamp": "2021-02-08T18:53: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": 29290,
"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__Account__r": null,
"genesis__Contact__r": {
"attributes": {
"type": "Contact",
"url": "/services/data/v34.0/sobjects/Contact/0033k00003UiRgBAAV"
},
"Account": {
"attributes": {
"type": "Account",
"url": "/services/data/v34.0/sobjects/Account/0013k00002vYoS3AAK"
},
"ParentId": null,
"Id": "0013k00002vYoS3AAK",
"Name": "Rajat Sharma",
"clcommon__Legal_Entity_Type__c": "a283k000006imLSAAY"
},
"AccountId": "0013k00002vYoS3AAK",
"FirstName": "Rajat",
"Id": "0033k00003UiRgBAAV",
"LastName": "Sharma",
"clcommon__Legal_Entity_Type__c": "a283k000006imLS"
}
}
]
}
Scenario 2 - Update Child Records
Sample Request
The sample request to be sent is as shown below:
{"application": "{\"attributes\" : {\"type\" : \"Applications__c\"},\"Id\" : \"a6k3k000001U2YIAA0\",\"genesis__account__c\":\"0013k00002vYoS3AAK\",\"genesis__Interest_Rate__c\" : 12.0000,\"genesis__Loan_Amount__c\" : 2100.00}" , "relatedObjects": "{\"genesis__contact__c\" : {\"attributes\":{\"type\":\"Contact\"}, \"Id\":\"0033k00003UiRgBAAV\",\"FirstName\":\"Rajat\",\"LastName\":\"Sharma\", \"clcommon__Legal_Entity_Type__c\" : \"a283k000006imLS\"}}", "childObjects" : "{\"genesis__Employment_Information__c\" : [{\"attributes\":{\"type\":\"genesis__Employment_Information__c\"}, \"Id\": \"a7K3k000000D1MZEA0\",\"genesis__Average_Monthly_Income__c\" : \"1000\", \"genesis__Name_of_employer__c\" : \"Bank\", \"genesis__Position__c\" : \"QA\" }], \"clcommon__Fee__c\":[{\"attributes\":{\"type\":\"clcommon__Fee__c\"}, \"Id\": \"a1l3k00000Bqcb7AAB\",\"clcommon__Original_Amount__c\":3000, \"clcommon__Date__c\":\"2020-11-12\"}]}" }
Sample Response
{
"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",
"OwnerId": "0053k00000B7T8WAAV",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:34.000+0000",
"CreatedById": "0053k00000B7T8WAAV",
"LastModifiedDate": "2021-02-08T19:15:03.000+0000",
"LastModifiedById": "0053k00000B7T8WAAV",
"SystemModstamp": "2021-02-08T19:15:03.000+0000",
"genesis__Average_Monthly_Income__c": 1000,
"genesis__Is_Current_Employer__c": false,
"genesis__Name_of_employer__c": "Bank",
"genesis__Position__c": "QA",
"genesis__Self_Employed__c": false
}
]
},
"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",
"OwnerId": "0053k00000B7T8WAAV",
"IsDeleted": false,
"CurrencyIsoCode": "USD",
"CreatedDate": "2021-02-08T18:33:34.000+0000",
"CreatedById": "0053k00000B7T8WAAV",
"LastModifiedDate": "2021-02-08T19:15:03.000+0000",
"LastModifiedById": "0053k00000B7T8WAAV",
"SystemModstamp": "2021-02-08T19:15:03.000+0000",
"clcommon__Approval_Process__c": false,
"clcommon__Capitalize__c": false,
"clcommon__Date__c": "2020-11-12",
"clcommon__Discount_Fee_By_Percentage__c": false,
"clcommon__Discount_Fee__c": false,
"clcommon__Include_in_APR__c": false,
"clcommon__Include_in_Dues__c": false,
"clcommon__Interest_Bearing__c": false,
"clcommon__Interest_Due__c": 0,
"clcommon__Original_Amount__c": 3000,
"clcommon__Override_Fee__c": false,
"clcommon__Paid_Amount__c": 0,
"clcommon__Paid__c": false,
"clcommon__Partial_Fee_Waiver__c": false,
"clcommon__Principal_Due__c": 0,
"clcommon__Taxable__c": false,
"clcommon__Total_Waived_Amount__c": 0,
"clcommon__Waive__c": false,
"clcommon__Applicable__c": false,
"clcommon__Active__c": true
}
]
},
"genesis__Account__r": null,
"genesis__Contact__r": {
"attributes": {
"type": "Contact",
"url": "/services/data/v34.0/sobjects/Contact/0033k00003UiRgBAAV"
},
"Account": {
"attributes": {
"type": "Account",
"url": "/services/data/v34.0/sobjects/Account/0013k00002vYoS3AAK"
},
"ParentId": null,
"Id": "0013k00002vYoS3AAK",
"Name": "Rajat Sharma",
"clcommon__Legal_Entity_Type__c": "a283k000006imLSAAY"
},
"AccountId": "0013k00002vYoS3AAK",
"FirstName": "Rajat",
"Id": "0033k00003UiRgBAAV",
"LastName": "Sharma",
"clcommon__Legal_Entity_Type__c": "a283k000006imLS"
}
}
]
}