Cosmic Module

O

Qubits of DPK

March 23, 2026

Core Open Source
Layer: Layer 9 — The App Shell
Auto-generated OpenAPI Java client for calling Fineract REST APIs. Generated from the OpenAPI spec using the OpenAPI Generator.
Contains: PostClientsRequest, PostLoansRequest, PostLoansResponse etc — all the typed models you used in your 4 PRs.

What This Module Is (Big Picture)

The client module provides a Java SDK that allows other systems to interact with Apache Fineract APIs.
Instead of manually sending HTTP requests to the Fineract server, developers can use this client library to:
  • call APIs
  • send requests
  • receive responses
  • integrate with other systems
This module simplifies integration between Fineract and external applications.

Layman Example

Imagine another system wants to create a client in Fineract.
Without the client module:
The developer must manually send an HTTP request.
Example:
plain text
QUBITS OF DPK
1POST /v1/clients
With JSON payload.
With the fineract-client module, the developer simply calls a Java method.
Example:
plain text
QUBITS OF DPK
1clientApi.createClient(requestObject);
The client library automatically handles:
  • HTTP requests
  • request serialization
  • response parsing

Where the Code Lives

The client module is typically used by external systems integrating with Fineract.

Key Package

org.apache.fineract.client
Responsibilities include:
  • API client definitions
  • request models
  • response models
  • API call abstractions

API Client Interfaces

The module defines interfaces representing Fineract APIs.
Examples include:
These interfaces map to the REST endpoints in the provider module.

Example Client API Interface

Example interface for client operations.
java
QUBITS OF DPK
1public interface ClientsApi {
2
3    ClientResponse createClient(ClientRequest request);
4
5    ClientResponse retrieveClient(Long clientId);
6
7}
This interface allows applications to interact with client APIs programmatically.

Example Client Request Object

Request objects represent API input.
Example:
java
QUBITS OF DPK
1public class ClientRequest {
2
3    private String firstname;
4    private String lastname;
5    private String mobileNo;
6
7}
This object is converted into a JSON request when sent to the server.

Example API Call

Example usage of the client library.
java
QUBITS OF DPK
1ClientsApi clientsApi = new ClientsApiClient();
2
3ClientRequest request = new ClientRequest();
4request.setFirstname("John");
5request.setLastname("Doe");
6
7clientsApi.createClient(request);
This call sends a request to the Fineract server.

HTTP Communication

Internally, the client module performs:
  1. #
    request serialization
  2. #
    HTTP request execution
  3. #
    response deserialization
Example communication flow:
java
QUBITS OF DPK
1External Application
2Call ClientsApi.createClient()
34Client Library
5Convert request to JSON
67HTTP Request
8POST /v1/clients
910Fineract Server
11Process request
1213HTTP Response
1415Client Library
16Convert JSON response to Java object

Response Models

Responses returned by the server are mapped to response objects.
Example:
java
QUBITS OF DPK
1public class ClientResponse {
2
3    private Long clientId;
4    private String status;
5
6}
This object represents the server response.

API Authentication

The client module supports authentication using:
  • API keys
  • basic authentication
  • OAuth tokens
Authentication headers are added automatically to requests.

Repository Layer

The client module does not interact with the database.
Instead it communicates with the Fineract server APIs.

Exceptions

These exceptions handle integration failures.

How It All Connects (Full Flow)

Example: External system creating a client
java
QUBITS OF DPK
1External Application
2Call clientApi.createClient()
34Fineract Client Library
5Convert request to HTTP call
67Fineract Server (provider module)
8Process client creation
910Database
1112Response returned to client library

Why This Module Matters

The client module allows:
  • external systems to integrate with Fineract
  • developers to build applications on top of Fineract
  • simplified API communication
It acts as an integration bridge between Fineract and external applications.

One-Sentence Summary

fineract-client is a Java SDK that allows external applications to interact with Apache Fineract APIs programmatically.