Skip to main content
PATCH
Update a loan

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

businessId
string<uuid>
required

The UUID of the business.

loanId
string<uuid>
required

The UUID of the loan.

Body

application/json

The loan fields to update.

Parameters for updating a loan. The shape depends on loan_type.

loan_type
enum<string>
required

Discriminator. Must be TERM_LOAN.

Available options:
TERM_LOAN
display_name
string

Updated display name for the loan.

origination_date
string<date>

Updated origination date.

original_principal
integer<int64>

Updated original principal, in cents.

loan_term_months
integer<int32> | null

Updated term, in months.

proceeds
(Asset proceed Ā· object | Disbursement proceed Ā· object)[]

Replaces the loan's proceeds with this list.

A loan proceed: funds (or an asset) received from the loan.

opening_balance
Loan opening balance Ā· object | null

Sets or replaces the loan's opening balance. Pass null explicitly to remove it (the opening balance ledger entry is reversed). Omit to leave it unchanged. Mutually exclusive with reported_balance.

reported_balance
Reported loan balance Ā· object | null

Asserts the loan's outstanding principal at a point in time; Layer derives the opening balance from it and recorded history. Recommended when creating a loan that is already partially repaid. Mutually exclusive with opening_balance. Omitting the field and passing null are equivalent: no assertion is made and any existing opening balance is left unchanged.

memo
string | null

Updated internal note.

metadata
object | null

Arbitrary JSON object you can attach for your own use. Layer stores and returns it unchanged.

reference_number
string | null

Updated reference number.

Response

200 - application/json

The updated loan.

data
object
required

A loan held by a business. Each loan has a dedicated child ledger (liability) account.