Skip to content
API Reference

API Reference

KitaManager provides a REST API with interactive OpenAPI/Swagger documentation available at /swagger/index.html when running the application. All endpoints except login and token refresh require JWT authentication. Mutating requests (POST, PUT, DELETE) require a CSRF token via the X-CSRF-Token header.

Authentication

MethodEndpointDescription
POST/api/v1/loginAuthenticate and receive access + refresh tokens
POST/api/v1/refreshRefresh an expired access token
POST/api/v1/logoutInvalidate the current session
GET/api/v1/meGet the current user’s profile
PUT/api/v1/me/passwordChange the current user’s password

Login Example

curl -X POST http://localhost:8080/api/v1/login \
  -H "Content-Type: application/json" \
  -d '{"email": "admin@example.com", "password": "admin123"}'

Response:

{
  "token": "eyJhbGciOiJIUzI1NiIs..."
}

Using the Token

Include the token in the Authorization header for all subsequent requests:

curl http://localhost:8080/api/v1/organizations \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Organizations

MethodEndpointDescription
GET/api/v1/organizationsList organizations
POST/api/v1/organizationsCreate organization (superadmin)
GET/api/v1/organizations/{orgId}Get organization
PUT/api/v1/organizations/{orgId}Update organization
DELETE/api/v1/organizations/{orgId}Delete organization (superadmin)

Sections

All section endpoints are scoped to an organization: /api/v1/organizations/{orgId}/sections.

MethodEndpointDescription
GET.../sectionsList sections
POST.../sectionsCreate section
GET.../sections/{sectionId}Get section
PUT.../sections/{sectionId}Update section
DELETE.../sections/{sectionId}Delete section

Employees

All employee endpoints are scoped to an organization: /api/v1/organizations/{orgId}/employees.

MethodEndpointDescription
GET.../employeesList employees
POST.../employeesCreate employee
GET.../employees/{id}Get employee
PUT.../employees/{id}Update employee
DELETE.../employees/{id}Delete employee
GET.../employees/export/excelExport employees to Excel
GET.../employees/export/yamlExport employees to YAML
POST.../employees/importImport employees from YAML
GET.../employees/step-promotionsGet step promotion eligibility

Employee Contracts

Nested under an employee: .../employees/{id}/contracts.

MethodEndpointDescription
GET.../contractsList contracts
POST.../contractsCreate contract
GET.../contracts/currentGet current active contract
GET.../contracts/{contractId}Get contract
PUT.../contracts/{contractId}Update contract
DELETE.../contracts/{contractId}Delete contract

Children

All child endpoints are scoped to an organization: /api/v1/organizations/{orgId}/children.

MethodEndpointDescription
GET.../childrenList children
POST.../childrenCreate child
GET.../children/{id}Get child
PUT.../children/{id}Update child
DELETE.../children/{id}Delete child
GET.../children/export/excelExport children to Excel
GET.../children/export/yamlExport children to YAML
POST.../children/importImport children from YAML
GET.../children/attendanceOrg-wide attendance by date
GET.../children/attendance/summaryDaily attendance summary

Child Contracts

Nested under a child: .../children/{id}/contracts.

MethodEndpointDescription
GET.../contractsList contracts
POST.../contractsCreate contract
GET.../contracts/currentGet current active contract
GET.../contracts/{contractId}Get contract
PUT.../contracts/{contractId}Update contract
DELETE.../contracts/{contractId}Delete contract

Child Attendance

Nested under a child: .../children/{id}/attendance.

MethodEndpointDescription
POST.../attendanceCreate attendance record
GET.../attendanceList child’s attendance records
GET.../attendance/{attendanceId}Get attendance record
PUT.../attendance/{attendanceId}Update attendance record
DELETE.../attendance/{attendanceId}Delete attendance record

Government Funding Rates

Global resource managed by superadmins.

MethodEndpointDescription
GET/api/v1/government-funding-ratesList funding configurations
POST/api/v1/government-funding-ratesCreate funding configuration
GET/api/v1/government-funding-rates/{id}Get funding configuration
PUT/api/v1/government-funding-rates/{id}Update funding configuration
DELETE/api/v1/government-funding-rates/{id}Delete funding configuration
POST/api/v1/government-funding-rates/importImport funding rates from YAML

Funding Periods

Nested under a funding rate: .../government-funding-rates/{id}/periods.

MethodEndpointDescription
POST.../periodsCreate period
GET.../periods/{periodId}Get period
PUT.../periods/{periodId}Update period
DELETE.../periods/{periodId}Delete period

Funding Properties

Nested under a period: .../periods/{periodId}/properties.

MethodEndpointDescription
POST.../propertiesCreate property
GET.../properties/{propertyId}Get property
PUT.../properties/{propertyId}Update property
DELETE.../properties/{propertyId}Delete property

Government Funding Bills

Scoped to an organization: /api/v1/organizations/{orgId}/government-funding-bills.

MethodEndpointDescription
GET.../government-funding-billsList bills
POST.../government-funding-billsUpload ISBJ bill
GET.../government-funding-bills/{billId}Get bill
GET.../government-funding-bills/{billId}/compareCompare calculated vs. billed amounts
DELETE.../government-funding-bills/{billId}Delete bill

Pay Plans

Scoped to an organization: /api/v1/organizations/{orgId}/pay-plans.

MethodEndpointDescription
GET.../pay-plansList pay plans
POST.../pay-plansCreate pay plan
GET.../pay-plans/{id}Get pay plan
PUT.../pay-plans/{id}Update pay plan
DELETE.../pay-plans/{id}Delete pay plan
GET.../pay-plans/{id}/exportExport pay plan to YAML
POST.../pay-plans/importImport pay plan from YAML

Pay Plan Periods

Nested under a pay plan: .../pay-plans/{id}/periods.

MethodEndpointDescription
POST.../periodsCreate period
GET.../periods/{periodId}Get period
PUT.../periods/{periodId}Update period
DELETE.../periods/{periodId}Delete period

Pay Plan Entries

Nested under a period: .../periods/{periodId}/entries.

MethodEndpointDescription
POST.../entriesCreate entry
GET.../entries/{entryId}Get entry
PUT.../entries/{entryId}Update entry
DELETE.../entries/{entryId}Delete entry

Budget Items

Scoped to an organization: /api/v1/organizations/{orgId}/budget-items.

MethodEndpointDescription
GET.../budget-itemsList budget items
POST.../budget-itemsCreate budget item
GET.../budget-items/{id}Get budget item
PUT.../budget-items/{id}Update budget item
DELETE.../budget-items/{id}Delete budget item

Budget Item Entries

Nested under a budget item: .../budget-items/{id}/entries.

MethodEndpointDescription
GET.../entriesList entries
POST.../entriesCreate entry
GET.../entries/{entryId}Get entry
PUT.../entries/{entryId}Update entry
DELETE.../entries/{entryId}Delete entry

Statistics

Scoped to an organization: /api/v1/organizations/{orgId}/statistics. All statistics endpoints require from and to query parameters specifying a date range (format: YYYY-MM-DD).

MethodEndpointDescription
GET.../statistics/staffing-hoursStaffing hours summary
GET.../statistics/staffing-hours/employeesPer-employee staffing detail
GET.../statistics/financialsFinancial overview
GET.../statistics/occupancyOccupancy statistics
GET.../statistics/age-distributionAge distribution
GET.../statistics/contract-propertiesContract property distribution
GET.../statistics/fundingFunding statistics

Users

Global user management endpoints.

MethodEndpointDescription
GET/api/v1/usersList users
POST/api/v1/usersCreate user
GET/api/v1/users/{id}Get user
PUT/api/v1/users/{id}Update user
DELETE/api/v1/users/{id}Delete user
GET/api/v1/users/{id}/membershipsGet user’s organization memberships
POST/api/v1/users/{id}/organizationsAdd user to organization
PUT/api/v1/users/{id}/organizations/{orgId}Update user’s role in organization
DELETE/api/v1/users/{id}/organizations/{orgId}Remove user from organization
PUT/api/v1/users/{id}/passwordReset user’s password (admin)
PUT/api/v1/users/{id}/superadminSet superadmin status

Organization Users

MethodEndpointDescription
GET/api/v1/organizations/{orgId}/usersList users in an organization

Pagination

List endpoints support pagination via query parameters:

curl "http://localhost:8080/api/v1/organizations?page=1&limit=10" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Response:

{
  "data": [],
  "total": 100,
  "page": 1,
  "limit": 10
}

Error Responses

Errors are returned with the appropriate HTTP status code and a JSON body:

{
  "error": "Description of the error"
}
StatusMeaning
400Bad Request – Invalid input or missing required parameters
401Unauthorized – Missing or invalid authentication token
403Forbidden – Insufficient permissions for the requested action
404Not Found – The requested resource does not exist
500Internal Server Error – An unexpected error occurred