APModuleLoan

Loan module

Access all of the API endpoints under the 'loan' path. Each module is loaded via {@link \APAPI\APLoader} and passed a reference to a {@link \APAPI\APAPI} instance to use. In practice, usage of SDK modules is as simple as:

$api->loan->initialize();
see

Methods

Constructor

__construct($pxAPIOb) 

When a module is requested via the API base class, it is automatically passed a reference to a {@link \APAPI\APAPI} instance to use.

Arguments

$pxAPIOb

sections - GET loan/sections

sections() : mixed

Provides a list of all data sections available to a loan.

Response

mixed

summary - GET loan/summary

summary(string $pxId) : mixed

Return loan summary numbers & info.

Arguments

$pxId

string

Loan ID

Response

mixed

get - GET loan

get(string $pxId, string $expand = '') : array

Get full loan information

Arguments

$pxId

string

Loan ID to get the collateral data from

$expand

string

Comma delimited values of loan sections to get

Response

array

Loan information

put - PUT loan

put(array $loanData) : array

Update a loan.

Arguments

$loanData

array

Loan update data

Response

array

Loan information

update - PUT loan

update(array $loanData) : array

Update a loan. Same as put.

Arguments

$loanData

array

Loan update data

Response

array

Loan information

delete - DELETE loan

delete(string $loanId) : array

Delete a loan.

Arguments

$loanId

string

The loan to delete

Response

array

The result of the loan operation

create - POST loan

create(array $pxOptions) : mixed

Create a new loan.

Arguments

$pxOptions

array

Loan options

Response

mixed

post - POST loan

post(array $pxOptions) : mixed

Create a loan. Same as create.

Arguments

$pxOptions

array

Loan options

Response

mixed

postPayment - POST loan/payment

postPayment(array $data) : array

Log a new payment to an existing loan.

Arguments

$data

array

Payment data

Response

array

putPayment - PUT loan/payment

putPayment(array $data) : mixed

Edit an existing loan payment.

Arguments

$data

array

Payment data

Response

mixed

deletePayment - DELETE loan/payment

deletePayment(string $loanId, string $paymentId, string $expand = '') : mixed

Reverses a loan payment.

Arguments

$loanId

string

Loan with the payment to delete

$paymentId

string

Payment to delete

$expand

string

Reverse payment options (JSON formatted)

Response

mixed

deleteAdminPayment - DELETE loan/admin/payment

deleteAdminPayment(string $loanId, string $paymentId) : mixed

Deletes a loan payment.

Arguments

$loanId

string

Loan with the payment to delete

$paymentId

string

Payment to delete

Response

mixed

postCharge - POST loan/charges

postCharge(array $data) : array

Log a new charge to an existing loan.

Arguments

$data

array

Charge data

Response

array

putCharge - PUT loan/charges

putCharge(array $data) : mixed

Edit an existing loan charge. All charges will be edited and NOT deleted, stats will still exist on each transaction entered into the system.

Arguments

$data

array

Charge data

Response

mixed

deleteCharge - DELETE loan/charges

deleteCharge(string $loanId, string $chargeId, string $comment) : mixed

Reverse a charge. Only non-edited charges may be reversed.

Arguments

$loanId

string

ID of the loan containing the charge

$chargeId

string

ID of the charge to reverse

$comment

string

Reverse comment

Response

mixed

postLinkBorrower - POST loan/userinformation

postLinkBorrower(array $data) : mixed

Link an existing borrower to a loan.

Arguments

$data

array

Loan link data

Response

mixed

deleteLinkBorrower - DELETE loan/userinformation

deleteLinkBorrower(string $loanId, string $borrowerId) : mixed

Unlink a currently linked borrower from a loan.

Arguments

$loanId

string

ID of the loan containing the charge

$borrowerId

string

ID of the borrower to unlink

Response

mixed

putInitialSetup - PUT loan/initialsetup/loansettings

putInitialSetup(array $data) : mixed

Edit information for this loan that is not essential for calculating payment, APR, finance charge, etc.

Arguments

$data

array

Initial setup data

Response

mixed

postNote - POST loan/note

postNote(array $data) : mixed

Create a new note.

Arguments

$data

array

Note data

Response

mixed

postPromise - POST loan/promise

postPromise(mixed $data) : mixed

Create a new promise.

Arguments

$data

mixed

Response

mixed

postEscrow - POST loan/escrow

postEscrow(array $data) : mixed

Create a new escrow adjustment.

Arguments

$data

array

Escrow data

Response

mixed

deleteEscrow - DELETE loan/escrow

deleteEscrow(string $loanId, string $escrowId) : mixed

Delete an existing escrow adjustment

Arguments

$loanId

string

ID of the loan with the escrow to delete

$escrowId

string

ID of the escrow to delete

Response

mixed

postReference - POST loan/reference

postReference(array $data) : mixed

Add a new reference to the loan.

Arguments

$data

array

Reference data

Response

mixed

deleteReference - DELETE loan/reference

deleteReference(string $loanId, string $referenceId) : mixed

Delete a loan reference.

Arguments

$loanId

string

ID of the loan containing the reference to delete

$referenceId

string

ID of the reference to delete

Response

mixed

postPaymentMethod - POST loan/paymentmethod

postPaymentMethod(array $data) : mixed

Create a new payment method.

Arguments

$data

array

Payment method data

Response

mixed

putPaymentMethod - PUT loan/paymentmethod

putPaymentMethod(array $data) : mixed

Edit an existing payment method.

Arguments

$data

array

Payment method data

Response

mixed

deletePaymentMethod - DELETE loan/paymentmethod

deletePaymentMethod(string $loanId, string $paymentMethodId) : mixed

Mark a currently active payment method as invalid, or a currently invalid method as valid.

Arguments

$loanId

string

ID of the loan containing the payment method to mark as valid or invalid

$paymentMethodId

string

ID of the payment method to mark as valid or invalid

Response

mixed

postAutopay - POST loan/autopay

postAutopay(array $data) : mixed

Schedule a new autopay.

Arguments

$data

array

Autopay data

Response

mixed

putAutopay - PUT loan/autopay

putAutopay(array $data) : mixed

Edit an existing autopay.

Arguments

$data

array

Autopay data

Response

mixed

deleteAutopay - DELETE loan/autopay

deleteAutopay(string $loanId, string $autopayId) : mixed

Delete an existing autopay

Arguments

$loanId

string

ID of the loan containing the autopay to delete

$autopayId

string

ID of the autopay entry to delete

Response

mixed

activate - PUT loan/activate

activate(string $loanId) : mixed

Activate a loan.

Arguments

$loanId

string

ID of the loan to activate

Response

mixed

unActivate - PUT loan/unactivate

unActivate(string $loanId) : mixed

Unactivate a previously activated loan.

Arguments

$loanId

string

ID of the loan to unactivate

Response

mixed

deleteAdvancement - DELETE loan/activated/advancements

deleteAdvancement(string $loanId, string $advancementId) : mixed

Delete an existing advancement.

Arguments

$loanId

string

ID of the activated loan with the advancement to delete

$advancementId

string

ID of the advancement to delete

Response

mixed

postAdvancement - POST loan/activated/advancements

postAdvancement(array $data) : mixed

Create a new advancement.

Arguments

$data

array

Advancement data

Response

mixed

putAdvancement - PUT loan/activated/advancements

putAdvancement(array $data) : mixed

Edit an existing advancement.

Arguments

$data

array

Advancement data

Response

mixed

deleteCredit - DELETE loan/activated/credits

deleteCredit(string $loanId, string $creditId) : mixed

Delete an existing credit.

Arguments

$loanId

string

ID of the activated loan containing the credit to delete

$creditId

string

ID of the credit to delete

Response

mixed

postCredit - POST loan/activated/credits

postCredit(array $data) : mixed

Create a new credit.

Arguments

$data

array

Credit data

Response

mixed

putCredit - PUT loan/activated/credits

putCredit(array $data) : mixed

Edit an existing credit.

Arguments

$data

array

Credit data

Response

mixed

getETFBanks - GET loan/etfbanks

getETFBanks() : mixed

Provides a list of all ETF supported banks

Response

mixed

getNoteCategories - GET loan/notecategories

getNoteCategories() : mixed

Get available note categories

Response

mixed

getLoanArchive - GET loan/archive

getLoanArchive(string $loanId, string $period) : mixed

Get the loan archive data. The archive period may be specified to delimit the scope of the loan archive to get (in days). To get the loan archive since the beginning of the account, use 'all'.

Arguments

$loanId

string

ID of the loan to get the archive from

$period

string

Archive period (in days) or 'all' to get it since the beginning of the account

Response

mixed

getPromiseType - GET loan/promisetype

getPromiseType() : mixed

Get available promise types

Response

mixed

getPaymentTypes - GET loan/paymenttypes

getPaymentTypes() : mixed

Get supported payment types

Response

mixed

getLoanStatus - GET loan/status

getLoanStatus() : mixed

Get supported loan status

Response

mixed

getFeeTypes - GET loan/feetypes

getFeeTypes() : mixed

Get supported fee types

Response

mixed

getPayoff - GET loan/calc/payoff

getPayoff(string $loanId, string $date = "") : mixed

Get the 10 day loan payoff range for any starting date.

Arguments

$loanId

string

ID of the loan to get the payoff from

$date

string

Payoff date range (defaults to current date)

Response

mixed

getRollPaymentOptions - GET loan/calc/rollpaymentoptions

getRollPaymentOptions(string $loanId) : mixed

Get supported methods for adjustment of the desired roll payment.

Arguments

$loanId

string

ID of the loan to get roll payment options from

Response

mixed

getRollPayment - GET loan/calc/rollpayment

getRollPayment(string $loanId, string $desiredPayment = "", string $solveWith = "") : mixed

Roll various terms of the loan to result in the desired payment.

Arguments

$loanId

string

ID of the loan to roll payment to

$desiredPayment

string

The desired payment (defaults to the configured loan payment amount)

$solveWith

string

How to adjust in the solving for the desired payment (defaults to the first configured roll payment option)

Response

mixed

getRollPaymentFixedTerm - GET loan/calc/rollpaymentfixedterm

getRollPaymentFixedTerm(string $loanId, string $useFixedTerm = "", string $fixedTerm = "") : mixed

Roll the payment amount to whatever it needs to be in order to have the fixed term value have the balance equal zero after. This is used for irregular 1st periods that would otherwise extend or shorten the term of the contract by accruing more or less interest in the 1st period due to that periods irregularity.

Arguments

$loanId

string

ID of the loan to roll payment to

$useFixedTerm

string

Whether to use fixed term or not (disabled by default)

$fixedTerm

string

The desired rounded up whole term number (defaults to the loan term)

Response

mixed

getForceSchedule - GET loan/calc/forceschedule

getForceSchedule(string $loanId) : mixed

Get the list of forced payment schedule for the current loan

Arguments

$loanId

string

ID of the loan to get the force schedule list from

Response

mixed

getRollSchedule - GET loan/calc/rollschedule

getRollSchedule(string $loanId) : mixed

Get the current roll schedule.

Arguments

$loanId

string

ID of the loan to get the roll schedule from.

Response

mixed

getAdvancements - GET loan/activated/advancements

getAdvancements(string $loanId) : mixed

Get existing loan advancements.

Arguments

$loanId

string

ID of the loan to get advancements from

Response

mixed

getCredits - GET loan/activated/credits

getCredits(string $loanId) : mixed

Get existing loan credits.

Arguments

$loanId

string

ID of the loan to get credits from

Response

mixed

putInvestor - PUT loan/investor

putInvestor(array $data) : mixed

Update investor ownership percentage of a loan.

Arguments

$data

array

Investor data

Response

mixed

postInvestor - POST loan/investor

postInvestor(array $data) : mixed

Assign an existing investor to a loan.

Arguments

$data

array

Investor data

Response

mixed

postEscrowTransaction - POST loan/escrowtransaction

postEscrowTransaction(array $data) : mixed

Loa a new escrow transaction.

Arguments

$data

array

Escrow transaction data

Response

mixed

postQuickbooksReset - POST loan/quickbooks/reset

postQuickbooksReset(array $data) : mixed

This deletes the link between this account and the corresponding account in QuickBooks.

Arguments

$data

array

Quickbooks data

Response

mixed

postQuickbooksAccountSetup - POST loan/quickbooks/accountsetup

postQuickbooksAccountSetup(array $data) : mixed

Send the customer information and create the account in QuickBooks. It will also send the funding check information and create an invoice for the underwriting fee.

Arguments

$data

array

Quickbooks data

Response

mixed

postQuickbooksSendCustomer - POST loan/quickbooks/sendcustomer

postQuickbooksSendCustomer(array $data) : mixed

Send only the customer information and create the customer account in QuickBooks.

Arguments

$data

array

Quickbooks data

Response

mixed

postQuickbooksAllTransactions - POST loan/quickbooks/alltransactions

postQuickbooksAllTransactions(array $data) : mixed

Send all transactions if they have not been successfully sent to QuickBooks previously.

Arguments

$data

array

Quickbooks data

Response

mixed

putForceSchedule - PUT loan/calc/forceschedule

putForceSchedule(array $data) : mixed

Edit an existing force schedule row. Force the payment schedule to a custom schedule.

Arguments

$data

array

Force schedule data

Response

mixed

postForceSchedule - POST loan/calc/forceschedule

postForceSchedule(mixed $data) : mixed

Add a new force schedule row. Force the payment schedule to a custom schedule.

Arguments

$data

mixed

Response

mixed

deleteInvestor - DELETE loan/investor

deleteInvestor(string $loanId, string $investorId) : mixed

Delete an investor from a loan. If an investor is assigned to the specified loan, it will be removed from the loan investor list.

Arguments

$loanId

string

ID of the loan with the investor to delete

$investorId

string

ID of the investor to delete

Response

mixed

deletePromise - DELETE loan/promise

deletePromise(string $loanId, string $promiseId) : mixed

Delete a promise from the specified loan.

Arguments

$loanId

string

ID of the loan with the promise to delete

$promiseId

string

ID of the promise to delete

Response

mixed

deleteForceSchedule - DELETE loan/calc/forceschedule

deleteForceSchedule(string $loanId, string $forceScheduleId) : mixed

Delete a force schedule row by ID.

Arguments

$loanId

string

ID of the loan with the force schedule row to delete

$forceScheduleId

string

ID of the force schedule row to delete

Response

mixed

deleteRollSchedule - DELETE loan/calc/rollschedule

deleteRollSchedule(string $loanId) : mixed

Delete the oldest roll schedule line.

Arguments

$loanId

string

ID of the loan with the roll schedule line to delete

Response

mixed

Properties

api

api