API – Schedule Roll

Introduction

This article explains how to add, remove, or otherwise change a schedule roll. For information about Schedule Rolls and what the options do, see Roll Schedule Templates.

Schedule Roll

Adding New Schedule Line

To add a new schedule line, send a PUT request to the URL of the target loan. This endpoint is unique to each loan, and uses the loan ID. For instance, the URL for loan 667 would look like this:

PUT https://loanpro.simnang.com/api/1/odata.svc/Loans(667)

The body will be formatted as follows:


{
"ScheduleRolls":{
"results":[
{
"term":3,
"rate":"16",
"solveUsing":"loan.rollScheduleSolve.dollar",
"amount":"150.00",
"percent":0,
"advancedTerms":0,
"solveFor":"loan.rollScheduleSolveFor.payment",
"balance":0,
"forceBalloon":0
}
]
}
}

Variable

Description

term

The term for the new schedule line

rate

The interest rate for the new schedule line

solveUsing

The target of the payment amount to solve for (See API Schedule Roll Collections)

amount

The target payment amount

percent

The target percentage

advancedTerms

The payment calculation terms

solveFor

What to solve for (See API Schedule Roll Collections)

balance

The target balance of the loan

forceBalloon

Set to “1” to force a balloon at the end of the term, set to “0” to let the schedule extend until the loan is paid off

Remove Schedule Line

To remove a schedule line, send a PUT request with to the URL of the target loan with a body formatted as follows:

{
"ScheduleRolls": {
"results": [
{
"__destroy": true,
"__id": 538
}
]
}
}

Make sure that “__id” matches the ID of the schedule line to delete.

Please note that only deleting the last schedule line that’s applied is officially supported, the behavior of deleting preceding schedule lines is not guaranteed nor supported.

Schedule Round

To perform a schedule round, send a PUT request to the URL of the loan with a body formatted as follows:

{
"LoanSetup": {
"__update": true,
"__id": 823,
"scheduleRound": 0.1
}
}

Variable

Description

__update

Set to “true”

__id

The ID of the Loan Setup entity for the loan

scheduleRound

The amount rounded off of the schedule

How do I know what my line or entity ID is?
Check out the following GET request if you're not sure what your entity ID is, or if you don't know the line ID for the schedule line you want to remove.
GET https://loanpro.simnang.com/api/public/api/1/odata.svc/Loans(667)?$expand=ScheduleRolls,LoanSetup

Just replace the loan ID '667' with your own loan ID.

Keep in mind that in order to perform a schedule round, the loan needs to be inactive. See API – Activating a Loan to learn how to activate and inactivate a loan.

Reset Schedule Roll

To reset a schedule roll for a loan, send a GET request to the URL formatted below:

https://loanpro.simnang.com/api/public/api/1/Loans(667)/Autopal.ResetRollSchedule(false)

Remember to replace the loan ID '667' with the id of your loan.

Using Templates

To use a template, send a PUT request to a URL formatted as follows

https://loanpro.simnang.com/api/public/api/1/Loans(667)/Autopal.SetRollScheduleTemplate(2)

Keep in mind that you'll need to replace the loan ID '667' and the template ID '2' with you own loan and template ID's. The template ID options are as follows:

ID

Description

1

Prorate 1st Payment Long Only Template

2

Prorate 1st Payment Short Only Template

3

Prorate 1st Payment All

4

Smooth Payment Advanced

5

Smooth Payment Basic

The rest of the options are determined by your tenant settings.


How did we do?


Powered by HelpDocs (opens in a new tab)