Spring API reference
Paths below are relative to the configured backend origin. Local development normally uses http://localhost:8080. Examples describe request shapes; they do not execute against the live system.
Resource searches
Each resource has its own search endpoint, including /parent/search, /student/search, /invoice/search, and the configuration resources' /search paths.
{
"page": 0,
"size": 25,
"sort": "name",
"order": "asc",
"filters": { "name": "Example" }
}
Paging is zero-based; search page size is 1–200. Field and sort allowlists are enforced per resource. Relationship filters use IDs. Invoice search also requires billingDate as an ISO date.
Invoice actions
| Method | Path | Result |
|---|---|---|
| GET | /invoice/view/{parentId}/{billingMonth} | Saved invoice mapped to the print payload |
| POST | /invoice/save-full-invoice | Save invoice and items |
| GET | /invoice/save/{parentId} | Generate one parent's invoice; this changes data |
| POST | /invoice/batch/generate-current-month?billingMonth=2026-11 | Run generation for the selected month |
| POST | /invoice/batch/retry-deliveries?limit=25 | Retry pending handoffs |
The current generation route also accepts GET for compatibility. Prefer POST for the operational generation action.
Ledger reads
GET /ledger/invoices accepts:
| Parameter | Values |
|---|---|
page, size | Zero-based page; size 1–100 |
billingMonth | Optional yyyy-MM |
parentId | Optional positive parent ID |
status | ALL, UNPAID, PARTIALLY_PAID, PAID, CANCELLED |
invoiceNo, phoneNo, parentName | Optional text filters |
sort, order | Allowed ledger field; asc or desc |
The response has content, totalElements, number, size, and summary. Summary amounts cover all matching invoices.
GET /ledger/invoices/{invoiceId} returns the invoice and payment history. GET /ledger/billing-months lists distinct stored months; the current ledger UI uses its original month input.
Record a payment
POST /ledger/invoices/123/payments
Content-Type: application/json
{
"requestId": "38ac4f55-5cf4-4ad3-a642-c3150a3b7f9d",
"amount": 40.00,
"paymentDate": "2026-11-15",
"method": "BANK_TRANSFER",
"reference": "EXAMPLE-TRANSFER",
"notes": "Partial payment"
}
A fresh action needs a fresh UUID. A retry of the same action must preserve its UUID and payload. Invalid amounts/dates return 400; conflicting details, cancelled invoices, and overpayments return 409.
POST /ledger/invoices/123/payments/456/void
Content-Type: application/json
{ "reason": "Recorded against the wrong invoice" }
Finance projections
GET /finance/dashboard?billingMonth=2026-11 returns selected-month invoice totals, payment-date receipts, people counts, a six-month trend, and bounded recent/outstanding data. The current projection screens use the aggregate fields and render no tables.
The frontend computes the clearly labeled forward estimate from completed historical months; the API does not store a forecast as money received.
GET /finance/transactions remains available as a read API with date range, parent ID, method, status, invoice, reference, paging, and sorting filters. It is not currently rendered as a table on Transaksi.
Parent lookups
Useful existing routes include /parent/list, /parent/get-by-phone/{phone}, and /parent/get-by-telegram/{telegramId}. Authentication and network policy must match the deployment; the presence of a frontend login does not by itself authenticate these HTTP routes.