Skip to content

Loans

Borrowers typically have loans. We support multiple loan types and each loan type comes with its set of federal and state compliance rules. You can maintain different statuses of a loan. A borrower can have multiple loans. A loan can belong to multiple people, but only one borrower can be defined as a mainBorrower. A loan is always created using the mainBorrower borrower identifier. Other people can be added as part of the loan details.

All loan attributes can be updated as long as the loan is in pending status. Once the loan status changes to originated attributes of atOrigination object become read only and cannot be updated.

A Loan doesn't start accruing interest until it is activated. To activate the loan, call Activate a loan. On activation the loan can use the due dates and payments schedule from the atOrigination object or the loan can be re-amortized using the activation date as the loan start date.

Get loans

Request

Get all loans associated with a company.

Security
oauth2(Required scopes: loan:listall) or bearerAuth or apiKeyHeader
Query
fieldsstring

The result fields that will be fetched:

all - Fetch all fields.

minimal - Fetch only the following fields: id, externalId, loanTypeId, mainBorrowerId, mainBorrowerExternalId, lockStatus, migrationStatus, and newInterestTimestampStartedAt.

idsOnly - DEPRECATED. Use minimal instead.

Default:"all"
Enum:"all""minimal"
limitinteger, [ 1 .. 100 ]

The maximum count of results to retrieve.

Default:25
startingAfterstring

Return results starting after the provided object identifier.

endingBeforestring

Return results ending before the provided object identifier.

statusesArray of strings

A comma separated list of loan statuses to filter by

Items Enum:"all""active""pending""originated""declined""frozen""accelerated""chargedOff""paidOff""canceled"
managedByPeachboolean or null

If passed, only returns loans with a loan type with "managed by peach" set to this value.

includeAdditionalBorrowersboolean

If set to true, include the addtionalBorrowers field containing information about other borrowers related to this loan, e.g., cosigner, coborrowers, and applicants.

Default:false
loanTypeIdArray of strings

Use this to limit results to a specific lender product.

labelsArray of strings

A comma separated list of loan labels to filter by

createdAtBeforestring, (date-time)

Filter only objects that were not created at or before the specified timestamp. This timestamp is in UTC.

createdAtAfterstring, (date-time)

Filter only objects that were not created at or after the specified timestamp. This timestamp is in UTC.

updatedAtBeforestring, (date-time)

Filter only objects that were not updated at or before the specified timestamp. This timestamp is in UTC.

updatedAtAfterstring, (date-time)

Filter only objects that were not updated at or after the specified timestamp. This timestamp is in UTC.

originatedAtAfterstring, (date-time)

Filter only objects that were not originated at or after the specified timestamp. This timestamp is in UTC.

originatedAtBeforestring, (date-time)

Filter only objects that were not originated at or before the specified timestamp. This timestamp is in UTC.

activatedAtBeforestring, (date-time)

Filter only objects that were not activated at or before the specified timestamp. This timestamp is in UTC.

activatedAtAfterstring, (date-time)

Filter only objects that were not activated at or after the specified timestamp. This timestamp is in UTC.

sortByArray of strings

The data attributes by which to sort the results.

Items Enum:"createdAt""+createdAt""-createdAt""updatedAt""+updatedAt""-updatedAt""originatedAt""+originatedAt""-originatedAt""activatedAt"
dueDatestring, (date)

If passed, only returns loans with a due date equal to this value.

GET
/loans
curl -i -X GET \
  'https://sandboxapi.peach.finance/api/loans?fields=all&limit=25&startingAfter=string&endingBefore=string&statuses=all&managedByPeach=true&includeAdditionalBorrowers=false&loanTypeId=string&labels=string&createdAtBefore=2019-08-24T14%3A15%3A22Z&createdAtAfter=2019-08-24T14%3A15%3A22Z&updatedAtBefore=2019-08-24T14%3A15%3A22Z&updatedAtAfter=2019-08-24T14%3A15%3A22Z&originatedAtAfter=2019-08-24T14%3A15%3A22Z&originatedAtBefore=2019-08-24T14%3A15%3A22Z&activatedAtBefore=2019-08-24T14%3A15%3A22Z&activatedAtAfter=2019-08-24T14%3A15%3A22Z&sortBy=createdAt&dueDate=2019-08-24' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Success

Bodyapplication/json
One of:
countintegerread-only

Number of items returned by the current request.

nextUrlstring or nullread-only

URL of the next set of results.

previousUrlstring or nullread-only

URL of the previous set of results.

statusinteger

HTTP status code.

totalintegerread-only

Total number of items in this result.

dataArray of objects(Loan)
Response
{ "count": 0, "nextUrl": "string", "previousUrl": "string", "status": 0, "total": 0, "data": [ { … } ] }