Mortgage Tool Endpoints

Here you'll find documentation on all available endpoints. If you have suggestions on new endpoints you would like to see, please tell us. We would love to hear from you.

Required Parameters

All endpoints require that you provide the following parameters via HTTPS POST:

Parameter Type Possible Values Description Required
apiID varchar assigned API ID yes
apiKey varchar assigned API Key yes
format varchar json, xml response data format yes

POST /amortization-schedule

The /amortization-schedule endpoint will generate and give to you an amortization schedule of your loan based on information you provided.

Example Request

$parameters = array(
     'format' => "json",
     'apiID' => YOUR_API_ID,
     'apiKey' => YOUR_API_KEY
     'accessToken' => ACCESS_TOKEN
     'data' => $jsonPayload
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/tool/amortization-schedule" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );

print_r( $response );

Json Payload Example

{ "queryParams": { "amortizationType": "AdjustableRate", "loanTerm": 30, "loanAmount": 250000, "rate": 3.875, "monthsBeforeFirstAdjustment": 60, "firstAdjustment": 1.75, "monthsOfSubsequentAdjustment": 12, "subsequentAverageAdjustment": 1.25, "lifetimeAdjustmentCap": 5.5, "expandFees": { "MI_FHAUpfrontPremium": 4375 } } }

-OR-

{ "response": { "publicID": "ABCDEF" } }

Below, you'll find details on all required parameters to be included in the JSON payload.

Parameter Type Possible Values Description Required
queryParams JsonObject Use this if you want to get schedule from custom information yes, if response is not provided
response varchar Fixed, AdjustableRate Use this when you want to get schedule of the loan option that is existing in our database yes, if queryParams is not provided
queryParams.amortizationType varchar Fixed, AdjustableRate Amortization type of your loan option yes
queryParams.loanTerm int Term of your loan in the year yes
queryParams.loanAmount float Your loan balance yes
queryParams.rate float Annual interest rate.
If your rate cap is 3.75%, please pass us 3.75, don't divide by 100.
yes
queryParams.monthsBeforeFirstAdjustment int Only for ARMs, number of the first months you have fixed rate. yes, if ARMs
queryParams.firstAdjustment float Only for ARMs, the adjustment will be added to rate (initial rate) at the first time adjustment.
If your adjustment cap is 2%, please pass us 2, don't divide by 100.
yes, if ARMs
queryParams.monthsOfSubsequentAdjustment int Only for ARMs, months between subsequent adjustments yes, if ARMs
queryParams.subsequentAverageAdjustment float Only for ARMs, expected subsequent adjustments
If your adjustment is 1.25%, please pass us 1.25, don't divide by 100.
yes, if ARMs
queryParams.lifetimeAdjustmentCap float Only for ARMs, lifetime adjustment cap. Leave empty if you don't have the cap
If your adjustment is 5%, please pass us 5, don't divide by 100.
no
queryParams.expandFees JsonObject List of expand fees, you want to include to loan amount no
response.publicID string The id of loan option when you get back it from /get-ppe-anonymous yes

Response Format

Response contains yearly schedule and monthly schedule.

Response will return the root key error if any error. See Error Codes and Handling.

{ "status": "success", "schedules": { "years": [ { "pNo": 1, "beginningBalance": 254375, "pmt": 29828.76, "ipmt": 7943.1, "ppmt": 21885.66, "endingBalance": 232489.36 }, { "pNo": 2, "beginningBalance": 232489.36, "pmt": 29828.76, "ipmt": 7221.11, "ppmt": 22607.65, "endingBalance": 209881.74 } ], "months": [ { "pNo": 1, "beginningBalance": 254375, "rate": 3.25, "pmt": 2485.73, "ipmt": 688.93, "ppmt": 1796.8, "endingBalance": 252578.2 }, { "pNo": 2, "beginningBalance": 252578.2, "rate": 3.25, "pmt": 2485.73, "ipmt": 684.07, "ppmt": 1801.66, "endingBalance": 250776.54 } ] } }

Parameter Description
status Response status
schedules.[years/months].pNo Payment NO.
schedules.[years/months].beginningBalance Loan balance at the beginning
schedules.[years/months].pmt Yearly/Monthly payment
schedules.[years/months].impt Yearly/Monthly payment of interest
schedules.[years/months].pmpt Yearly/Monthly payment of principal
schedules.[years/months].endingBalance Loan balance at the ending
schedules.months.rate The rate we applied for this month