API – Targeted APR
The Targeted APR feature calculates loan values that will have the APR for a loan be approximately equal to the target APR. The APR estimates will be equal to or less than the target APR. This allows a loan to quickly get near the legal usury limits while not exceeding them. Please see the article APR Targeting for more information about this feature. This article will cover the API interface for this feature.
To use Targeted APR, you will need to send a POST request to the Loans()/RollAPR() endpoint. The URL will look like the following:
Where <id> is the id of the loan for which you want to roll the APR. This means that for a loan with id 3, the URL will be:
In the next sections we will cover how to roll the apr by changing the interest rate or escrow.
Upon success, a 200 response will be sent, otherwise a non-200 response will be sent back. No loan information will be returned, instead the loan entity will be changed directly.
Targeting by Interest Rate
When the APR is targeted by interest rate, LoanPro will adjust the interest rate of the loan to have the loan APR approximate the targeted APR. To tell LoanPro to target by interest rate, send a POST request to the above endpoint with the following body:
apr: "<targeted apr>",
Where <targeted apr> is the APR to target.
Targeting by Escrow
When the APR is targeted by escrow, LoanPro will adjust the escrow amount for an escrow subset to approximate the targeted APR. This means that for LoanPro to use an escrow subset in its calculations, the escrow subset must be applicable to the loan and the escrow subset must be included in APR. If both of these conditions are met, then an escrow subset can be used for Targeted APR. Please refer to Escrow Overview and API – Escrow Subset Options/Escrow Settings for more information about escrow.
To tell LoanPro to target by escrow, send a POST request to the above endpoint with the following body:
apr: "<targeted apr>",
solve: <escrow subset>
Where <targeted apr> is the APR to target and <escrow subset> is the escrow subset to use. Please note that<escrow subset> does not correspond with an escrow calculator; instead it corresponds with the ID of an escrow subset found in the company settings.