Borrowers

Get borrower analytics time series

Get analytics time series for a borrower. Returns daily cashflow, trailing sums, and debt metrics. Auto-detects loan start date from the first borrow event if startDate is not provided.

get/v3/borrowers/{id}/analytics

Request

  • Base URL: https://api.creditcoop.xyz
  • URL: https://api.creditcoop.xyz/v3/borrowers/{id}/analytics
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://clerk.creditcoop.xyz/oauth/authorize, token URL https://clerk.creditcoop.xyz/oauth/token)

Path parameters

idstring uuid required

Borrower organization ID

Query parameters

startDatestring date

Start date (YYYY-MM-DD). Defaults to auto-detected loan start.

endDatestring date

End date, inclusive (YYYY-MM-DD). Defaults to today.

trailingDaysstring

Comma-separated trailing periods in days (e.g. "14,30,120"). Max: 365. Defaults to org config or "30".

stagesstring

Comma-separated INTERNAL (on-chain) stage filter for cashflow (e.g. "secured,settled"). Valid values: in_transit, secured, settled. "external" is also accepted for backward compatibility but is ignored here — it does not error and does not affect the internal series; external-business cashflow is a separate series (see externalEntryType / cashFlowDailyExternal). Normally you do not need to specify this parameter. Defaults to org config or "secured".

direction'inflow' | 'net'

Internal (on-chain) cash flow direction. "inflow" counts only inflows. "net" computes net flow (inflows - outflows). Defaults to org config or "inflow".

externalEntryType'transfer' | 'daily_cashflow'

Which external-business source to display: "transfer" (individual transactions) or "daily_cashflow" (daily aggregates). Defaults to whichever source has data.

externalDirection'inflow' | 'net'

External-business cash flow direction, independent of the internal direction. Defaults to org config or "inflow".

expandstring[]

Comma-separated list of fields to expand. Valid values: "debt" (adds live on-chain debt state).

format'json' | 'csv'

Response format. "json" (default) or "csv" file download.

Response

Default Response

organizationIdstring uuid required
organizationNamestring required

Changes

No recorded changes to this operation across all 1 revision of this API.