Create Loan Modification

This request allows you to create a loan modification.

General

This request is a bit different from our others listed here in our documentation. Instead of consisting on one request, the loan modification process requires several (pretty exciting, huh?). We'll explain the whole process and provide the requests you will need below. First, let's go over what loan modifications are.

A Loan ModificationModification - Performing a modification on an account is essentially writing a new contract for the account while saving the original loan information and loan history. This tool lets you update settings, numbers, and calculations on an account., like the name implies, is a change made to the settings of a loan. Loan Modifications are more than simple changes to a loan's terms, however; here's what you need to know about creating Loan Modifications:

  • A Loan Modification is a complex change made in the middle of a loan's life; it's essentially a new loan that is placed on top of an old loan.
  • This will fully reset values such as Change Due Dates, Suspend/Resume Interest, Days Past Due, Amount Past Due.
  • Changing loan values that have no effect on the amortization schedule such as sales tax, dealer profit, amount down, custom fields, or due dates should be made in other ways.
  • A Loan Modification can only be made on an activated loan, and the terms of activatedactivated - Activating an account will cause the calculations on the loan to take into account actual dates and payment history. An account that hasn’t been activated exists in an abstract piece of time with no sense of past or future. loans are locked in and only editable via modifications.

Step 1 - Transactions After Modification Date (Optional)

You may find it necessary to modify a loan previous to payments or other transactions, and you may want those transactions to apply after the proposed modification. There is an available endpoint that will show you which loan transactions apply after the proposed modification date. To see this information, send a GET request to the following endpoint:

https://loanpro.simnang.com/api/public/api/1/Loans({loanId})/Autopal.PreModTestLoan({modificationDate})

A successful response will look like the following:

{  
   "d":{  
      "payments":[  
         {  
            "id":"2928",
            "displayId":"5557",
            "date":"2019-04-17",
            "amount":100,
            "info":"04/17/2019 Credit/Debit Card"
         }
      ],
      "charges":[],
      "advancements":[],
      "credits":[]
   }
}

Step 2 - Modify the Loan

To create a loan modification, send a POST request to the following endpoint:

https://loanpro.simnang.com/api/public/api/1/Loans({loanId})/Autopal.CreateModification({modificationDate})

Make sure to replace {loanId} with the ID of the loan you're modifying, and {modificationDate} with the modification date you will use. The date should be formatted as YYYY-MM-DD. If you are opting to have transactions apply after the modification date, you should include a payload that looks something like this:

{
    "persistentTransactions": {
        "payments": [
            "2928"
        ]
    },
    "modificationDate": "2018-12-28"
}

The persistentTransactions object should contain an array for each transaction type. The array should contain IDs as strings separated by commas (e.g. "1","2","3").

Step 3 - Get Loan Setup ID

Creating a modification will create a new loanSetup entity and assign it to the loan. To update the new loan setup, you will need the ID. To receive the ID, send a GET request to the following endpoint:

https://loanpro.simnang.com/api/public/api/1/odata.svc/Loans({loanId})/LoanSetup

Be sure to replace {loanId} with the ID for the loan. The response should look something like this:

{  
   "d":{  
      "__metadata":{  
         "uri":"https://loanpro.simnang.com/api/public/api/1/odata.svc/Loans(id=702)",
         "type":"Entity.Loan"
      },
      "LoanSetup": {
        "__metadata": {
        "uri": "https://loanpro.simnang.com/api/public/api/1/odata.svc/LoanSetup(id=861)",
        "type": "Entity.LoanSetup"
      },
      "id":702,
      "displayId":"LOAN597f93726b19f",
      "title":"LN - PHP SDK597f933a295d6",
      "settingsId":661,
      "setupId":861,
      "insurancePolicyId":null,
      "collateralId":433,
      "linkedLoan":null,
      "modId":null,
      "modTotal":0,
      "humanActivityDate":"/Date(1555459200)/",
      "created":"/Date(1501532986)/",
      "lastMaintRun":"/Date(1555489226)/",
      "createdBy":806,
      "active":1,
      "archived":0,
      "loanAlert":null,
      "temporaryAccount":0,
      "deleted":0,
      "deletedAt":null,
      "_relatedMetadata":null,
      "_dynamicProperties":null
   }
}

In the example above, the setupId is 861. Once you have the loanSetup ID, you are ready to set the loan terms of the modification.

Step 4 - Update the Loan Setup

To update the new loan setup, send a PUT request to the following endpoint:

https://loanpro.simnang.com/api/public/api/1/odata.svc/Loans({loanId})

Be sure to replace {loanId} with the ID of the loan.

Your payload should look something like the following:

{  
   "LoanSetup":{  
      "id":861, // <--- loan setup id
      "loanId":702,
      "loanAmount":12345.67,
      "payment":500,
      "loanRate":5.9,
      "contractDate":"2019-02-19",
      "firstPaymentDate":"2019-03-20",
      "loanTerm":12,
      "__id":861, // <--- loan setup id
      "__update":true
   },
   "__id":702, // <--- loan id
   "__update":true
}

Step 5 - Roll the Payment (Optional)

You may want to roll the payment for the customer so it matches the original payment amount. This achieved by sending a POST request to the following endpoint:

https://loanpro.simnang.com/api/public/api/1/Loans({loanID})

Make sure to replace {loanId} with the ID of the loan. Your payload should look something like the following:

{
  "amount": "100.00",
  "method": "loan.rollPayment.termExact"
}

Step 6 - Activate the Loan

The last step is to activate the loan. To activate it, send a POST request to the following endpoint:

https://loanpro.simnang.com/api/public/api/1/Loans({loanID})/AutoPal.Activate()

Make sure to replace {loanId} with the ID of the loan. No payload is required for this request. If this request is successful, the process of modifying a loan is now complete.





Database

For information on Loan Modification database tables, see the following articles: