Calculate-apr function

The calculate-apr function is used to calculate the APR of provided loan terms.

Switch between the tabs below to view the components of the request example:

POST  https://{companyDomain}.loanpro.io/api/v2/calculator/calculate-apr
Authorization: Bearer {token}
Autopal-Instance-Id: {Tenant ID}
{
    "Settings": {},
    "LoanSetup": {
        "id": 752,
        "active": 1,
        "apr": 5.0,
        "aprForceSingle": 0,
        "payment": 281.01,
        "origFinalPaymentDate": "/Date(1754006400)/",
        "origFinalPaymentAmount": 280.45,
        "loanAmount": 15000,
        "discount": 0,
        "underwriting": 0,
        "loanRate": 5.0,
        "loanRateType": "loan.rateType.annually",
        "loanTerm": 60,
        "moneyFactor": 0,
        "residual": 0,
        "contractDate": "/Date(1597622400)/",
        "firstPaymentDate": "/Date(1598918400)/",
        "scheduleRound": 0.06,
        "amountDown": 0,
        "reserve": 0,
        "salesPrice": 0,
        "gap": 0,
        "warranty": 0,
        "dealerProfit": 0,
        "taxes": 0,
        "creditLimit": 0,
        "reportingCreditLimit": 0,
        "loanClass": "loan.class.carLoan",
        "loanType": "loan.type.installment",
        "discountSplit": 1,
        "paymentFrequency": "loan.frequency.monthly",
        "calcType": "loan.calcType.simpleInterest",
        "daysInYear": "loan.daysInYear.actual",
        "interestApplication": "loan.interestApplication.betweenTransactions",
        "begEnd": "loan.begend.end",
        "firstPeriodDays": "loan.firstPeriodDays.actual",
        "firstDayInterest": 1,
        "discountCalc": "loan.discountCalc.rebalancing",
        "diyAlt": 0,
        "dueDateOnLastDOM": 0,
        "dueDatesOnBusinessDays": "loan.businessduedates.disabled",
        "daysInPeriod": "loan.daysinperiod.30",
        "roundDecimals": 2,
        "lastAsFinal": 0,
        "nddCalc": "loan.nddCalc.standard",
        "endInterest": "loan.endInterest.no",
        "scheduleTemplate": 4,
        "curtailmentTemplate": 0,
        "feesPaidBy": "loan.feesPaidBy.period",
        "useInterestTiers": 0,
        "calcHistoryEnabled": 0,
        "calcDatesEnabled": 0,
        "graceDays": 10,
        "lateFeeType": "loan.lateFee.1",
        "lateFeeAmount": 30,
        "lateFeePercent": 0,
        "lateFeeCalc": "loan.lateFeeCalc.standard",
        "lateFeePercentBase": "loan.latefeepercentbase.regular",
        "rollLastPayment": 0,
        "paymentDateApp": "loan.pmtdateapp.actual",
        "suspendForecastTo": null,
        "isSetupValid": true,
        "usuryAlert": false
    },
    "Charges": {
        "results": [
            {
                "id": 514,
                "displayId": 3700,
                "relatedPaymentId": 0,
                "chargeTypeId": 5,
                "chargeApplicationType": "loan.latefeeapp.standard",
                "pastDueSetting": "loan.pastdue.include",
                "amount": 25,
                "paidAmount": 0,
                "paidPercent": 0,
                "pastDueCalculation": "loan.feepastduecalc.immediate",
                "interestBearing": 0,
                "date": "/Date(1606176000)/",
                "info": "Cleaning Fee",
                "parentId": 0,
                "childId": 517,
                "editComment": "Wrong date",
                "active": 0,
                "created": null,
                "isReversal": 0
            },
            {
                "id": 515,
                "displayId": 3701,
                "relatedPaymentId": 0,
                "chargeTypeId": 2,
                "chargeApplicationType": "loan.latefeeapp.standard",
                "pastDueSetting": "loan.pastdue.include",
                "amount": 10,
                "paidAmount": 0,
                "paidPercent": 0,
                "pastDueCalculation": "loan.feepastduecalc.immediate",
                "interestBearing": 0,
                "date": "/Date(1606176000)/",
                "info": "Insurance Agency Fee",
                "parentId": 0,
                "childId": 516,
                "editComment": "rsdafsd",
                "active": 0,
                "created": null,
                "isReversal": 0
            },
            {
                "id": 516,
                "displayId": 3702,
                "relatedPaymentId": 0,
                "chargeTypeId": 2,
                "chargeApplicationType": "loan.latefeeapp.standard",
                "pastDueSetting": "loan.pastdue.include",
                "amount": 10,
                "paidAmount": 10,
                "paidPercent": 100,
                "pastDueCalculation": "loan.feepastduecalc.immediate",
                "interestBearing": 0,
                "date": "/Date(1597622400)/",
                "info": "Insurance Agency Fee",
                "parentId": 515,
                "childId": 0,
                "editComment": null,
                "active": 1,
                "created": null,
                "isReversal": 0
            },
            {
                "id": 517,
                "displayId": 3703,
                "relatedPaymentId": 0,
                "chargeTypeId": 5,
                "chargeApplicationType": "loan.latefeeapp.standard",
                "pastDueSetting": "loan.pastdue.include",
                "amount": 25,
                "paidAmount": 25,
                "paidPercent": 100,
                "pastDueCalculation": "loan.feepastduecalc.immediate",
                "interestBearing": 0,
                "date": "/Date(1597622400)/",
                "info": "Cleaning Fee",
                "parentId": 514,
                "childId": 0,
                "editComment": null,
                "active": 1,
                "created": null,
                "isReversal": 0
            }
        ]
    },
    "Payments": {
        "results": [
            {
                "id": 1867,
                "displayId": 6572,
                "paymentTypeId": 1,
                "paymentMethodId": 2,
                "paymentAccountId": 0,
                "cashDrawerId": 0,
                "cashDrawerTxId": 0,
                "txSnapshotId": 0,
                "amount": 315.45,
                "extra": "payment.extra.tx.principal",
                "lastExtra": null,
                "early": 0,
                "payoffFlag": 0,
                "payoffApplyDiffAs": null,
                "payoffOptions": null,
                "customApplication": null,
                "info": "08/31/2020 Check",
                "date": "/Date(1598832000)/",
                "chargeFeeType": "loan.cardfee.types.0",
                "chargeFeeAmount": 0,
                "chargeFeePercentage": 0,
                "echeckAuthType": "payment.echeckauth.WEB",
                "parentId": 0,
                "childId": 0,
                "status": "payment.status.none",
                "reverseReason": null,
                "reverseDate": null,
                "comments": null,
                "loanStatusId": 5,
                "loanSubStatusId": 27,
                "sourceCompanyId": 1,
                "systemComments": "",
                "chargeOffRecovery": 0,
                "resetPastDue": 0,
                "apdAdjustmentId": 0,
                "dpdAdjustmentId": 0,
                "paymentMethodOption": null,
                "paymentMethodName": null,
                "isSplit": 0,
                "splitId": 0,
                "nachaReturnCode": null,
                "active": 1,
                "created": "/Date(1606244502)/",
                "reportExtendedData": null,
                "createdBy": null,
                "autopayId": 0,
                "PaymentType": {
                    "id": 1,
                    "static": 1,
                    "title": "Regular",
                    "application": "[\"payment.application.fees\",\"payment.application.escrow\",\"payment.application.interest\",\"payment.application.discount\",\"payment.application.principal\"]",
                    "escrowApplication": null,
                    "description": "A Regular payment will ALWAYS apply on the transaction date if the account has any balance due at the time of payment. If the loan is current it will apply on the next due date, or the date entered into the Payment Date field above, whichever is greater. A Regular payment applies a loan payment according to the waterfall application shown above. If a partial payment is applied it will still use the same waterfall application. If extra (more than the amount due on the loan) is paid, you can elect how it will apply with the payment setting selection of \"Extra Towards.\" If \"next\" is selected the extra amount will apply to future due dates using the above waterfall application, if another option is selected for the \"Extra Towards\" it will apply as specified by that option.",
                    "created": "/Date(1436818288)/",
                    "active": 1
                }
            },
            {
                "id": 1868,
                "displayId": 6573,
                "paymentTypeId": 1,
                "paymentMethodId": 2,
                "paymentAccountId": 0,
                "cashDrawerId": 0,
                "cashDrawerTxId": 0,
                "txSnapshotId": 0,
                "amount": 280.45,
                "extra": "payment.extra.tx.principal",
                "lastExtra": null,
                "early": 0,
                "payoffFlag": 0,
                "payoffApplyDiffAs": null,
                "payoffOptions": null,
                "customApplication": null,
                "info": "09/28/2020 Check",
                "date": "/Date(1601251200)/",
                "chargeFeeType": "loan.cardfee.types.0",
                "chargeFeeAmount": 0,
                "chargeFeePercentage": 0,
                "echeckAuthType": "payment.echeckauth.WEB",
                "parentId": 0,
                "childId": 0,
                "status": "payment.status.none",
                "reverseReason": null,
                "reverseDate": null,
                "comments": null,
                "loanStatusId": 5,
                "loanSubStatusId": 27,
                "sourceCompanyId": 1,
                "systemComments": "",
                "chargeOffRecovery": 0,
                "resetPastDue": 0,
                "apdAdjustmentId": 0,
                "dpdAdjustmentId": 0,
                "paymentMethodOption": null,
                "paymentMethodName": null,
                "isSplit": 0,
                "splitId": 0,
                "nachaReturnCode": null,
                "active": 1,
                "created": "/Date(1606244917)/",
                "reportExtendedData": null,
                "createdBy": null,
                "autopayId": 0,
                "PaymentType": {
                    "id": 1,
                    "static": 1,
                    "title": "Regular",
                    "application": "[\"payment.application.fees\",\"payment.application.escrow\",\"payment.application.interest\",\"payment.application.discount\",\"payment.application.principal\"]",
                    "escrowApplication": null,
                    "description": "A Regular payment will ALWAYS apply on the transaction date if the account has any balance due at the time of payment. If the loan is current it will apply on the next due date, or the date entered into the Payment Date field above, whichever is greater. A Regular payment applies a loan payment according to the waterfall application shown above. If a partial payment is applied it will still use the same waterfall application. If extra (more than the amount due on the loan) is paid, you can elect how it will apply with the payment setting selection of \"Extra Towards.\" If \"next\" is selected the extra amount will apply to future due dates using the above waterfall application, if another option is selected for the \"Extra Towards\" it will apply as specified by that option.",
                    "created": "/Date(1436818288)/",
                    "active": 1
                }
            },
            {
                "id": 1869,
                "displayId": 6574,
                "paymentTypeId": 1,
                "paymentMethodId": 2,
                "paymentAccountId": 0,
                "cashDrawerId": 0,
                "cashDrawerTxId": 0,
                "txSnapshotId": 0,
                "amount": 280.45,
                "extra": "payment.extra.tx.principal",
                "lastExtra": null,
                "early": 0,
                "payoffFlag": 0,
                "payoffApplyDiffAs": null,
                "payoffOptions": null,
                "customApplication": null,
                "info": "11/03/2020 Check",
                "date": "/Date(1604361600)/",
                "chargeFeeType": "loan.cardfee.types.0",
                "chargeFeeAmount": 0,
                "chargeFeePercentage": 0,
                "echeckAuthType": "payment.echeckauth.WEB",
                "parentId": 0,
                "childId": 0,
                "status": "payment.status.none",
                "reverseReason": null,
                "reverseDate": null,
                "comments": null,
                "loanStatusId": 5,
                "loanSubStatusId": 27,
                "sourceCompanyId": 1,
                "systemComments": "",
                "chargeOffRecovery": 0,
                "resetPastDue": 0,
                "apdAdjustmentId": 0,
                "dpdAdjustmentId": 0,
                "paymentMethodOption": null,
                "paymentMethodName": null,
                "isSplit": 0,
                "splitId": 0,
                "nachaReturnCode": null,
                "active": 1,
                "created": "/Date(1606245498)/",
                "reportExtendedData": null,
                "createdBy": null,
                "autopayId": 0,
                "PaymentType": {
                    "id": 1,
                    "static": 1,
                    "title": "Regular",
                    "application": "[\"payment.application.fees\",\"payment.application.escrow\",\"payment.application.interest\",\"payment.application.discount\",\"payment.application.principal\"]",
                    "escrowApplication": null,
                    "description": "A Regular payment will ALWAYS apply on the transaction date if the account has any balance due at the time of payment. If the loan is current it will apply on the next due date, or the date entered into the Payment Date field above, whichever is greater. A Regular payment applies a loan payment according to the waterfall application shown above. If a partial payment is applied it will still use the same waterfall application. If extra (more than the amount due on the loan) is paid, you can elect how it will apply with the payment setting selection of \"Extra Towards.\" If \"next\" is selected the extra amount will apply to future due dates using the above waterfall application, if another option is selected for the \"Extra Towards\" it will apply as specified by that option.",
                    "created": "/Date(1436818288)/",
                    "active": 1
                }
            }
        ]
    },
    "Advancements": {
        "results": [
            {
                "id": 38,
                "title": "Registration",
                "date": "/Date(1602460800)/",
                "amount": 173.82,
                "category": 1
            }
        ]
    },
    "Credits": {
        "results": [
            {
                "id": 593,
                "importId": null,
                "title": "Cleaning Fee Returned",
                "date": "/Date(1601856000)/",
                "amount": 25,
                "category": 2,
                "paymentType": 1,
                "customApplication": "[]",
                "resetPastDue": 0,
                "apdAdjustmentId": 0,
                "dpdAdjustmentId": 0,
                "created": "/Date(1606245121)/",
                "chargeOffFlag": false,
                "isChildCredit": 0,
                "loanIdChild": 0,
                "isParentCredit": 0,
                "parentCreditId": "0",
                "CustomPaymentType": {
                    "id": 1,
                    "static": 1,
                    "title": "Regular",
                    "application": "[\"payment.application.fees\",\"payment.application.escrow\",\"payment.application.interest\",\"payment.application.discount\",\"payment.application.principal\"]",
                    "escrowApplication": null,
                    "description": "A Regular payment will ALWAYS apply on the transaction date if the account has any balance due at the time of payment. If the loan is current it will apply on the next due date, or the date entered into the Payment Date field above, whichever is greater. A Regular payment applies a loan payment according to the waterfall application shown above. If a partial payment is applied it will still use the same waterfall application. If extra (more than the amount due on the loan) is paid, you can elect how it will apply with the payment setting selection of \"Extra Towards.\" If \"next\" is selected the extra amount will apply to future due dates using the above waterfall application, if another option is selected for the \"Extra Towards\" it will apply as specified by that option.",
                    "created": "/Date(1436818288)/",
                    "active": 1
                }
            }
        ]
    },
    "DueDateChanges": {
        "results": [
            {
                "id": 99,
                "originalDate": "/Date(1601510400)/",
                "newDate": "/Date(1604534400)/",
                "changedDate": "/Date(1604188800)/",
                "dueDateOnLastDOM": 0
            }
        ]
    },
    "ScheduleRolls": {
        "results": [
            {
                "id": 1922,
                "term": 60,
                "rate": 4.7,
                "solveUsing": "loan.rollScheduleSolve.dollar",
                "amount": 280.45,
                "percent": 0,
                "advancedTerms": 0,
                "solveFor": "loan.rollScheduleSolveFor.payment",
                "balance": 0,
                "balanceSet": 0,
                "difference": 0,
                "forceBalloon": 0,
                "basicRevert": 0,
                "displayOrder": 1,
                "isCurtailment": 0,
                "lastAsFinal": 0
            }
        ]
    },
    "StopInterestDates": {
        "results": [
            {
                "id": 46,
                "date": "/Date(1605398400)/",
                "type": "loan.stopInterestType.suspend"
            }
        ]
    },
    "APDAdjustments": {
        "results": [
            {
                "id": 183,
                "date": "/Date(1604188800)/",
                "type": "loan.apd.adjust.type.zero",
                "dollarAmount": 0
            }
        ]
    },
    "DPDAdjustments": {
        "results": [
            {
                "id": 12,
                "date": "/Date(1604188800)/"
            }
        ]
    },
    "EscrowAdjustments": {
        "results": [
            {
                "id": 4633,
                "subset": 2,
                "period": 1,
                "amount": 0,
                "description": null
            },
            {
                "id": 4634,
                "subset": 2,
                "period": 2,
                "amount": 0,
                "description": null
            }
        ]
    },
    "EscrowSubsetOptions": {
        "results": {
            "1": {
                "id": 2915,
                "subset": "2",
                "payoffOption": "loan.escrowpayoff.standard",
                "paymentApplication": "loan.escrowpmtapp.standard",
                "aprInclude": 1,
                "scheduleInclude": 1,
                "disclosureLnAmtAdd": 0,
                "interestBearing": 0,
                "escrowAnalysisEnabled": 1,
                "cushion": 1,
                "cushionFixedAmount": 0,
                "cushionPercentage": 0,
                "escrowComputationYearStartDate": "/Date(1546128000)/",
                "nextEscrowAnalysisDate": "/Date(1548806400)/",
                "deficiencyDelimitingDPD": 0,
                "deficiencyDaysToPay": 0,
                "deficiencyDelimitingAmount": 1,
                "deficiencyDelimitingDollar": 0,
                "deficiencyDelimitingPercentage": 0,
                "deficiencyCatchupPaymentNumber": 2,
                "deficiencyActionA": 1,
                "deficiencyActionB": 1,
                "deficiencyActionC": 1,
                "shortageDaysToPay": 0,
                "shortageCatchupPaymentNumber": 1,
                "shortageDelimitingAmount": 1,
                "shortageDelimitingDollar": 0,
                "shortageDelimitingPercentage": 0,
                "shortageActionA": 1,
                "shortageActionB": 1,
                "surplusAllowedSurplus": 0,
                "surplusDaysToRefund": 0,
                "surplusDelimitingDPD": 0,
                "surplusActionA": 1,
                "surplusActionB": 1,
                "EscrowCalculators": {
                    "results": [
                        {
                            "id": 2764,
                            "subset": 2,
                            "term": 1,
                            "total": 0,
                            "percent": 0,
                            "firstPeriod": 0,
                            "regularPeriod": 0,
                            "percentBase": "loan.escrowPercentBase.basePayment",
                            "proRate1st": "loan.escrowProrateFirst.none",
                            "extendFinal": 0
                        }
                    ]
                }
            },
            "2": {
                "id": 2916,
                "subset": "3",
                "payoffOption": "loan.escrowpayoff.standard",
                "paymentApplication": "loan.escrowpmtapp.standard",
                "aprInclude": 1,
                "scheduleInclude": 1,
                "disclosureLnAmtAdd": 0,
                "interestBearing": 1,
                "escrowAnalysisEnabled": 0,
                "cushion": 1,
                "cushionFixedAmount": 0,
                "cushionPercentage": 0,
                "escrowComputationYearStartDate": "/Date(-62169984000)/",
                "nextEscrowAnalysisDate": "/Date(-62169984000)/",
                "deficiencyDelimitingDPD": 30,
                "deficiencyDaysToPay": 30,
                "deficiencyDelimitingAmount": 1,
                "deficiencyDelimitingDollar": 0,
                "deficiencyDelimitingPercentage": 0,
                "deficiencyCatchupPaymentNumber": 2,
                "deficiencyActionA": 1,
                "deficiencyActionB": 1,
                "deficiencyActionC": 1,
                "shortageDaysToPay": 30,
                "shortageCatchupPaymentNumber": 12,
                "shortageDelimitingAmount": 1,
                "shortageDelimitingDollar": 0,
                "shortageDelimitingPercentage": 0,
                "shortageActionA": 1,
                "shortageActionB": 1,
                "surplusAllowedSurplus": 50,
                "surplusDaysToRefund": 30,
                "surplusDelimitingDPD": 30,
                "surplusActionA": 1,
                "surplusActionB": 1,
                "EscrowCalculators": {
                    "results": [
                        {
                            "id": 2765,
                            "subset": 3,
                            "term": 1,
                            "total": 0,
                            "percent": 0,
                            "firstPeriod": 0,
                            "regularPeriod": 0,
                            "percentBase": "loan.escrowPercentBase.loanAmount",
                            "proRate1st": "loan.escrowProrateFirst.none",
                            "extendFinal": 0
                        }
                    ]
                }
            },
            "3": {
                "id": 2917,
                "subset": "4",
                "payoffOption": "loan.escrowpayoff.straightline",
                "paymentApplication": "loan.escrowpmtapp.standard",
                "aprInclude": 1,
                "scheduleInclude": 1,
                "disclosureLnAmtAdd": 0,
                "interestBearing": 1,
                "escrowAnalysisEnabled": 1,
                "cushion": 1,
                "cushionFixedAmount": 50,
                "cushionPercentage": 16.667,
                "escrowComputationYearStartDate": "/Date(1545782400)/",
                "nextEscrowAnalysisDate": "/Date(1546214400)/",
                "deficiencyDelimitingDPD": 30,
                "deficiencyDaysToPay": 30,
                "deficiencyDelimitingAmount": 1,
                "deficiencyDelimitingDollar": 50,
                "deficiencyDelimitingPercentage": 0,
                "deficiencyCatchupPaymentNumber": 2,
                "deficiencyActionA": 2,
                "deficiencyActionB": 2,
                "deficiencyActionC": 2,
                "shortageDaysToPay": 30,
                "shortageCatchupPaymentNumber": 12,
                "shortageDelimitingAmount": 1,
                "shortageDelimitingDollar": 50,
                "shortageDelimitingPercentage": 0,
                "shortageActionA": 2,
                "shortageActionB": 2,
                "surplusAllowedSurplus": 50,
                "surplusDaysToRefund": 30,
                "surplusDelimitingDPD": 30,
                "surplusActionA": 2,
                "surplusActionB": 2,
                "EscrowCalculators": {
                    "results": [
                        {
                            "id": 2766,
                            "subset": 4,
                            "term": 1,
                            "total": 0,
                            "percent": 0,
                            "firstPeriod": 0,
                            "regularPeriod": 0,
                            "percentBase": "loan.escrowPercentBase.loanAmount",
                            "proRate1st": "loan.escrowProrateFirst.none",
                            "extendFinal": 0
                        }
                    ]
                }
            },
            "4": {
                "id": 2918,
                "subset": "5",
                "payoffOption": "loan.escrowpayoff.straightline",
                "paymentApplication": "loan.escrowpmtapp.prorate",
                "aprInclude": 1,
                "scheduleInclude": 1,
                "disclosureLnAmtAdd": 0,
                "interestBearing": 0,
                "escrowAnalysisEnabled": 0,
                "cushion": 1,
                "cushionFixedAmount": 0,
                "cushionPercentage": 0,
                "escrowComputationYearStartDate": "/Date(-62169984000)/",
                "nextEscrowAnalysisDate": "/Date(-62169984000)/",
                "deficiencyDelimitingDPD": 30,
                "deficiencyDaysToPay": 30,
                "deficiencyDelimitingAmount": 1,
                "deficiencyDelimitingDollar": 0,
                "deficiencyDelimitingPercentage": 0,
                "deficiencyCatchupPaymentNumber": 2,
                "deficiencyActionA": 1,
                "deficiencyActionB": 1,
                "deficiencyActionC": 1,
                "shortageDaysToPay": 30,
                "shortageCatchupPaymentNumber": 12,
                "shortageDelimitingAmount": 1,
                "shortageDelimitingDollar": 0,
                "shortageDelimitingPercentage": 0,
                "shortageActionA": 1,
                "shortageActionB": 1,
                "surplusAllowedSurplus": 50,
                "surplusDaysToRefund": 30,
                "surplusDelimitingDPD": 30,
                "surplusActionA": 1,
                "surplusActionB": 1,
                "EscrowCalculators": {
                    "results": [
                        {
                            "id": 2767,
                            "subset": 5,
                            "term": 1,
                            "total": 0,
                            "percent": 0,
                            "firstPeriod": 0,
                            "regularPeriod": 0,
                            "percentBase": "loan.escrowPercentBase.loanAmount",
                            "proRate1st": "loan.escrowProrateFirst.none",
                            "extendFinal": 0
                        }
                    ]
                }
            }
        }
    }
}
{
    "d": {
        "initial": 13673.336241259958,
        "final": 14999.999999978596,
        "loanAmount": 15000,
        "rate": 0.5007346990145741,
        "solution": 0.5007,
        "tries": 51
    }
}