API – Add Insurance to a Loan
General
You can add insurance to a loan both with the UI or through the API, which is explained here. This article goes over how to add insurance to an existing loan; if you haven't created a loan yet, see Creating a Loan with the API.
To add insurance to a Loan, you will need to send a PUT request to the URL of the desired loan. For example, to add insurance to a loan with id "515", the URL would be as follows:
PUT https://loanpro.simnang.com/api/public/api/1/odata.svc/Loans(515)
The request body will be formatted as follows:
{
"Insurance": {
"companyName": "State Farm",
"insured": "Jane Doe",
"agentName": "Mr. Agent",
"policyNumber": "EIRK-049203-0498",
"phone": "5555555555",
"deductible": "900.00",
"startDate": "2015-01-15",
"endDate": "2015-01-15"
}
}
Here are descriptions of the parameters used in the body of the request.
Parameter | Description |
companyName | The name of the insurance company |
insured | The name of the insured individual |
agentName | The name of the insurance agent for the individual |
policyNumber | The number of the insurance policy |
phone | The phone number of the insurance company |
deductible | The deductible amount of the insurance policy |
startDate | The start date of the insurance policy formatted as a YYYY-MM-DD |
endDate | The end date of the insurance policy formatted as YYYY-MM-DD |