Skip to main content

API

Get Total Accrued Interest​

The response to this API call includes the sum of customer accrued interest (in cents) for a given period of time. You can restrict the total to a specific account, to all accounts owned by a customer, or to the intersection of both.

Note

This endpoint is available to organization and bank tokens. It is not available with a customer token (HTTP 403).

VerbGET
URLhttps://api.s.unit.sh/accrued-interest/total
Required Scopeaccounts
Timeout (Seconds)5

Query Parameters​

NameTypeDefaultDescription
filter[accountId]string(empty)Optional. Filters the results by the specified account id. Returns HTTP 404 if the account does not exist or is outside the token's scope.
filter[customerId]string(empty)Optional. Filters the results by the specified customer id. When provided, the total includes accrued interest for accounts owned by that customer. Combined with filter[accountId], only that account is included if the customer owns it. For a joint account, each co-owner's total includes the full account-level accrued interest. Returns HTTP 404 if the customer does not exist or is outside the token's scope. A customer in scope with no owned accounts returns a total of 0.
filter[since]RFC3339 Date string(empty)Optional. Filters the accrued interest after the specified date. e.g. 2024-01-13T16:01:19.346Z
filter[until]RFC3339 Date string(empty)Optional. Filters the account accrued interest before the specified date. e.g. 2024-05-06T16:01:00.123Z
filter[sinceInterestMonth]ISO8601 Year-Month string(empty)Optional. Filters the accrued interest after the specified month. e.g. 2024-03
filter[untilInterestMonth]ISO8601 Year-Month string(empty)Optional. Filters the accrued interest before the specified month. e.g. 2024-07
Note

Either a set of [since] & [until] OR a set of [sinceInterestMonth] & [untilInterestMonth] is required.

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataTotal Accrued InterestThe requested resource after the operation was completed.
curl -X GET 'https://api.s.unit.sh/accrued-interest/total' \
-H "Authorization: Bearer ${TOKEN}"