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
updatedAt descending, so the most recently modified document appears first. Each document includes its associated loan record if one exists.
Request headers
Bearer token obtained from your Clerk session. Example:
Bearer eyJhbGc...Response
Ordered list of document objects, newest first.
Example
Get document stats
Request headers
Bearer token obtained from your Clerk session.
Response
Total number of documents owned by your account.
Number of documents that have an associated loan record.
Number of documents whose loan has a status of
"BEHIND". These are candidates for RCM outreach.Example
Error cases
| Status | Error message | Cause |
|---|---|---|
401 | Missing Authorization Bearer token. | No Authorization header was sent. |
401 | Invalid or expired token. | The Bearer token is malformed or has expired. |
