Summarize the loan pipeline

Totals over the loan files GET /api/v4/loans lists for the same
filters: counts and money figures added up by the server, optionally
grouped. Use it to answer "how much" and "how many" in one request
instead of reading every file.

The same files as the list. Every GET /api/v4/loans filter is
accepted here with the same name and meaning, and is applied by the
same code, so data.totals.files equals the list's
meta.pagination.total for the same filters when no date window
beyond the list's own is sent. There is no paging:
page and perPage are refused. Archived files are left out unless
archiveState or includeArchived says otherwise. When your access
is limited to your branches (see GET /api/v4/loans), every total
covers those branches only, exactly as the list does.

Unknown parameters are reported, not refused (D27, during its
deprecation window): the request answers 200, the parameter is
ignored, and it is named in meta.warnings as
{code: UNKNOWN_PARAMETER, parameter}. ⚠️ So check meta.warnings: a
misspelt filter means the totals are NOT filtered by it. An invalid
value of a known parameter is still a 422.

Date windows. Each date has its own From/To pair, both
inclusive and either usable alone: loanClosingFrom/loanClosingTo,
loanRequestedCloseFrom/loanRequestedCloseTo,
loanMaturityFrom/loanMaturityTo. The created date uses the list's
own createdFrom/createdTo; loanClosingFrom/loanClosingTo are
the list's own too. Several windows narrow together. A file with no
requested-close or maturity date is outside those windows.
⚠️ loanClosingFrom/loanClosingTo keep the list's rules exactly:
loanClosingTo sent alone still counts a file whose closing date is
stored as 0000-00-00. A backwards pair — To before From — is a
422 naming the To key on EVERY window here, the list's and this
route's own alike. (Until API 4.1 the list's pairs answered an empty
result instead.)

Grouping. groupBy takes one or two dimensions. Each group's
files add up to totals.files. Property state and type are the
file's primary property, so a file with several properties is counted
once. Grouped by status, every file falls in exactly one
statusBucket: listed, no-status-recorded, or
not-in-company-list (its status id is not one of this company's).
Grouped by status alone, the last two always appear, even at 0.

Reading a figure. Money is an exact decimal string to the cent.
Every money figure carries includedFiles and excludedFiles: files
left out because the figure is not recorded on them. For
cashNeededAtClosing, totalCommitment, unfundedCommitment and
averageLoanAmount that is a file missing either the base or the total
loan amount: the four share one set and one count. A stored 0 counts
as not recorded, the way GET /api/v4/loans/{id} returns it as null.
Amounts are the loan's stored calculated figures — the same ones the
loan read returns. They are not recalculated live: a save marks them
for recalculation, and a file never calculated has none and is
excluded.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
groupBy
array of strings, unique
length ≤ 2

One or two dimensions, comma-separated (?groupBy=status,branch). Omitted or empty, only totals is returned.

date

As on GET /api/v4/loans: earliest loanClosingDate, YYYY-MM-DD, inclusive.

date

As on GET /api/v4/loans: latest loanClosingDate, YYYY-MM-DD, inclusive. Not before loanClosingFrom.

date

Earliest loanRequestedCloseDate, YYYY-MM-DD, inclusive.

date

Latest loanRequestedCloseDate, YYYY-MM-DD, inclusive. Not before loanRequestedCloseFrom.

date

Earliest loanMaturityDate, YYYY-MM-DD, inclusive.

date

Latest loanMaturityDate, YYYY-MM-DD, inclusive. Not before loanMaturityFrom.

integer

As on GET /api/v4/loans.

integer
deprecated

Deprecated — use brokerId. Still accepted, and means exactly what brokerId means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

integer

As on GET /api/v4/loans.

integer
deprecated

Deprecated — use borrowerId. Still accepted, and means exactly what borrowerId means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

integer

As on GET /api/v4/loans.

integer
deprecated

Deprecated — use loanOfficerId. Still accepted, and means exactly what loanOfficerId means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

boolean

As on GET /api/v4/loans.

boolean
deprecated

Deprecated — use includeArchived. Still accepted, and means exactly what includeArchived means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

string
enum

As on GET /api/v4/loans, except that it applies here for every caller, a company API key included.

Allowed:
string
enum
deprecated

Deprecated — use archiveState. Still accepted, and means exactly what archiveState means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

Allowed:
primaryStatusId
array of integers
length ≤ 50

As on GET /api/v4/loans: one id or several, comma-separated.

primaryStatusId
primary_status_id
array of integers
length ≤ 50
deprecated

Deprecated — use primaryStatusId. Still accepted, and means exactly what primaryStatusId means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

primary_status_id
date

As on GET /api/v4/loans.

date
deprecated

Deprecated — use createdFrom. Still accepted, and means exactly what createdFrom means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

date

As on GET /api/v4/loans.

date
deprecated

Deprecated — use createdTo. Still accepted, and means exactly what createdTo means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

date

As on GET /api/v4/loans.

date
deprecated

Deprecated — use modifiedFrom. Still accepted, and means exactly what modifiedFrom means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

date

As on GET /api/v4/loans.

date
deprecated

Deprecated — use modifiedTo. Still accepted, and means exactly what modifiedTo means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

string
length ≤ 255

As on GET /api/v4/loans.

string
length ≤ 255
deprecated

Deprecated — use loanNumber. Still accepted, and means exactly what loanNumber means, until it is removed on a date announced in the API changelog, 90 days after the announcement. A request that sends it gets a Deprecation response header; sending both names with different values is a 422 naming both.

As on GET /api/v4/loans, except that it applies here for every caller, a company API key included.

integer
≥ 1

As on GET /api/v4/loans.

string
length ≤ 50

As on GET /api/v4/loans.

string
length ≤ 50

As on GET /api/v4/loans.

number
≥ 0

As on GET /api/v4/loans.

number
≥ 0

As on GET /api/v4/loans.

integer
≥ 1

As on GET /api/v4/loans.

subStatusId
array of integers
length ≤ 50

As on GET /api/v4/loans: one id or several, comma-separated.

subStatusId
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json