Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.digiflecttech.dev/llms.txt

Use this file to discover all available pages before exploring further.

The Save App analytics API gives you programmatic access to the numbers that matter most: total group balances, pending approvals, per-member savings, financial period reports, individual credit scores, and a full audit trail of every admin action. Dashboard and report endpoints are restricted to admins; the summary endpoint is available to all authenticated users.

GET /api/analytics/dashboard

Returns high-level counts for the group. Requires an admin JWT.

Response

total_members
integer
Total number of users with the member role in the group.
active_members
integer
Number of members whose accounts are currently active (is_active = true).
total_balance
float
Current total balance of the group fund, in UGX.
pending_loans
integer
Number of loan requests currently in PENDING status awaiting admin approval.
pending_transactions
integer
Number of transactions currently in PENDING status awaiting admin approval.
pending_payouts
integer
Number of payouts currently in PENDING status awaiting execution.
curl --request GET \
  --url "https://api.saveapp.io/api/analytics/dashboard" \
  --header "Authorization: Bearer <admin_token>"
Sample response
{
  "total_members": 24,
  "active_members": 22,
  "total_balance": 12450000.0,
  "pending_loans": 3,
  "pending_transactions": 1,
  "pending_payouts": 0
}

GET /api/analytics/summary

Returns a personalised summary for the authenticated user. Available to all authenticated users — both admins and members.

Response

total_members
integer
Total number of members in the group.
active_members
integer
Number of currently active members.
total_balance
float
Current total balance of the group fund, in UGX.
personal_savings
float
The authenticated user’s total contribution amount (contribution_paid), in UGX.
pending_approvals_count
integer
Combined count of pending loans and pending transactions across the group.
group_name
string
Name of the savings group the authenticated user belongs to.
admin_name
string
Display name of the authenticated user making the request.
monthly_contributions
float
Sum of all approved contribution transactions for the current calendar month, in UGX.
interest_earned
float
Total interest amount accrued from loans in APPROVED, ACTIVE, or COMPLETED status, in UGX.
group_id
string | null
Unique identifier of the group, if available. May be null.
curl --request GET \
  --url "https://api.saveapp.io/api/analytics/summary" \
  --header "Authorization: Bearer <token>"
Sample response
{
  "total_members": 24,
  "active_members": 22,
  "total_balance": 12450000.0,
  "personal_savings": 750000.0,
  "pending_approvals_count": 4,
  "group_name": "Kampala Savers",
  "admin_name": "Aisha Nakato",
  "monthly_contributions": 480000.0,
  "interest_earned": 135000.0,
  "group_id": null
}

GET /api/analytics/reports

Returns a financial summary for a given date range. Requires an admin JWT.

Query parameters

startDate
integer
Start of the report period as a Unix millisecond timestamp. Defaults to 30 days before the current time if omitted.
endDate
integer
End of the report period as a Unix millisecond timestamp. Defaults to the current time if omitted.

Response

start_date
datetime
ISO 8601 datetime derived from the resolved startDate value.
end_date
datetime
ISO 8601 datetime derived from the resolved endDate value.
total_contributions
float
Sum of all approved contribution transactions within the period, in UGX.
total_payouts
float
Sum of all approved payouts executed within the period, in UGX.
total_loans
float
Sum of all approved, active, or completed loan principal amounts requested within the period, in UGX.
total_repayments
float
Sum of all loan repayment amounts recorded within the period, in UGX.
curl --request GET \
  --url "https://api.saveapp.io/api/analytics/reports?startDate=1704067200000&endDate=1706745600000" \
  --header "Authorization: Bearer <admin_token>"
Sample response
{
  "start_date": "2024-01-01T00:00:00",
  "end_date": "2024-02-01T00:00:00",
  "total_contributions": 2400000.0,
  "total_payouts": 600000.0,
  "total_loans": 900000.0,
  "total_repayments": 315000.0
}

GET /api/credit-scores/me

Returns the credit score record for the authenticated user. Available to all authenticated users.

Response

member_id
string
UUID of the member whose score is returned.
member_name
string
Display name of the member.
score
float
Current credit score. The scale runs from min_credit_score (default 300) to max_credit_score (default 850), with new members starting at starting_credit_score (default 500).
on_time_payments
integer
Number of contribution payments made on time.
late_payments
integer
Number of contribution payments made after the due date.
missed_payments
integer
Number of contribution payments that were missed entirely.
loans_repaid_on_time
integer
Number of loans fully repaid before or on the due date.
loans_repaid_late
integer
Number of loans repaid after the due date.
loans_defaulted
integer
Number of loans that defaulted without repayment.
cycles_participated
integer
Number of complete group cycles the member has participated in.
cycles_completed
integer
Number of cycles successfully completed by the member.
last_updated
datetime
ISO 8601 timestamp of the most recent score recalculation.

GET /api/audit-logs

Returns a paginated list of admin action records. Requires an admin JWT.

Query parameters

admin_id
string
Filter results to actions performed by a specific admin UUID.
entity_type
string
Filter by the type of entity that was acted on (e.g., "loan", "member", "config").
action
string
Filter by the action string (e.g., "approve", "reject", "update").
start_date
string
ISO 8601 datetime. Only return logs created at or after this time.
end_date
string
ISO 8601 datetime. Only return logs created at or before this time.
limit
integer
default:"100"
Maximum number of records to return. Upper bound is 500.
offset
integer
default:"0"
Zero-based index of the first record to return. Use with limit for pagination.

Response

Returns an array of AuditLogResponse objects, ordered by created_at descending.
id
string
UUID of the audit log entry.
admin_id
string
UUID of the admin who performed the action.
admin_name
string
Display name of the admin who performed the action.
action
string
String describing what was done (e.g., "approve", "reject", "update").
entity_type
string
The type of entity that was acted on (e.g., "loan", "member", "config").
entity_id
string
UUID of the entity that was acted on.
previous_value
string | null
JSON-serialised representation of the entity’s state before the action. May be null for creation events.
new_value
string | null
JSON-serialised representation of the entity’s state after the action. May be null for deletion events.
created_at
datetime
ISO 8601 timestamp of when the action was recorded.
curl --request GET \
  --url "https://api.saveapp.io/api/audit-logs?limit=50&offset=0" \
  --header "Authorization: Bearer <admin_token>"
Sample response
[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "admin_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "admin_name": "Aisha Nakato",
    "action": "approve",
    "entity_type": "loan",
    "entity_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "previous_value": "{\"status\": \"PENDING\"}",
    "new_value": "{\"status\": \"APPROVED\"}",
    "created_at": "2024-01-20T14:35:00Z"
  }
]