Skip to main content
Two endpoints let you retrieve your document portfolio. GET /v1/documents returns the full list of documents with their associated loan data. GET /v1/documents/stats gives you a fast aggregate count — total documents, how many carry a loan, and how many of those loans are behind schedule.

List documents

Returns all documents owned by your authenticated account. Documents are ordered by updatedAt descending, so the most recently modified document appears first. Each document includes its associated loan record if one exists.

Request headers

string
required
Bearer token obtained from your Clerk session. Example: Bearer eyJhbGc...

Response

object[]
required
Ordered list of document objects, newest first.

Example


Get document stats

Returns aggregate counts for your document portfolio. Use this endpoint to populate dashboard summary cards without loading the full document list.

Request headers

string
required
Bearer token obtained from your Clerk session.

Response

number
required
Total number of documents owned by your account.
number
required
Number of documents that have an associated loan record.
number
required
Number of documents whose loan has a status of "BEHIND". These are candidates for RCM outreach.

Example


Error cases