Musoni System REST API Reference (1.52.0)

Download OpenAPI specification:

Disclaimer

We are working towards documenting our APIs using the OpenAPI 3+ specification.

This documentation is BETA and subject to change.

Note: Older API documentation remains available from Legacy API Documentation for areas not covered in this OpenApi documentation.

Note: Usage of the API requires a user-specific api-key which can be requested via the Musoni Service Desk.

Musoni is a secure, multi-tenanted microfinance platform.

The goal of the Musoni API is to empower developers to build apps on top of the Musoni Platform.

The API is organized around REST and is designed to have:

  • predictable, resource-oriented URLs
  • to use HTTP response codes to indicate API errors
  • to use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients.

JSON is returned in all responses from the API, including errors.

Authentication

An API capability that allows applications to peform authentication with platform using username password credentials.

On success API will return details that support ability to call platform APIs using their supported security mechanism: HTTP Basic Authentication

Authenticate Credentials

Authenticates username password credentials.

If multi-factor authentication is enabled then a secondary security token will be requested once username, password are verified.

Authorizations:
(TenantIdentifierKeyMusoniApiKey)
query Parameters
username
string
Deprecated
Example: username=johnsmith

The username to authenticate with.

password
string
Deprecated
Example: password=myfav0uritePassw0rd

The password to use with username for authentication.

Request Body schema: application/json
optional
username
string

The username to authenticate with.

password
string

The password to authenticate with.

Responses

Request samples

Content type
application/json
{
  • "username": "johnsmith",
  • "password": "myfav0uritePassw0rd"
}

Response samples

Content type
application/json
{
  • "username": "johnsmith",
  • "userId": 1,
  • "base64EncodedAuthenticationKey": "vbnsdGVzdHVzZXItODIyaTN0OnRlc3R1cABC909877adfa=",
  • "authenticated": true,
  • "officeId": 1,
  • "officeName": "Head Office",
  • "staffId": 1,
  • "staffDisplayName": "John Smith",
  • "roles": [
    ],
  • "permissions": [
    ],
  • "shouldRenewPassword": false,
  • "renewPasswordOnNextLogin": false,
  • "isSelfServiceUser": false,
  • "clients": [
    ]
}

Multi-Factor Authentication

An API capability to support registration and use of multi-factor authentication (MFA) on users accounts.

Note: MFA cannot be enabled on Client Users (users where isSelfServiceUser = true)

Register for MFA

Registers the user account of user making request for MFA.

This involves auto generating a secret and proving a QR code back that end user can use to register with a device.

Note: MFA cannot be enabled on Client Users (users where isSelfServiceUser = true)

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "email": "johnsmith@example.com",
  • "username": "johnsmith",
  • "mfaSecret": "AAJ33I4IOUCAWGXNFPHVOFSWGTYI4UTZ",
  • "qrCodeImageDataUri": "string"
}

Validation MFA Registration

Validates a provided mfaToken against the users MFA setup.

Two successful validation requests with different mfaTokens are required in order to complete MFA registration.

Note: MFA cannot be enabled on Client Users (users where isSelfServiceUser = true)

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
mfaToken
required
string
Example: mfaToken=149087

The code provided by the device where mfa account was setup.

Typically configured to return a six digit pin but can be different.

Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "isValid": true,
  • "mfa": {
    }
}

Verify MFA Code

Validates a MFA code (mfaToken) against the users MFA setup.

Note: MFA cannot be enabled on Client Users (users where isSelfServiceUser = true)

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
mfaToken
required
string
Example: mfaToken=149087

The code provided by the device where mfa account was setup.

Typically configured to return a six digit pin but can be different.

Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "isValid": true,
  • "mfa": {
    }
}

Groups

Groups are used to provide a distinctive banking distribution channel used in microfinances throughout the world.
The Group is an administrative unit. It can contain as few as 5 people or as many as 40 depending on how its used.

Different styles of group lending

  • Joint-Liability Group
  • Grameen Model (Center-Group),
  • Self-Help Groups,
  • Village/Communal Banks

Groups - Search

List all Groups

See The Data Filter API for better approach for search/filter.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
paged
string

Defaults to false. If set to true then results will be paginated.

offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

search
string

Performs a partial matching search across the follow properties of Group to see if they contain the search term:

  • display_name
  • account_no
  • external_id
orderBy
string
Deprecated
Enum: "id" "external_id" "display_name"

Deprecated and not used. Use sortBy instead.

sortOrder
string
Deprecated

Deprecated and not used. Use sortBy instead.

sortBy
string

Expects a valid SQL fragment that used in order by section of SQL statement.

e.g.
g.account_no DESC
g.display_name DESC

officeId
integer

The id of an office. Used to restrict to the set of groups associated with this offices hierarchy (office + sub-offices).

underHierarchy
string
Example: underHierarchy=.14.

if provided only groups that exist on or under the office hierarchy provided will be returned.

This parameter overrides any data-scoping that is performed against the current users office hierarchy allowing the user to fetch groups not in their office hierarchy.

Note: Do not place single or double quotes around the value.

staffId
integer

The id of an staff (loanofficer). Used to restrict to the set of groups associated with the staff.

name
string

Use name of groups to restrict results using exact match.

externalId
string

Use externalId of groups to restrict results using exact match.

status
integer
Enum: 100 300 600 700
Example: status=100

Used to restrict the search to groups whoose status (code) matches the status code provided.

modifiedSinceTimestamp
integer
Example: modifiedSinceTimestamp=1634152729

Should be passed as a UNIX Timestamp.

When provided only groups that have been created or updated since the provided timestamp are returned.

Groups will be marked as modified whenever there is any modification to the group.

This parameter can be used in integrations to fetch changed data since a last fetch, timestamps will be treated as UTC and returned as UTC.

orphansOnly
string
Deprecated
Default: false

Deprecated. To be removed.

Set to true to list groups which are not associated to any center or parent group.

Center or parents groups are not support on musoni system applications.

sqlSearch
string
Deprecated

Deprecated. Use other parameters such as search or See The Data Filter API for better approach for search/filter.

Expects a valid SQL fragment that used in where section of SQL statement.

e.g.
display_name like '%K%'
g.account_no like '0033-%'

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Groups - Create

The supported schema for creating groups.

name, openingDate, parentId are required.
locale is required when dealing with numbers or dates
dateFormat is required when dealing with dates

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string

The name of the group.

officeId
required
integer <int64>

The id of the office that the group is associated with.

active
required
boolean

A boolean to indicate if this group should be created in active state. if true, activationDate needs to be supplied.

activationDate
string

The opening date in a date format supported by Joda Time.

submittedOnDate
string

The date this group application was submitted in a date format supported by Joda Time.

If provided when creating the group and the group is set to active, the submittedOnDate is set to be the same as the activationDate.

accountNo
string

A unique account no. which identifies this group.

If not provided on creation of the group, it is automatically generated based on the Account Number Format setup. (see Account Number Format and Configuration)

externalId
string

A place to put an external reference for this group e.g. The ID another system uses for it. If provided, it must be unique.

If not provided on creation of the group, it is automatically generated based on the Account Number Format setup. (see Account Number Format and Configuration)

clientMembers
Array of integers

An array of integers that represent client ids. The clients provided must exist in the same office as group office.

There is also configurable rules around the min and max number of clients that are allowed when forming a group from existing clients.

locale
string

The locale to use when interpreting number and date fields in the request.

dateFormat
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

Responses

Request samples

Content type
application/json
{
  • "name": "name",
  • "officeId": 1,
  • "active": false,
  • "activationDate": "01 July 2007",
  • "submittedOnDate": "01 July 2007",
  • "accountNo": "0001-0001",
  • "externalId": "ABC-0001",
  • "clientMembers": [
    ],
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Groups - Find one

Find a Group by Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
associations
string
Enum: "all" "clientMembers" "activeClientMembers" "groupRoles"
Example: associations=all

associated entity to be return

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Groups - Update

Update existing group

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

Request Body schema: application/json
required

Update existing group

name
required
string

The name of the group.

officeId
required
integer <int64>

The id of the office that the group is associated with.

active
required
boolean

A boolean to indicate if this group should be created in active state. if true, activationDate needs to be supplied.

activationDate
string

The opening date in a date format supported by Joda Time.

submittedOnDate
string

The date this group application was submitted in a date format supported by Joda Time.

If provided when creating the group and the group is set to active, the submittedOnDate is set to be the same as the activationDate.

accountNo
string

A unique account no. which identifies this group.

If not provided on creation of the group, it is automatically generated based on the Account Number Format setup. (see Account Number Format and Configuration)

externalId
string

A place to put an external reference for this group e.g. The ID another system uses for it. If provided, it must be unique.

If not provided on creation of the group, it is automatically generated based on the Account Number Format setup. (see Account Number Format and Configuration)

clientMembers
Array of integers

An array of integers that represent client ids. The clients provided must exist in the same office as group office.

There is also configurable rules around the min and max number of clients that are allowed when forming a group from existing clients.

locale
string

The locale to use when interpreting number and date fields in the request.

dateFormat
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

Responses

Request samples

Content type
application/json
{
  • "name": "name",
  • "officeId": 1,
  • "active": false,
  • "activationDate": "01 July 2007",
  • "submittedOnDate": "01 July 2007",
  • "accountNo": "0001-0001",
  • "externalId": "ABC-0001",
  • "clientMembers": [
    ],
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy"
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Groups - Delete

Delete existing group.

A group can be deleted if it is in pending state and has no associations - clients, loans or savings.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "commandId": 1,
  • "resourceId": 1
}

Groups - Activate

Groups can be created in a Pending state. This API exists to enable group activation.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
command
required
string
Default: "activate"
Example: command=activate

Command to activate group

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

activationDate
required
string

The date the groups was activated

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "activationDate": "01 July 2007"
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Groups - Associate Clients

This API allows to associate existing clients to a group that belong in same office.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
command
required
string
Default: "associateClients"
Example: command=associateClients

Command to associateClients with group

Request Body schema: application/json
required
clientMembers
required
Array of numbers <integer64> [ items <integer64 > ]

An array of client ids

Responses

Request samples

Content type
application/json
{
  • "clientMembers": [
    ]
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Groups - Disassociate Clients

This API allows to disassociate clients from a group.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
command
required
string
Default: "disassociateClients"
Example: command=disassociateClients

Command to disassociateClients from group

Request Body schema: application/json
required
clientMembers
required
Array of numbers <integer64> [ items <integer64 > ]

An array of client ids

Responses

Request samples

Content type
application/json
{
  • "clientMembers": [
    ]
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Groups - Assign Staff

Allows you to assign a staff member to an existing group.

Note: The selected staff member should be belong to the same office (or an office higher up in the hierarchy) as this group.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
command
required
string
Default: "assignStaff"
Example: command=assignStaff

Command to assignStaff with group

Request Body schema: application/json
required
staffId
required
integer <integer64>

The id of the staff member being assigned to the group

inheritStaffForClientAccounts
boolean

if true all members of the group (i.e all clients with active loans and savings ) will inherit the staffId

Responses

Request samples

Content type
application/json
{
  • "staffId": 0,
  • "inheritStaffForClientAccounts": true
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Groups - Unassign Staff

Allows you to unassign the staff member from the group.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
command
required
string
Default: "unassignStaff"
Example: command=unassignStaff

Command to unassign a staff with group

Request Body schema: application/json
required
staffId
required
integer <integer64>

The id of the staff member being unassigned

Responses

Request samples

Content type
application/json
{
  • "staffId": 1
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Groups - Assign Role

Allows you to assign a role to an existing member of a group.

Note: We can define the different roles applicable to group members by adding code values to the pre-defined system code GROUPROLE. e.g "Group leader"

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
command
required
string
Default: "assignRole"
Example: command=assignRole

Command to assign role against member of the group

Request Body schema: application/json
required
clientId
required
integer <integer64>

The id of the client member being assigned to a role

role
integer <integer64>

The id of the code value representing the group role. see GROUPROLE code.

Responses

Request samples

Content type
application/json
{
  • "clientId": 0,
  • "role": 0
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Groups - Update Role

Allows you to update the member role.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
command
required
string
Default: "updateRole"
Example: command=updateRole

Command to update role against member of the group

Request Body schema: application/json
required
clientId
required
integer <integer64>

The id of the client member being assigned to a role

role
integer <integer64>

The id of the code value representing the group role. see GROUPROLE code.

Responses

Request samples

Content type
application/json
{
  • "clientId": 0,
  • "role": 0
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Groups - Unassign Role

Allows you to unassign roles associated with group members.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
command
required
string
Default: "unassignRole"
Example: command=unassignRole

Command to unassign role

roldeId
required
integer <integer64>
Example: roldeId=567

Id of code value reprenting a GROUPROLE

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Groups - Transfer

Allows transfer of group to new office

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
command
required
string
Default: "transferGroup"
Example: command=transferGroup

Command to indicate transfer of group

Request Body schema: application/json
required
destinationOfficeId
required
integer <int64>

The id of the office this group is to be associated with after the transfer.

It cannot be the same officeId as the group has already.

Note: The user making the request must have visibility of the source and destination office.

staffId
integer <int64>

The id of the staff member you wish the group and/or client members to be associated with after the transfer.

Note: The staffId must belong to the destinationOfficeId.

Note: The user making the request must have visibility of the source and destination office.

note
string

A note related to the requested transfer.

Responses

Request samples

Content type
application/json
{
  • "destinationOfficeId": 1,
  • "staffId": 1,
  • "note": "description related to transfer."
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Groups - Close

This API exists to close a group.

Groups can be closed if they don't have any non-closed clients/loans/savingsAccounts.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

query Parameters
command
required
string
Default: "close"
Example: command=close

Command to close group

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

closureDate
required
string

The date the groups was closed

closureReasonId
integer <int64>

The id of one of the code values setup for the code named GroupClosureReason

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "closureDate": "01 July 2007",
  • "closureReasonId": 345
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Groups - Accounts Summary

Returns summary format of all loan, savings and share account information related this group

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a group.

Responses

Response samples

Content type
application/json
{
  • "memberLoanAccounts": [
    ],
  • "memberSavingsAccounts": [
    ],
  • "loanAccounts": [
    ],
  • "savingsAccounts": [
    ],
  • "shareAccounts": [
    ]
}

Clients

Clients are people and businesses that have applied (or may apply) to an MFI for loans.

Clients - Search

Ability to search and list clients using parameters provided.

See The Data Filter API for better approach to search/filter.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

search
string

Performs a partial matching search across the following properties of Client to see if they contain the search term:

  • account_no
  • external_id
  • firstname
  • middlename
  • lastname
  • display_name
  • Group display_name
orderBy
string
Enum: "id" "external_id" "display_name"

The SQL,Database name of the field

sortOrder
string

DESC or ASC

officeId
integer

The id of an office. Used to restrict to set of clients associated with the office.

staffId
integer

The id of a staff member. Used to restrict to set of clients associated with the staff member.

externalId
string

The externalId of a client. Used to restrict to set of clients where external id is like provided value. e.g. ABC-123% will find all clients that have externalId starting with ABC-123

displayName
string

The display name of a client. Used to restrict to set of clients where display name is like provided value. e.g. john will find all clients that have display name with text 'john'

firstname
string

The first name of a client. Used to restrict to set of clients where first name is like provided value. e.g. john will find all clients that have first name with text 'john'

lastname
string

The last name of a client. Used to restrict to set of clients where last name is like provided value. e.g. smith will find all clients that have last name with text 'smith'

hierarchy
string

The textual representation of the office hierarchy of a client.

Used to restrict to set of clients where their office hierarchy is like provided value. e.g. '.2' will find all clients that have hierarchy starting with '.2'

modifiedSinceTimestamp
integer
Example: modifiedSinceTimestamp=1634152729

Should be passed as a UNIX Timestamp.

When provided only clients that have been created or updated since the provided timestamp are returned.

Clients will be marked as modified whenever there is any modification to the client.

This parameter can be used in integrations to fetch changed data since a last fetch, timestamps will be treated as UTC and returned as UTC.

orphansOnly
boolean
Default: false

Use orphansOnly as true to list clients which are not associated to any group/parent.

sqlSearch
string
Deprecated

Deprecated. Use other parameters such as search or See The Data Filter API for better approach for search/filter.

A valid sql fragment that will work with backend query for this api.

If staffInOfficeHierarchy is false, and when supplied it will be used in the backend SQL Query where clause to restrict set of staff return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Clients - Create

The supported schema for creating a new client.

officeId is mandatory when creating a client
fullname or any of firstname, middlename, lastname must be provided as name for client
active must be provided when creating a client, if true its possible client creation will fail if it is a member of a group and breaks group rules.
dateFormat and locale are required even with no date fields at present. \

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
officeId
required
integer <int64>

The id of the office this client is associated with.

firstname
string

Facility to break up name into parts suitable for humans.

middlename
string

Facility to break up name into parts suitable for humans.

lastname
string

Facility to break up name into parts suitable for humans.

fullname
string

Facility to set name of a client or business that doesn't suit the firstname,middlename,lastname structure.

locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

active
required
boolean
Default: false

Indicates if this client should be created in active state on creation (status=300). If false, the client is created in a pending state (status=100).

Defaults to false if omitted.

activationDate
string

The date the client account was activated.
This is only used when active is true and the account goes straight into active state on creation.
It must be provided in a date format supported by Joda Time and described by dateFormat parameter.

groupId
integer <int64>

The id of the group this client is associated with.

staffId
integer <int64>

The id of the staff member dealing with the client office.
The staff member is not specifically the loan officer.

isStaff
boolean

Indicates if this client is a staff member also.

genderId
integer <int64>

The id of the code value related to the code gender (see Code and Code Values)

clientTypeId
integer <int64>

The id of the code value related to the code ClientType (see Code and Code Values)

clientClassificationId
integer <int64>

The id of the code value related to the code ClientClassification (see Code and Code Values)

savingsProductId
integer <int64>

The id of the default overdraft savings account product this client is associated with.

legalFormId
integer
Enum: 1 2

An integer representing the legal form of the client. 1 for Person, 2 for Entity If provided and set to 2 (for Entity) then

tagIds
Array of strings

Tags are a way of classifying a client (see Tags for more details.)

accountNo
string

If provided, its value is set as account no. for client account. Otherwise an auto generated account no. is put in place based on the configured strategy. (see Configuration: Account Number Format)

If provided, it must be unique.

externalId
string

A place to put an external reference for this resource e.g. The ID another system uses for it. If provided, it must be unique.

dateOfBirth
string

The clients date of birth in a date format supported by Joda Time.

mobileNo
string

Contact Details: The mobile telephone number of staff member. If provided it must be unique. This mobile number maybe be used by SMS or Mobile Money functionality.

mobileNoSecondary
string

Contact Details; The secondary mobile telephone number of staff member.

emailAddress
string

Contact Details; The clients email address

submittedOnDate
string

The date the client application was submitted.
If not provided, this date will default to the systems today date.
It must be provided in a date format supported by Joda Time and described by dateFormat parameter.

object (ClientNonPersonRequestModel)

Business client related fields that are used when a client is created with legalFormId=2

Array of objects

Responses

Request samples

Content type
application/json
{
  • "officeId": 1,
  • "firstname": "John",
  • "middlename": "John",
  • "lastname": "Doe",
  • "fullname": "James Michael Patrick Anderson or ElectricBikes Ltd.",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "active": false,
  • "activationDate": "01 July 2007",
  • "groupId": 1,
  • "staffId": 1,
  • "isStaff": false,
  • "genderId": 218,
  • "clientTypeId": 0,
  • "clientClassificationId": 0,
  • "savingsProductId": 1,
  • "legalFormId": 1,
  • "tagIds": [
    ],
  • "accountNo": "000-0001",
  • "externalId": "CLIENT-0001",
  • "dateOfBirth": "01 July 1970",
  • "mobileNo": "+353 78 90987877",
  • "mobileNoSecondary": "+353 78 90987000",
  • "emailAddress": "testmeout@musoni.eu",
  • "submittedOnDate": "01 July 2007",
  • "clientNonPersonDetails": {
    },
  • "address": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Find One

Find a client by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
template
boolean
Default: false
Example: template=false

if true, returns all active staff in office hierarchy that are above the provided officeId.

staffInSelectedOfficeOnly
boolean
Default: false
Example: staffInSelectedOfficeOnly=false

'Only relevant if template is true.

If true, returns all active staff in office hierarchy associated with this client.'

associations
string
Enum: "all" "clientGuarantees" "identifiers"

Indications what additional details to bring back from areas associated with client

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Clients - Update

The supported schema for updating a new client.

dateFormat and locale are required even with no date fields at present. \

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

Request Body schema: application/json
required
officeId
required
integer <int64>

The id of the office this client is associated with.

firstname
string

Facility to break up name into parts suitable for humans.

middlename
string

Facility to break up name into parts suitable for humans.

lastname
string

Facility to break up name into parts suitable for humans.

fullname
string

Facility to set name of a client or business that doesn't suit the firstname,middlename,lastname structure.

locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

active
required
boolean
Default: false

Indicates if this client should be created in active state on creation (status=300). If false, the client is created in a pending state (status=100).

Defaults to false if omitted.

activationDate
string

The date the client account was activated.
This is only used when active is true and the account goes straight into active state on creation.
It must be provided in a date format supported by Joda Time and described by dateFormat parameter.

groupId
integer <int64>

The id of the group this client is associated with.

staffId
integer <int64>

The id of the staff member dealing with the client office.
The staff member is not specifically the loan officer.

isStaff
boolean

Indicates if this client is a staff member also.

genderId
integer <int64>

The id of the code value related to the code gender (see Code and Code Values)

clientTypeId
integer <int64>

The id of the code value related to the code ClientType (see Code and Code Values)

clientClassificationId
integer <int64>

The id of the code value related to the code ClientClassification (see Code and Code Values)

savingsProductId
integer <int64>

The id of the default overdraft savings account product this client is associated with.

legalFormId
integer
Enum: 1 2

An integer representing the legal form of the client. 1 for Person, 2 for Entity If provided and set to 2 (for Entity) then

tagIds
Array of strings

Tags are a way of classifying a client (see Tags for more details.)

accountNo
string

If provided, its value is set as account no. for client account. Otherwise an auto generated account no. is put in place based on the configured strategy. (see Configuration: Account Number Format)

If provided, it must be unique.

externalId
string

A place to put an external reference for this resource e.g. The ID another system uses for it. If provided, it must be unique.

dateOfBirth
string

The clients date of birth in a date format supported by Joda Time.

mobileNo
string

Contact Details: The mobile telephone number of staff member. If provided it must be unique. This mobile number maybe be used by SMS or Mobile Money functionality.

mobileNoSecondary
string

Contact Details; The secondary mobile telephone number of staff member.

emailAddress
string

Contact Details; The clients email address

submittedOnDate
string

The date the client application was submitted.
If not provided, this date will default to the systems today date.
It must be provided in a date format supported by Joda Time and described by dateFormat parameter.

object (ClientNonPersonRequestModel)

Business client related fields that are used when a client is created with legalFormId=2

Array of objects

Responses

Request samples

Content type
application/json
{
  • "officeId": 1,
  • "firstname": "John",
  • "middlename": "John",
  • "lastname": "Doe",
  • "fullname": "James Michael Patrick Anderson or ElectricBikes Ltd.",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "active": false,
  • "activationDate": "01 July 2007",
  • "groupId": 1,
  • "staffId": 1,
  • "isStaff": false,
  • "genderId": 218,
  • "clientTypeId": 0,
  • "clientClassificationId": 0,
  • "savingsProductId": 1,
  • "legalFormId": 1,
  • "tagIds": [
    ],
  • "accountNo": "000-0001",
  • "externalId": "CLIENT-0001",
  • "dateOfBirth": "01 July 1970",
  • "mobileNo": "+353 78 90987877",
  • "mobileNoSecondary": "+353 78 90987000",
  • "emailAddress": "testmeout@musoni.eu",
  • "submittedOnDate": "01 July 2007",
  • "clientNonPersonDetails": {
    },
  • "address": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Delete

Performs soft delete of client

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Transfer

Allows transfer of client to new office or group or both.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "proposeAndAcceptTransfer"
Example: command=proposeAndAcceptTransfer

Command to indicate transfer of client

Request Body schema: application/json
required
destinationOfficeId
required
integer <int64>

The id of the office this client is to be associated with after the transfer.

It can be the same officeId as the client has in which case this transfer will not be an office transfer but a group transfer to group in same office.

Note: The user making the request must have visibility of the source and destination office.

destinationGroupId
integer <int64>

The id of the group this client is to be associated with after the transfer.

Optional but if this transfer is not to another branch, then this becomes required.

Note: The destinationGroupId must belong to the destinationOfficeId.

Note: The user making the request must have visibility of the source and destination office.

staffId
integer <int64>

The id of the staff member you wish the client and/or group to be associated with after the transfer.

Note: The staffId must belong to the destinationOfficeId.

Note: The user making the request must have visibility of the source and destination office.

note
string

A note related to the requested transfer.

Responses

Request samples

Content type
application/json
{
  • "destinationOfficeId": 1,
  • "destinationGroupId": 1,
  • "staffId": 1,
  • "note": "description related to transfer."
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Clients - Activate

Clients can be created in a Pending state. This API exists to enable client activation (for when a client becomes an approved member of the financial Institution).

If the client happens to be already active this API will result in an error.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "activate"
Example: command=activate

Command to indicate activation of client

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

activationDate
required
string

The date the client is activated on

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "activationDate": "01 July 2007"
}

Response samples

Content type
application/json
{
  • "commandId": 400,
  • "resourceId": 12,
  • "rollbackTransaction": false
}

Clients - Reject

Rejects a pending client application

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "reject"
Example: command=reject

Command to reject client application

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

rejectionDate
required
string

The date the client application is rejected

rejectionReasonId
integer <int64>

The id of one of the code values setup for the code named ClientRejectReason

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "rejectionDate": "01 July 2007",
  • "rejectionReasonId": 345
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Undo Reject

Reverts the client application from rejected state back to pending

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "undoRejection"
Example: command=undoRejection

Command to undo the reject of a client application

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

reopenedDate
required
string

The date the client application was re-opened

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "reopenedDate": "01 July 2007"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Withdraw

Used when a client withdraws from a pending client application

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "withdraw"
Example: command=withdraw

Command to withdraw client application

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

withdrawalDate
required
string

The date the client withdraws from application

withdrawalReasonId
integer <int64>

The id of one of the code values setup for the code named ClientWithdrawReason

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "withdrawalDate": "01 July 2007",
  • "withdrawalReasonId": 146
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Undo Withdraw

Reverts the client application from withdrawn state back to pending

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "undoWithdrawal"
Example: command=undoWithdrawal

Command to undo the withdraw of a client application

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

reopenedDate
required
string

The date the client application was re-opened

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "reopenedDate": "01 July 2007"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Update Savings Account

Allows you to modify or assign a default savings account for an existing Client.

The selected savings account should be one among the existing savings account for a particular customer.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "updateSavingsAccount"
Example: command=updateSavingsAccount

Command to update savings account

Request Body schema: application/json
required
savingsAccountId
integer <int64>

The id of a savings account belonging to this client that is to be used as the default savings account

Responses

Request samples

Content type
application/json
{
  • "savingsAccountId": 3
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Assign Staff

Allows you to assign a Staff for existed Client.

The selected Staff should belong to the same office (or an officer higher up in the hierarchy) as the Client he manages.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "assignStaff"
Example: command=assignStaff

Command to assign staff against client

Request Body schema: application/json
required
staffId
required
integer <int64>

The id of the staff member to be assigned to this client

Responses

Request samples

Content type
application/json
{
  • "staffId": 146
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Unassign Staff

Allows you to unassign the staff currently assigned to this client.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "unassignStaff"
Example: command=unassignStaff

Command to unassign staff

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Close

Clients can be closed if they do not have any non-closed loans/savingsAccount.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "close"
Example: command=close

Command to close client account

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

closureDate
required
string

The date the client account is closed

closureReasonId
integer <int64>

The id of one of the code values setup for the code named ClientClosureReason

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "closureDate": "01 July 2007",
  • "closureReasonId": 876
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Reactivate

Clients can be reactivated after they have been closed.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
command
required
string
Default: "reactivate"
Example: command=reactivate

Command to close client account

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

reactivationDate
required
string

The date the client account is re-activated

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "reactivationDate": "01 July 2007"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Clients - Accounts Summary

Returns summary format of all loan, savings and share account information related this client

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

Responses

Response samples

Content type
application/json
{
  • "loanAccounts": [
    ],
  • "savingsAccounts": [
    ],
  • "shareAccounts": [
    ]
}

Client Charges

It is typical for MFI's to directly associate charges with an implicit Client account. These can be either fees or penalties.

Client Charges are client specific instances of Charges and payment or waive of these charges results in client transactions.

Client Charges - Search

Used to search and list all client charges

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

chargeStatus
string
Enum: "all" "active" "inactive"

A string value of the charge status. Used to restrict results to client charges by status.

pendingPayment
boolean

A boolean value that is used to search for charges that are pending or not

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 26,
  • "pageItems": [
    ]
}

Client Charges - Add

Used to add new charge against client

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

chargeId
required
integer <integer64>

The id of an existing charge definition.

amount
number <decimal>

The charge amount. Providing this will override its property as on charge definition.

The amount is interpreted as a percentage or monetary amount based on the definition of the associated charge definition.

Used in combination with chargeCalculationType parameter of selected charge. e.g 1 % of Amount or 3.50 Flat

dueDate
string

The date the client charge is due on

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "chargeId": 1,
  • "amount": 5.5,
  • "dueDate": "01 July 2007"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Client Charges - Find One

Used to return details of a single client charge

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

chargeId
required
integer <int64>
Example: 777

The unique identifer of a client charge.

Responses

Response samples

Content type
application/json
{
  • "id": 800,
  • "clientId": 1001,
  • "chargeId": 56,
  • "name": null,
  • "chargeTimeType": {
    },
  • "chargeCalculationType": {
    },
  • "currency": {
    },
  • "dueDate": [
    ],
  • "amount": 250,
  • "amountPaid": 100,
  • "amountWaived": 50,
  • "amountWrittenOff": 0,
  • "amountOutstanding": 0,
  • "penalty": false,
  • "isActive": false,
  • "isPaid": false,
  • "isWaived": false
}

Client Charges - Delete

Delete a client charge

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

chargeId
required
integer <int64>
Example: 777

The unique identifer of a client charge.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1
}

Client Charges - Waive

Used to waive a portion or all of the charge

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

chargeId
required
integer <int64>
Example: 777

The unique identifer of a client charge.

query Parameters
command
required
string
Default: "waive"
Example: command=waive

Command to waive charge

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Client Charges - Pay

Used to pay a portion or all of the charge

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

chargeId
required
integer <int64>
Example: 777

The unique identifer of a client charge.

query Parameters
command
required
string
Default: "pay"
Example: command=pay

Command to waive charge

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Client Transactions

Client Transactions refer to transactions made directly againt a Client's internal account.

Currently, these transactions are only created as a result of charge payments/waivers.

You are allowed to undo a transaction, however you cannot explicitly create one.

Client Transactions - Search

Used to search and list all client transactions

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 26,
  • "pageItems": [
    ]
}

Client Transactions - Find One

Used to return details of a single client transaction

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

clientTrxnId
required
integer <int64>
Example: 1098

The unique identifer of a client transaction.

Responses

Response samples

Content type
application/json
{
  • "id": 4709,
  • "officeId": true,
  • "officeName": "Head Office",
  • "type": {
    },
  • "currency": {
    },
  • "date": [
    ],
  • "submittedOnDate": [
    ],
  • "amount": 250,
  • "reversed": false
}

Client Transactions - Undo

Allows the undo / reversal of client transaction

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

clientTrxnId
required
integer <int64>
Example: 1098

The unique identifer of a client transaction.

query Parameters
command
required
string
Default: "undo"
Example: command=undo

Command to undo the client transaction

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Client Identifiers

Client Identifiers refer to documents that are used to uniquely identify a customer e.g. Drivers License, Passport, Ration card etc

List Client Identifiers

List all identifiers belonging to client.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add Client Identifier to Client

Creates a new client identifier and associates it with the client.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

Request Body schema: application/json
required
identifierTypeId
integer <integer64>

The id of an existing Client Identifer Type.

documentKey
string [ 1 .. 50 ] characters

A value that together with the identifierTypeId provides a unique indentifier.

description
string [ 1 .. 500 ] characters

A description of identifier type.

status
string
Enum: "Active" "Inactive"

A status of this identifier.

Responses

Request samples

Content type
application/json
{
  • "identifierTypeId": 23,
  • "documentKey": "Passport",
  • "description": "Passport identity",
  • "status": "Active"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find Client Identifier By Id

Find Client Identifier By Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

identifierId
required
integer <int64>
Example: 1

The unique identifer of a client identifier.

Responses

Response samples

Content type
application/json
{
  • "id": 23,
  • "clientId": 23,
  • "identifierType": {
    },
  • "documentKey": "0001-000ABC",
  • "description": "Passport identity",
  • "status": "clientIdentifierStatus.active",
  • "validationPolicyExpression": "^.{1,12}$",
  • "validationPolicyCode": "national_id_countryname_validator"
}

Update an existing Client Identifier

Update an existing Client Identifier

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

identifierId
required
integer <int64>
Example: 1

The unique identifer of a client identifier.

Request Body schema: application/json
required

Update an existing Client Identifier

identifierTypeId
integer <integer64>

The id of an existing Client Identifer Type.

documentKey
string [ 1 .. 50 ] characters

A value that together with the identifierTypeId provides a unique indentifier.

description
string [ 1 .. 500 ] characters

A description of identifier type.

status
string
Enum: "Active" "Inactive"

A status of this identifier.

Responses

Request samples

Content type
application/json
{
  • "identifierTypeId": 23,
  • "documentKey": "Passport",
  • "description": "Passport identity",
  • "status": "Active"
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Delete an existing Client Identifier

Delete an existing Client Identifier

The deletion is a hard delete removing the client identifer entry and association with client.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

identifierId
required
integer <int64>
Example: 1

The unique identifer of a client identifier.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1
}

Client Identifier Validation Policy

List Validation Polices

List all validation polices.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Validation Policy

Creates new validation policy.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
expressionValue
required
string [ 1 .. 255 ] characters

A regular expression that is used as validation policy.

validationType
required
string [ 1 .. 255 ] characters

A unique name or code associated with this validation policy.

description
required
string [ 1 .. 255 ] characters

A description of what the regex validates.

Responses

Request samples

Content type
application/json
{
  • "expressionValue": "^.{1,12}$",
  • "validationType": "national_id_countryname_validator",
  • "description": "1 character and not more that 12 characters long."
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find Validation Policy By Id

Find Validation Policy By Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client identifier validation policy.

Responses

Response samples

Content type
application/json
{
  • "id": 23,
  • "regex": "^.{1,12}$",
  • "description": "1 character and not more that 12 characters long.",
  • "code": "national_id_countryname_validator"
}

Update an existing Validation Policy

Update an existing Validation Policy

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client identifier validation policy.

Request Body schema: application/json
required

Update existing validation policy

expressionValue
string [ 1 .. 255 ] characters

A regular expression that is used as validation policy.

validationType
string [ 1 .. 255 ] characters

A unique name or code associated with this valiation policy.

description
string [ 1 .. 255 ] characters

A description of what the regex validates.

Responses

Request samples

Content type
application/json
{
  • "expressionValue": "^.{1,12}$",
  • "validationType": "national_id_countryname_validator",
  • "description": "1 character and not more that 12 characters long."
}

Response samples

Content type
application/json
{
  • "resourceId": 1
}

Delete an existing Validation Policy

Delete an existing Validation Policy

The deletion is a hard delete fully removing the entry.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client identifier validation policy.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1
}

Client Identifier Type

List Client Identifier Types

List all client identifier types.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Client Identifier Type

Creates new client identifier type.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
string [ 1 .. 100 ] characters

A unique name that identifies the type of identity this represents.

description
string [ 1 .. 500 ] characters

A description of identifier type.

validationPolicy
integer <integer64>

Unique id representing the validation policy.

deleted
boolean

Indicates if identifier type is deleted

mandatory
boolean

Indicates if identifier type is mandatory

default
boolean

Indicates if identifier type is default

Responses

Request samples

Content type
application/json
{
  • "name": "Passport",
  • "description": "Passport identity",
  • "validationPolicy": 23,
  • "deleted": false,
  • "mandatory": false,
  • "default": false
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find Client Identifier Type By Id

Find Client Identifier Type By Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client identifier type.

Responses

Response samples

Content type
application/json
{
  • "id": 23,
  • "name": "Passport",
  • "description": "Passport identity",
  • "validationPolicy": {
    },
  • "deleted": false,
  • "mandatory": false,
  • "default": false
}

Update an existing Client Identifier Type

Update an existing Client Identifier Type

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client identifier type.

Request Body schema: application/json
required

Update existing Client Identifier Type

name
string [ 1 .. 100 ] characters

A unique name that identifies the type of identity this represents.

description
string [ 1 .. 500 ] characters

A description of identifier type.

validationPolicy
integer <integer64>

Unique id representing the validation policy.

mandatory
boolean

Indicates if identifier type is mandatory

default
boolean

Indicates if identifier type is default

Responses

Request samples

Content type
application/json
{
  • "name": "Passport",
  • "description": "Passport identity",
  • "validationPolicy": 23,
  • "mandatory": false,
  • "default": false
}

Response samples

Content type
application/json
{
  • "resourceId": 1
}

Delete an existing Client Identifier Type

Delete an existing Client Identifier Type

The deletion is a soft delete marking the entry as deleted.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client identifier type.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1
}

Blacklist

Blacklisting enables the ability to blacklist a client using different client identifiers e.g (National ID number).

The system will then block the creation of any client, savings account or loan account where any of these identifers are used.

List Blacklist Entries

List all blacklist entries.

A blacklist entry is made up of documentType and documentKey.

The documentType relates to a Client Identifier Type setup and the documentKey is the value of it e.g. National ID and National ID number or Passport and Passport number.

The blacklist is used by account creation and approval APIs to verify the related client or account is not blacklisted.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

orderBy
string

Expects a valid SQL fragment that is used in order by section of SQL statement.

e.g.
bl.document_type_id
bl.document_key

sortOrder
string
Enum: "ASC" "DESC"

Used with orderyBy to sort the results in the specified direction.

If orderyBy is not provided this parameter is ignored.

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 52,
  • "pageItems": [
    ]
}

Create new Blacklist entry

Adds an new entry to blacklist.

A blacklist entry is made up of documentTypeId and documentKey.

The documentTypeId relates to a Client Identifier Type setup and the documentKey is the value of it e.g. National ID and National ID number or Passport and Passport number.

The blacklist is used by account creation and approval APIs to verify the related client or account is not blacklisted.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
documentTypeId
required
integer <int64>

The id of the client identifier type being used.

documentKey
required
string [ 1 .. 50 ] characters

A value associated with the documentTypeId selected.

The system will use this documentTypeId, documentKey pair when assessing if any accounts should be blocked.

note
string [ 1 .. 500 ] characters

A more detailed note or description in relation to this blacklist entry.

submittedOnDate
string

The date this blacklist entry was submitted in a date format supported by Joda Time.

If omitted when creating the blacklist entry, the date defaults to todays date.

locale
string

The locale to use when interpreting number and date fields in the request.

dateFormat
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

Responses

Request samples

Content type
application/json
{
  • "documentTypeId": 10,
  • "documentKey": "ABC-09878",
  • "note": "Blacklisted due to loan default.",
  • "submittedOnDate": "01 July 2007",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find a Blacklist entry by Id

Find a Blacklist entry by Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a blacklist entry.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update an existing blacklist entry

Update an existing blacklist entry.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a blacklist entry.

Request Body schema: application/json
required

Update existing blacklist entry

documentTypeId
integer <int64>

The id of the client identifier type being used.

documentKey
string [ 1 .. 50 ] characters

A value associated with the documentTypeId selected.

The system will use this documentTypeId, documentKey pair when assessing if any accounts should be blocked.

note
string [ 1 .. 500 ] characters

A more detailed note or description in relation to this blacklist entry.

Responses

Request samples

Content type
application/json
{
  • "documentTypeId": 10,
  • "documentKey": "ABC-09878",
  • "note": "Blacklisted due to loan default."
}

Response samples

Content type
application/json
{
  • "resourceId": 1
}

Delete an existing blacklist entry

Delete an existing blacklist entry.

The deletion is a soft delete, marking the entry as not active.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a blacklist entry.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1
}

Blacklist A Client

Blacklist an existing Client.

The process takes the Client Identifier Types associated with the existing client and adds them to the blacklist.

This has the effect of blacklisting the client.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
clientId
required
integer <int64>
Example: 1

The unique identifer of a client.

Responses

Response samples

Content type
application/json
{
  • "clientId": 1
}

Credit Bureaus

The creditbureaus api allows access to creditbureau data stored in Musoni through pre-integrated CRB providers.

List Credit Bureaus

List all Credit Bureaus

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
creditbureauIdentifier
string

looks up a creditbureau by identifier, eg mcix/metropol etc.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Find Credit Bureau by Id

Find Credit Bureau member by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of the selected resource.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List Reference Requests for a credit bureau

List Credit reference requests for Credit bureau, without parameters will only return 200 results. This endpoint will return all requests, including failed requests

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
bureauId
required
integer <int64>

The ID of the credit bureau

query Parameters
clientId
string

Looks up credit reference requests for a specific clientId

loanId
string

Looks up credit reference requests for a specific loanId

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Find Credit Reference request by Id

Find Reference request by Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
bureauId
required
integer <int64>
Example: 1

The id of the bureau being used

referenceRequestId
required
integer <int64>
Example: 1

The unique identifer of the selected resource.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List Reference Responses for a credit bureau

List succesfully completed Credit reference responses for Credit bureau, without parameters will only return 200 results. This endpoint will not return any failed requests

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
bureauId
required
integer <int64>

The ID of the credit bureau

query Parameters
clientId
string

Looks up credit reference requests for a specific clientId

loanId
string

Looks up credit reference requests for a specific loanId

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Client Addresses

Client Addresses is an optional module that can be configured to be used with clients.

In order to activate Clients Address module, we need to enable the global configuration setting enable-address by setting its value to true.

Client Addresses - Search

Used to search and list all client addresses

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
addressTypeId
integer

The id of a code value that represents a address type. Used to restrict results to client addresses of this type.

status
boolean

A boolean value that is used to search for active or inactive client addresses

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Client Addresses - Create

Creates a new client address.

Note: Client address uses the Field Configuration feature which supports the ability to enable or disable fields on the address and to indicate which fields are mandatory and which are not.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
type
required
integer

The id of a code value that represents a address type.

Request Body schema: application/json
required
street
string <= 100 characters

Part of the address fields. Can be used to capture street name of address

addressLine1
string <= 100 characters

Part of the address fields. Can be used to capture portion of address

addressLine2
string <= 100 characters

Part of the address fields. Can be used to capture portion of address

addressLine3
string <= 100 characters

Part of the address fields. Can be used to capture portion of address

townVillage
string <= 100 characters

Part of the address fields. Can be used to capture town of address

countyDistrict
string <= 100 characters

Part of the address fields. Can be used to capture county or district of address

city
string <= 100 characters

Part of the address fields. Can be used to capture city of address

stateProvinceId
integer <integer64>

The id of the code value related to the code state (see Code and Code Values)

countryId
integer <integer64>

The id of the code value related to the code country (see Code and Code Values)

postalCode
string <= 10 characters

Part of the address fields. Can be used to capture postcode of address

latitude
number <decimal>

Part of the address fields. Can be used to latitude portion of lat-long coordinate

longitude
number <decimal>

Part of the address fields. Can be used to longitude portion of lat-long coordinate

Responses

Request samples

Content type
application/json
{
  • "street": "Rue des Irlandais",
  • "addressLine1": "Somewhere",
  • "addressLine2": "over",
  • "addressLine3": "the rainbow",
  • "townVillage": "Smalltown",
  • "countyDistrict": "Co. Dublin",
  • "city": "Paris",
  • "stateProvinceId": 987,
  • "countryId": 1034,
  • "postalCode": "SW17",
  • "latitude": 0.34567,
  • "longitude": 0.34567
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Client Addresses - Update

Updates an existing client address.

Note: Client address uses the Field Configuration feature which supports the ability to enable or disable fields on the address and to indicate which fields are mandatory and which are not.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a client.

query Parameters
type
required
integer

The id of a code value that represents a address type.

Request Body schema: application/json
required
street
string <= 100 characters

Part of the address fields. Can be used to capture street name of address

addressLine1
string <= 100 characters

Part of the address fields. Can be used to capture portion of address

addressLine2
string <= 100 characters

Part of the address fields. Can be used to capture portion of address

addressLine3
string <= 100 characters

Part of the address fields. Can be used to capture portion of address

townVillage
string <= 100 characters

Part of the address fields. Can be used to capture town of address

countyDistrict
string <= 100 characters

Part of the address fields. Can be used to capture county or district of address

city
string <= 100 characters

Part of the address fields. Can be used to capture city of address

stateProvinceId
integer <integer64>

The id of the code value related to the code state (see Code and Code Values)

countryId
integer <integer64>

The id of the code value related to the code country (see Code and Code Values)

postalCode
string <= 10 characters

Part of the address fields. Can be used to capture postcode of address

latitude
number <decimal>

Part of the address fields. Can be used to latitude portion of lat-long coordinate

longitude
number <decimal>

Part of the address fields. Can be used to longitude portion of lat-long coordinate

Responses

Request samples

Content type
application/json
{
  • "street": "Rue des Irlandais",
  • "addressLine1": "Somewhere",
  • "addressLine2": "over",
  • "addressLine3": "the rainbow",
  • "townVillage": "Smalltown",
  • "countyDistrict": "Co. Dublin",
  • "city": "Paris",
  • "stateProvinceId": 987,
  • "countryId": 1034,
  • "postalCode": "SW17",
  • "latitude": 0.34567,
  • "longitude": 0.34567
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Field Configuration - Address

Used to view the field configuration for client address module

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Loan Product

Create New Loan Product

The supported schema for creating a new loan product.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

name
required
string [ 1 .. 100 ] characters

The full name of the loan product.

shortName
required
string = 4 characters

The short name of the loan product.

An abbreviated version of the name, used in reports or menus where space is limited.

description
string <= 500 characters

A description to provide users with more information about the product.

productGroupId
integer <integer64>

The id of associated product group.

fundId
integer <integer64>

The id of associated fund source.

The original source of your funds (for example a grant).

loanIncomeTaxGroupId
integer <integer64>

The id of associated TaxGroup to be used for tax on loan income.

If provided, it means that loan accounts created against this product will support tax on their income.

Only supported when the Periodic Accruals accounting is configured accountingRule=3.

if provided, interestTaxOnLoanAccountId should also be supplied so Tax on Interest can be booked against it.

currencyCode
required
string <= 3 characters

Relates to the the currency of the loan product. A three character identifer of currency this loan product uses.

digitsAfterDecimal
required
integer

Relates to the the currency of the loan product. The number of digits after decimal to be supported on the currency.

inMultiplesOf
integer

Relates to the the currency of the loan product. Relevant for currencies where digitsAfterDecimal is zero. This will round the monetary amount to the nearest multiple.

installmentAmountInMultiplesOf
required
integer

Relates to the loan repayment schedule.

This will round the monetary amount of an installment to the nearest multiple.

Must be greater than or equal to inMultiplesOf and if greater than it, a multiple of inMultiplesOf.

principal
number <decimal>

The principal is the default amount that can be shown to users by when creating a new loan via forms.

Can be used with minPrincipal and maxPrincipal to put bounds on the size of loans that use this product.

minPrincipal
number <decimal>

The minimum size of any loan under this loan product.

See also principal and maxPrincipal.

maxPrincipal
number <decimal>

The maximum size of any loan under this loan product.

See also principal and minPrincipal.

numberOfRepayments
required
integer

The numberOfRepayments is the default number of installments that is shown to users when creating a new loan via forms.

Can be used with minNumberOfRepayments and maxNumberOfRepayments to put bounds on the number of installments allowed in loans that use this product.

minNumberOfRepayments
integer

The minNumberOfRepayments is the minimum number of installments allowed in loans that use this product.

See also numberOfRepayments and maxNumberOfRepayments.

maxNumberOfRepayments
integer

The maxNumberOfRepayments is the maximum number of installments allowed in loans that use this product.

See also numberOfRepayments and minNumberOfRepayments.

repaymentEvery
required
integer

Used together with repaymentFrequencyType to indicate the length of time between installments.

repaymentFrequencyType
required
integer
Enum: 0 1 2 3

Used together with repaymentEvery to indicate the length of time between installments.

Supported options are: 0=Days 1=Weeks 2=Months 3=Years

isLinkedToFloatingInterestRates
boolean
Default: false

A boolean that indicates if the product is using the "floating" interest rates concept or not.

if false, interestRatePerPeriod, interestRateFrequencyType and minInterestRatePerPeriod, maxInterestRatePerPeriod are applicable.

if true, floatingRatesId, interestRateDifferential, minDifferentialLendingRate, maxDifferentialLendingRate, defaultDifferentialLendingRate and isFloatingInterestRateCalculationAllowed are applicable.

interestRatePerPeriod
number <decimal>

The default interest rate shown to user that create loans via forms.

Can be used with minInterestRatePerPeriod and maxInterestRatePerPeriod to put bounds on the interest rate allowed in loans that use this product.

Used with interestRateFrequencyType to describe the interest rate.

Mandatory if isLinkedToFloatingInterestRates is false.

minInterestRatePerPeriod
number <decimal>

The minimum interest rate allowed in loans that use this product.

See also interestRatePerPeriod and maxInterestRatePerPeriod.

maxInterestRatePerPeriod
number <decimal>

The maximum interest rate allowed in loans that use this product.

See also interestRatePerPeriod and minInterestRatePerPeriod.

interestRateFrequencyType
integer
Enum: 2 3

Used together with interestRatePerPeriod to indicate the length of time the interest is applicable to.

Supported options are: 2=Months 3=Years

Mandatory if isLinkedToFloatingInterestRates is false.

floatingRatesId
integer <integer64>

The id on a floating rate entry on the system.

interestRateDifferential
number <decimal>

The difference between the base rate and this loan products floating interest rate.

minDifferentialLendingRate
number <decimal>

The min allowed difference between the base rate and this loan products floating interest rate.

maxDifferentialLendingRate
number <decimal>

The max allowed difference between the base rate and this loan products floating interest rate.

defaultDifferentialLendingRate
number <decimal>

The default difference between the base rate and this loan products floating interest rate.

isFloatingInterestRateCalculationAllowed
boolean
Default: false

A boolean that indicates if floating interest rate caclulation is allowed.

repayPrincipalEvery
integer

Related to Multiple Balloon Repayments concept. If provided and greater than zero, used to force principal to be paid every [repayPrincipalEvery] installments.

repayInterestEvery
integer

Related to Multiple Balloon Repayments concept.If provided and greater than zero, used to force interest to be paid every [repayInterestEvery] installments.

firstRepaymentOffsetPeriod
integer

firstRepaymentOffsetPeriod is used with repaymentFrequencyType to configure the offset of the first repayment date from the disbursement date.

For example, if the repaymentFrequencyType is months, the disbursement date is set to the 5th of September, and the value 3 is entered, then the first repayment date will become 5th of December.

See also repaymentFrequencyType.

allowVariableInstallments
boolean
Default: false

Use 'allowVariableInstallments' if you wish to be able to change the repayment schedule.

Example - if minimumGap = 1, maximumGap = 10 and installment 1 due date = 01-06-2019,
then installment 2 due date must be between 01-06-2019 and 11-06-2019

If true, then minimumGap, maximumGap are mandatory

minimumGap
integer

Mandatory if allowVariableInstallments is true, used to indicate the minimum number of days the adjusted repayment schedule can be away from original.

maximumGap
integer

Mandatory if allowVariableInstallments is true, used to indicate the maximum number of days the adjusted repayment schedule can be away from original.

graceOnPrincipalPayment
integer

If populated, indicates the number of installments you wish your grace period on principal payments to be.

graceOnInterestPayment
integer

If populated, indicates the number of installments you wish your grace period on interest payments to be.

graceOnInterestCharged
integer

If populated, indicates the number of installments you wish there to be no interest charged / calculated for.

graceOnPrincipalAndInterestPayment
boolean
Default: false

Related to attribute overrides for loans. see allowAttributeOverrides

graceOnArrearsAgeing
boolean
Default: false

Related to attribute overrides for loans. see allowAttributeOverrides

inArrearsTolerance
number <decimal>
Deprecated

Deprecated from 1.45. No longer used.

standingInstruction
boolean
Deprecated
Default: false

Deprecated. if passed as direct parameter not processed or used. Related to attribute overrides for loans. see allowAttributeOverrides

allowAdditionalCharges
boolean
Deprecated
Default: true

If false, when adding or editing loans with this product users will not be allowed to add additional charges to the loan.

Deprecated. if passed as direct parameter not processed or used. Related to attribute overrides for loans. see allowAttributeOverrides

canUseForTopup
boolean
Default: false

if true, a new loan of this product type is allowed to top-up an existing loan of the client.

interestType
required
integer
Enum: 0 1

Relates to the Interest Calculation.

Dictates how the the interest is calculated for the loan schedule.

Supported options are: 0=Declining Balance 1=Flat

Flat Interest loans charge equal interest amounts on each loan instalment, based on the original loan principal.

Declining Balance loans calculate the interest amount on each instalment based upon the outstanding balance of the loan (therefore the interest amount charged on each instalment reduces as the loan is repaid).

isInterestRecalculationEnabled
boolean
Default: false

Mandatory and only applicable if interestType = 0 (Declining Balance).

Used to denote whether interest recalculation is enabled or disabled. When a client falls into arrears, additional interest will be recalculated.

On declining balance loans interest is always calculated across the new loan term.

allowPartialPeriodInterestCalcualtion
boolean
Default: false

Only Applicable if interestCalculationPeriodType = 1 (Same as Repayment Period)

recalculateInterestOnArrears
boolean
Default: false

Only Applicable if isInterestRecalculationEnabled = 1 determines if interest will be recalculated on arrears.

interestRecalculationCompoundingMethod
integer
Enum: 0 1 2 3

Mandatory and only applicable if isInterestRecalculationEnabled is true.

Only supported if interestCalculationPeriodType is Daily and allowPartialPeriodInterestCalcualtion is true Or if interestCalculationPeriodType is not Daily and allowPartialPeriodInterestCalcualtion is false

Supported options are: 0=None 1=Interest 2=Fee 3=Interest and Fee

When a client falls into arrears, additional interest is calculated.

Use this setting to determine whether the new interest amount is calculated on fees, interest or fees & interest.

rescheduleStrategyMethod
integer
Enum: 1 2 3

Mandatory and only applicable if isInterestRecalculationEnabled is true.

Supported options are: 1=Reschedule next repayments 2=Reduce number of installements 3=Reduce installment amount (Reduce EMI Amount)

Select 2="Reduce number of installments" if you wish the loan to finish earlier in the case of early repayments

Select 3="Reduce installment amount" if you wish the interest due on future installments to be reduced in the case of early repayments.

recalculationRestFrequencyType
integer
Enum: 1 2 3 4

Mandatory and only applicable if isInterestRecalculationEnabled is true.

Supported options are: 1=Same as repayment period 2=Daily 3=Weekly 4=Monthly

Use 2=Daily if you wish interest to be calculated on the outstanding loan balance from the previous day. Use 3=weekly for the previous week Use 4=monthly for the previous month.

Using 0=Same as Repayment period will use the repayment frequency of the loan itself.

recalculationRestFrequencyInterval
integer

Optional and only applicable if isInterestRecalculationEnabled is true and recalculationRestFrequencyType not 1=Same as repayment period

Not supported through Musoni UI #TODO review if needed

recalculationRestFrequencyNthDayType
integer

Optional and only applicable if isInterestRecalculationEnabled is true and recalculationRestFrequencyType not 1=Same as repayment period

Not supported through Musoni UI #TODO review if needed

recalculationRestFrequencyDayOfWeekType
integer

Optional and only applicable if isInterestRecalculationEnabled is true and recalculationRestFrequencyType not 1=Same as repayment period

Not supported through Musoni UI #TODO review if needed

recalculationRestFrequencyOnDayType
integer

Optional and only applicable if isInterestRecalculationEnabled is true and recalculationRestFrequencyType not 1=Same as repayment period

Not supported through Musoni UI #TODO review if needed

recalculationCompoundingFrequencyInterval
integer

Optional and only applicable if isInterestRecalculationEnabled is true and interestRecalculationCompoundingMethod not 0=None

Not supported through Musoni UI #TODO review if needed

recalculationCompoundingFrequencyNthDayType
integer

Optional and only applicable if isInterestRecalculationEnabled is true and interestRecalculationCompoundingMethod not 0=None

Not supported through Musoni UI #TODO review if needed

recalculationCompoundingFrequencyDayOfWeekType
integer

Optional and only applicable if isInterestRecalculationEnabled is true and interestRecalculationCompoundingMethod not 0=None

Not supported through Musoni UI #TODO review if needed

recalculationCompoundingFrequencyOnDayType
integer

Optional and only applicable if isInterestRecalculationEnabled is true and interestRecalculationCompoundingMethod not 0=None

Not supported through Musoni UI #TODO review if needed

isArrearsBasedOnOriginalSchedule
boolean

Optional and only applicable if isInterestRecalculationEnabled is true.

Not supported through Musoni UI #TODO review if needed

isCompoundingToBePostedAsTransaction
boolean

Optional and only applicable if isInterestRecalculationEnabled is true.

Not supported through Musoni UI #TODO review if needed

preClosureInterestCalculationStrategy
integer
Enum: 1 2

Optional and only applicable if isInterestRecalculationEnabled is true.

Supported options are: 1=TILL_PRE_CLOSURE_DATE 2=TILL_REST_FREQUENCY_DATE

When a customer pays off a loan ahead of schedule and not on the due date of the installment, \n this option controls whether the interest is calculated on the date of the transaction, \n or uses interest as per the end date of the current installment.

inDuplum
boolean

Optional and only applicable if isInterestRecalculationEnabled is true.

if true, the system will stop calculating additional (penalty) interest on loans in arrears once the total interest, fees and penalties outstanding is the same as the outstanding principal.

This only applies to interest recalculation loans.

amortizationType
required
integer
Enum: 0 1

Relates to the the repayment schedule.

Dictates how the the loan is amortized over the loan schedule.

Supported options are: 0=Equal Principal 1=Equal Installments

Mandatory and only relevant if interestType=0 (Declining Balance).

Selecting 0=Equal Principal ensures that the principal of the loan installment remains the same through the loan term (with the interest and installment size therefore declining).

Selecting 1=Equal Installments ensures the principal is adjusted to ensure equal installment sizes.

interestCalculationPeriodType
required
integer
Default: 1
Enum: 0 1

Relates to the the repayment schedule.

Dictates how the the interest is calculated for the loan schedule.

Supported options are: 0=Daily 1=Same as repayment period

Defaults to 1="Same as Repayment Period". This ensures that all loans of the same loan term have the same interest amount charged over the course of the loan.

Selecting 0=Daily means that the interest amount charged on a loan product will vary slightly based on the number of days in the months over which the loan term runs.

daysInYearType
required
integer
Enum: 1 360 364 365

An enumeration that indicates the number of days in year to be used.

This determines whether the daily interest rate is calculated by dividing the ‘Nominal Annual Interest Rate’ by 360, or 365.

Supported options are: 1=Actual 360=360 364=364 365=365

daysInMonthType
required
integer
Enum: 1 30

An enumeration that indicates the number of days in month to be used.

Specifies the number of days in a Month, used to calculate partial periods for monthly loans.

Supported options are: 1=Actual 30=30

transactionProcessingStrategyId
required
integer
Enum: 1 5 6

An id of the transaction or payment processing strategy to be used when payments are made against loan.

This relates to functionality that is also known as Payment Application Logic.

A number of out of the box approaches exist and custom approaches can be added if required.

Determines the order in which Interest, Principal, Penalties and Fees are paid off when repayments are made.

Supported options are: 1=Stanard (Penalties, Fees, Interest, Principal order) 5=Principal, Interest, Penalties, Fees Order 6=Interest, Principal, Penalties, Fees Order

includeInBorrowerCycle
boolean
Default: false

Used to denote whether the loans should include in loan cycle counter or not.

holdGuaranteeFunds
boolean
Default: false

If true, a guarantor will not be able to withdraw funds linked as a guarantee to the loan until the loan is repaid.

if true, see mandatoryGuarantee.

mandatoryGuarantee
number <decimal>

Mandatory and only applicable if holdGuaranteeFunds is true.

This is the percentage of the loan that has to be guaranteed before the loan can be created.

minimumGuaranteeFromOwnFunds
number <decimal>

This is the minimum percentage that has to be guaranteed from the client's own savings, rather than the savings of other guarantors.

minimumGuaranteeFromGuarantor
number <decimal>

This is the minimum percentage that any other guarantors have to guarantee for the loan to be created.

splitInterestAmongGuarantors
boolean
Default: false

Mandatory and only applicable if holdGuaranteeFunds is true.

If true, then when the loan is fully repaid, the interest from the loan will be paid into each guarantor's savings account in proportion to the percentage of the loan they guaranteed.

canAutoAllocateOverpayments
boolean
Default: false

If true then if the loan is overpaid, the overpaid amount will be automatically transferred to the linked savings account.

If there is no linked savings account, the overpaid amount has to be transferred manually. This will also apply to already active accounts.

autoDisburse
boolean
Default: false

If true, newly created loans will automatically be approved and disbursed.

paymentTypeId
integer
Value: 1

Mandatory if autoDisburse is true.

checkNumber
string <= 45 characters

Optional and only applicable if autoDisburse is true

receiptNumber
string <= 45 characters

Mandatory if autoDisburse is true.

restrictSavingsProductId
integer <integer64>

The id of an existing savings product.

Linked savings account will then be required to be associated with this selected savings product.

requiresLinkedSavingsAccount
boolean

Used to indicate if a linked savings account is required or not.

requiresMandatorySavings
boolean

Optional and only applicable if requiresLinkedSavingsAccount is true.

mandatorySavingsMethod
string
Enum: "UPFRONT" "SPREAD"

Mandatory and only applicable if requiresMandatorySavings is true.

mandatorySavingsPercentage
number <decimal>

Mandatory and only applicable if requiresMandatorySavings is true.

object
accountingRule
integer
Enum: 1 2 3 4

Indicates what type of accounting is enabled for this loan product.

Supported options are: 1=None 2=Cash Based Accounting 3=Accrual Periodic 4=Accrual Upfront

fundSourceAccountId
integer <integer64>

The id of a GL Account

loanPortfolioAccountId
integer <integer64>

The id of a GL Account

transfersInSuspenseAccountId
integer <integer64>

The id of a GL Account

interestOnLoanAccountId
integer <integer64>

The id of a GL Account

incomeFromFeeAccountId
integer <integer64>

The id of a GL Account

incomeFromPenaltyAccountId
integer <integer64>

The id of a GL Account

incomeFromRecoveryAccountId
integer <integer64>

The id of a GL Account

writeOffAccountId
integer <integer64>

The id of a GL Account

overpaymentLiabilityAccountId
integer <integer64>

The id of a GL Account

receivableInterestAccountId
integer <integer64>

The id of a GL Account

receivableFeeAccountId
integer <integer64>

The id of a GL Account

receivablePenaltyAccountId
integer <integer64>

The id of a GL Account

interestWriteOffAccountId
integer <integer64>

The id of a GL Account

feeWriteOffAccountId
integer <integer64>

The id of a GL Account

penaltyWriteOffAccountId
integer <integer64>

The id of a GL Account

suspendedInterestIncomeAccountId
integer <integer64>

The id of a GL Account

interestTaxOnLoanAccountId
integer <integer64>

The id of a GL account.

This GL account is used to book tax on interest when the tax feature is setup for loans and Periodic Accrual accounting is used.

allowFlexibleAdvancePayment
boolean

use for non-interest recalculation product to allow interest recalculation on advance payment.

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "name": "Green Loans 1",
  • "shortName": "Green Loans 1",
  • "description": "12.5% Declining Balance",
  • "productGroupId": 1,
  • "fundId": 1,
  • "loanIncomeTaxGroupId": 1,
  • "currencyCode": "KES",
  • "digitsAfterDecimal": 0,
  • "inMultiplesOf": 1,
  • "installmentAmountInMultiplesOf": 1,
  • "principal": 1000.5,
  • "minPrincipal": 100,
  • "maxPrincipal": 100,
  • "numberOfRepayments": 1,
  • "minNumberOfRepayments": 1,
  • "maxNumberOfRepayments": 1,
  • "repaymentEvery": 1,
  • "repaymentFrequencyType": 2,
  • "isLinkedToFloatingInterestRates": false,
  • "interestRatePerPeriod": 10.5,
  • "minInterestRatePerPeriod": 10.5,
  • "maxInterestRatePerPeriod": 10.5,
  • "interestRateFrequencyType": 2,
  • "floatingRatesId": 1,
  • "interestRateDifferential": 2.5,
  • "minDifferentialLendingRate": 1,
  • "maxDifferentialLendingRate": 4,
  • "defaultDifferentialLendingRate": 2.5,
  • "isFloatingInterestRateCalculationAllowed": false,
  • "repayPrincipalEvery": 1,
  • "repayInterestEvery": 1,
  • "firstRepaymentOffsetPeriod": 1,
  • "allowVariableInstallments": false,
  • "minimumGap": 1,
  • "maximumGap": 1,
  • "graceOnPrincipalPayment": 1,
  • "graceOnInterestPayment": 1,
  • "graceOnInterestCharged": 1,
  • "graceOnPrincipalAndInterestPayment": false,
  • "graceOnArrearsAgeing": false,
  • "inArrearsTolerance": 0,
  • "standingInstruction": false,
  • "allowAdditionalCharges": false,
  • "canUseForTopup": false,
  • "interestType": 0,
  • "isInterestRecalculationEnabled": false,
  • "allowPartialPeriodInterestCalcualtion": false,
  • "recalculateInterestOnArrears": false,
  • "interestRecalculationCompoundingMethod": 1,
  • "rescheduleStrategyMethod": 1,
  • "recalculationRestFrequencyType": 1,
  • "recalculationRestFrequencyInterval": 1,
  • "recalculationRestFrequencyNthDayType": 1,
  • "recalculationRestFrequencyDayOfWeekType": 1,
  • "recalculationRestFrequencyOnDayType": 1,
  • "recalculationCompoundingFrequencyInterval": 1,
  • "recalculationCompoundingFrequencyNthDayType": 1,
  • "recalculationCompoundingFrequencyDayOfWeekType": 1,
  • "recalculationCompoundingFrequencyOnDayType": 1,
  • "isArrearsBasedOnOriginalSchedule": false,
  • "isCompoundingToBePostedAsTransaction": false,
  • "preClosureInterestCalculationStrategy": 1,
  • "inDuplum": false,
  • "amortizationType": 1,
  • "interestCalculationPeriodType": 1,
  • "daysInYearType": 1,
  • "daysInMonthType": 1,
  • "transactionProcessingStrategyId": 1,
  • "includeInBorrowerCycle": false,
  • "holdGuaranteeFunds": false,
  • "mandatoryGuarantee": 0,
  • "minimumGuaranteeFromOwnFunds": 0,
  • "minimumGuaranteeFromGuarantor": 0,
  • "splitInterestAmongGuarantors": false,
  • "canAutoAllocateOverpayments": false,
  • "autoDisburse": false,
  • "paymentTypeId": 1,
  • "checkNumber": 1,
  • "receiptNumber": 1,
  • "restrictSavingsProductId": 1,
  • "requiresLinkedSavingsAccount": false,
  • "requiresMandatorySavings": false,
  • "mandatorySavingsMethod": "UPFRONT",
  • "mandatorySavingsPercentage": 0,
  • "allowAttributeOverrides": {
    },
  • "accountingRule": 2,
  • "fundSourceAccountId": 0,
  • "loanPortfolioAccountId": 0,
  • "transfersInSuspenseAccountId": 0,
  • "interestOnLoanAccountId": 0,
  • "incomeFromFeeAccountId": 0,
  • "incomeFromPenaltyAccountId": 0,
  • "incomeFromRecoveryAccountId": 0,
  • "writeOffAccountId": 0,
  • "overpaymentLiabilityAccountId": 0,
  • "receivableInterestAccountId": 0,
  • "receivableFeeAccountId": 0,
  • "receivablePenaltyAccountId": 0,
  • "interestWriteOffAccountId": 0,
  • "feeWriteOffAccountId": 0,
  • "penaltyWriteOffAccountId": 0,
  • "suspendedInterestIncomeAccountId": 0,
  • "interestTaxOnLoanAccountId": 0,
  • "allowFlexibleAdvancePayment": false
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Activate Loan Product

Activates a closed loan product.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a Loan Product.

query Parameters
command
required
string
Example: command=activate

The activate command.

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 12,
  • "changes": {
    }
}

Close Loan Product

Closes an active loan product.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a Loan Product.

query Parameters
command
required
string
Example: command=close

The close command.

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 12,
  • "changes": {
    }
}

Loans

List Loans

List all Loans

See The Data Filter API for better approach to search/filter.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

search
string
Example: search=John Doe

Searches (matching around) across:

  • Group name
  • Staff name
  • Client name
  • Loan product name
  • Loan account number
  • Outstanding loan amount (if search is a number)
  • Loan principal Disbursed (if search is a number)
  • Disbursement date (if search is a date)
officeId
integer

The id of an office. Used to restrict to set of staff associated with the office.

externalId
string
Example: externalId=L00001

if provided only loans with this exact externalId will be returned

staffId
integer

id of a staff/loanofficer, if provided will only return the loans linked to this staff id

groupId
integer

id of a staff/loanofficer, if provided will only return the loans linked to this staff id

underHierarchy
string
Example: underHierarchy=.2.3

if provided only loans that exist under the hierarchy provided will be return (office + child offices)

orderBy
string
Enum: "id" "loan_status_id" "submittedon_date" "disbursedon_date" "expectedmaturedon_date" "firstrepaymenton_date" "principal_amount"

The database field name that you wish to order the list of loans by.

sortOrder
string
Enum: "ASC" "DESC"

Used with orderBy parameter, this indicates the sorting order of the attribute mentioned in orderBy. This parameter is ignored unless orderBy is provided also.

accountNo
string
Example: accountNo=L00001

if provided only loans with this exact accountNo will be returned

skipRowCount
boolean
Default: false
Example: skipRowCount=false

if true, does not return rowcount, improving search speed.

disbursementFromDate
string
Example: disbursementFromDate=2020-01-01

Allows to only return a subset of loans based on disbursement date, should be provided in format "yyyy-MM-dd"

disbursementToDate
string
Example: disbursementToDate=2021-01-01

Allows to only return a subset of loans based on disbursement date, should be provided in format "yyyy-MM-dd"

clientOfficeName
string
Example: clientOfficeName=Head office

Only returns loans that are part of an exact office name.

modifiedSinceTimestamp
integer
Example: modifiedSinceTimestamp=1634152729

Should be passed as a UNIX Timestamp.

When provided only loans that have been created or updated since the provided timestamp are returned.

Loans will be marked as modified whenever there is any modification to the loan, the underlying schedule, transactions, charges etc.

This parameter can be used in integrations to fetch changed data since a last fetch, timestamps will be treated as UTC and returned as UTC.

sqlSearch
string
Deprecated

Deprecated. Use other parameters such as search or See The Data Filter API for better approach for search/filter.

A valid sql fragment that will work with backend query for this api.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create New Loan or Calculate Loan Schedule

Create new Loan or use command=calculateLoanSchedule to calculate a repayment schedule using loan terms.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
loanType
required
string
Enum: "individual" "group" "jlg"

This fields indicates the type of loan that is being applied for.

Three types of loans are supported at present:

  • individual - (loans where a single person or business applies for loan)
  • group (loans where several persons group together to receive loan)
  • jlg (loans where several persons group together and are jointly liable for entire loan)
productId
required
integer <integer64>

The id of associated loan product.

clientId
integer <integer64>

The id of an existing client this loan is for.

Mandatory when loanType=individual.

Impact on repayment schedule:

If reschedule-repayments-on-holidays configuration is enabled. The clientId is used to pick up the office associated with the existing client and determine what holidays are applicable.

groupId
integer <integer64>

The id of an existing group this loan is for.

Mandatory when loanType=group or loanType=jlg.

Impact on repayment schedule:

If reschedule-repayments-on-holidays configuration is enabled. The groupUd is used to pick up the office associated with the existing group and determine what holidays are applicable.

calendarId
integer <integer64>

The id of a calendar entry.

Applicable only to JLG loans and where configuration is enabled for meetings-mandatory-for-jlg-loans.

syncDisbursementWithMeeting
boolean

A boolean indicating if disbursement date should be fall in with the groups meeting date.

Applicable only to JLG loans and where configuration is enabled for meetings-mandatory-for-jlg-loans.

principal
required
number <decimal>

The principal is the amount of the loan that is to be disbursed.

loanTermFrequency
required
integer

Used together with loanTermFrequencyType to indicate the term of the loan.

loanTermFrequencyType
required
integer
Enum: 0 1 2 3

Used together with loanTermFrequency to indicate the term of the loan.

Supported options are: 0=Days 1=Weeks 2=Months 3=Years

numberOfRepayments
required
integer

The numberOfRepayments is the number of installments for this loan.

repaymentEvery
required
integer

Used together with repaymentFrequencyType to indicate the length of time between installments.

repaymentFrequencyType
required
integer
Enum: 0 1 2 3

Used together with repaymentEvery to indicate the length of time between installments.

Supported options are: 0=Days 1=Weeks 2=Months 3=Years

When months option is selected two futher fields are relevant and can be optionally provided; repaymentFrequencyNthDayType and repaymentFrequencyDayOfWeekType

repaymentFrequencyNthDayType
integer
Enum: 1 2 3 4 -1

Used together with repaymentFrequencyDayOfWeekType to indicate on what frequency the repayment should be made.

It supports frequencies like: First Monday (of the month).

Only applicable when repaymentFrequencyType=2.

Supported options are: 1=First 2=Second 3=Third 4=Fourth

repaymentFrequencyDayOfWeekType
integer
Enum: 1 2 3 4 5 6 7

Used together with repaymentFrequencyNthDayType to indicate on what frequency the repayment should be made.

It supports frequencies like: First Monday (of the month).

Only applicable when repaymentFrequencyType=2.

Supported options are: 1=Monday 2=Tuesday 3=Wednesday 4=Thursday 5=Friday 6=Saturday 7=Sunday

interestType
required
integer
Enum: 0 1

Relates to the Interest Calculation.

Dictates how the interest is calculated for the loan schedule.

Supported options are: 0=Declining Balance 1=Flat

Flat Interest loans charge equal interest amounts on each loan instalment, based on the original loan principal.

Declining Balance loans calculate the interest amount on each instalment based upon the outstanding balance of the loan (the interest amount charged on each instalment reduces as the loan is repaid).

interestCalculationPeriodType
required
integer
Default: 1
Enum: 0 1

Relates to the repayment schedule.

Dictates how the interest is calculated for the loan schedule.

Supported options are: 0=Daily 1=Same as repayment period

Defaults to 1="Same as Repayment Period". This ensures that all loans of the same loan term have the same interest amount charged over the course of the loan.

Selecting 0=Daily means that the interest amount charged on a loan product will vary slightly based on the number of days in the months over which the loan term runs.

interestRatePerPeriod
required
number <decimal>

The interest rate per selected period type.

Used with interestRateFrequencyType to describe the interest rate.

interestRateFrequencyType
integer
Deprecated
Enum: 2 3

Used together with interestRatePerPeriod to indicate the length of time the interest is applicable to.

Supported options are: 2=Months 3=Years

If omitted, the loan inherits this property from its Loan Product. if provided, it overrides any property that is set in Loan Product.

amortizationType
required
integer
Enum: 0 1

Relates to the the repayment schedule.

Dictates how a declining balance loan is amortized over the loan schedule.

Supported options are: 0=Equal Principal 1=Equal Installments

Mandatory and only relevant if interestType=0 (Declining Balance).

Selecting 0=Equal Principal ensures that the principal of the loan installment remains the same through the loan term (with the interest and installment size therefore declining).

Selecting 1=Equal Installments ensures the principal is adjusted to ensure equal installment sizes.

transactionProcessingStrategyId
required
integer
Enum: 1 5 6

An id of the transaction processing strategy to be used when repayments or other transactions are made against loan.

This relates to functionality that is also referred to elsewhere in documentation as Payment Application Logic.

A number of out of the box approaches exist and custom approaches can be added if required.

The key responsiblity of the strategy is to determines the order in which Interest, Principal, Penalties and Fees are paid off when repayments are made.

Supported options are: 1=Standard (Penalties, Fees, Interest, Principal order) 5=Principal, Interest, Penalties, Fees Order 6=Interest, Principal, Penalties, Fees Order

expectedDisbursementDate
required
string

The proposed disbursement date for the loan.

Provided as a string and used together with dateFormat.

submittedOnDate
required
string

The date on which the loan application was submitted for approval.

Provided as a string and used together with dateFormat.

locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

submittedOnNote
string <= 500 characters

A note provided along with submittedOnDate.

repaymentsStartingFromDate
string

Related to Loan Schedule Generation algorithm.

When provided, the loan schedule is generated using this date as the first repayment date due date.

see also loan product setting minimumDaysBetweenDisbursalAndFirstRepayment.

Provided as a string and used together with dateFormat.

graceOnPrincipalPayment
integer

Related to Loan Schedule Generation algorithm.

If populated, indicates the number of installments you wish your grace period on principal payments to be.

e.g 1 means that the first installment of the loan schedule will have no principal due.

graceOnInterestPayment
integer

Related to Loan Schedule Generation algorithm.

If populated, indicates the number of installments you wish your grace period on interest payments to be.

e.g 1 means that the first installment of the loan schedule will have no interest due.

graceOnInterestCharged
integer

Related to Loan Schedule Generation algorithm.

If populated, indicates the number of installments you wish there to be no interest charged / calculated for.

e.g 1 means that interest will only begin being calculated based on the principal outstanding from installment two.

fundId
integer <integer64>

The id of associated fund source.

The original source of your funds (for example a grant).

loanOfficerId
integer <integer64>

The id of associated staff member that is a loan officer.

loanPurposeId
integer <integer64>

The id of a code value that relates to the loan purpose code (see Code and Code Values).

linkAccountId
integer <integer64>

The id of an existing savings account.

Linked savings account will then be required to be associated with the selected client and also any product restriction setup on loan product.

Array of objects (LoanChargeCreateNew)

Ability to add multiple loan charges to the loan in one at time of creation.

Applicable only when the loan product is configured to allow this. see allowAttributeOverrides on loan product.

Array of objects (LoanCollateralCreateNew)

Ability to add multiple loan collateral entries to the loan at time of creation.

accountNo
string <= 20 characters

A unique account no. which identifies the account for this loan.

If not provided on creation, it is automatically generated based on the Account Number Format setup. (see Account Number Format and Configuration)

externalId
string <= 100 characters

A place to put an external reference for this loan e.g. The ID another system uses for it. If provided, it must be unique.

allowPartialPeriodInterestCalcualtion
boolean
Default: false

Only Applicable if interestCalculationPeriodType = 1 (Same as Repayment Period)

createStandingInstructionAtDisbursement
boolean
Default: false

A boolean indicating if a standing instruction should be created on disbursement for the repayments.

Applicable only when the loan product is configured to allow this. see allowAttributeOverrides on loan product.

interestChargedFromDate
string
Deprecated

The date from which interest is to be calculated from.

Provided as a string and used together with dateFormat.

When the loan is disbursed, there is an option on disbusrsement known as syncInterestChargedFromDateWithActualDisbursementDate which will set the date to be the same as the actual disbursement date.

Global confiruation related to this field:

  • interest-charged-from-date-same-as-disbursal-date

Responses

Request samples

Content type
application/json
{
  • "loanType": "individual",
  • "productId": 1,
  • "clientId": 1,
  • "groupId": 1,
  • "calendarId": 1,
  • "syncDisbursementWithMeeting": false,
  • "principal": 1000.5,
  • "loanTermFrequency": 1,
  • "loanTermFrequencyType": 2,
  • "numberOfRepayments": 1,
  • "repaymentEvery": 1,
  • "repaymentFrequencyType": 2,
  • "repaymentFrequencyNthDayType": 1,
  • "repaymentFrequencyDayOfWeekType": 1,
  • "interestType": 0,
  • "interestCalculationPeriodType": 1,
  • "interestRatePerPeriod": 10.5,
  • "interestRateFrequencyType": 2,
  • "amortizationType": 1,
  • "transactionProcessingStrategyId": 1,
  • "expectedDisbursementDate": "16-11-2020",
  • "submittedOnDate": "16-11-2020",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "submittedOnNote": "Loan application completed and submitted for approval by manager.",
  • "repaymentsStartingFromDate": "16-11-2020",
  • "graceOnPrincipalPayment": 1,
  • "graceOnInterestPayment": 1,
  • "graceOnInterestCharged": 0,
  • "fundId": 1,
  • "loanOfficerId": 1,
  • "loanPurposeId": 1,
  • "linkAccountId": 1,
  • "charges": [
    ],
  • "collateral": [
    ],
  • "accountNo": "0001-0001",
  • "externalId": "ABC-0001",
  • "allowPartialPeriodInterestCalcualtion": false,
  • "createStandingInstructionAtDisbursement": false,
  • "interestChargedFromDate": "16-11-2020"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Search Loans By State

Search for loans by state

The response returned is dynamic and based upon loans metadata (See Loan Metadata ) and responseParameters provided in the API request.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided or if higher than 200 limit will be 200

Request Body schema: application/json
required
stateName
required
string

Used to find loans that match this state name exactly. The state name should match one of the states defined in the state machine.

officeId
integer

Used in addition to stateName to refine the loan search based on selected office.

loanOfficerId
integer

Used in addition to stateName to refine the loan search based on selected loan officer.

required
Array of objects (DataFilterResponseParameter)

Specifies which fields the search should return.

Array of objects (DataFilterSortByParameter)

Specifies how the search results should be sorted.

Responses

Request samples

Content type
application/json
{
  • "stateName": "SUBMITTED_AND_PENDING_APPROVAL",
  • "officeId": 24,
  • "loanOfficerId": 24,
  • "responseParameters": [
    ],
  • "sortByParameters": [
    ]
}

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 52,
  • "pageItems": [
    ]
}

Find Loan by Id

Find a Loan by Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a Loan.

query Parameters
staffInSelectedOfficeOnly
boolean
Default: false

loan officers of the loan office.

transactionLimit
integer <int32>
Example: transactionLimit=10

number of loan transactions to be returned

associations
string
Enum: "all" "repaymentSchedule" "futureSchedule" "originalSchedule" "transactions" "charges" "guarantors" "collateral" "notes" "linkedAccount" "multiDisburseDetails" "creditChecks" "loanHistoryOfficer" "prepayLoan" "standingInstructions" "meeting" "groupMemberAllocation"
Example: associations=all

associated entity to be return

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Command on Loan

Execute a command on a loan, such as approve, reject, disburse, etc.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a Loan.

query Parameters
command
required
string
Enum: "reject" "undoreject" "withdrawnByApplicant" "undowithdraw" "approve" "undoapprove" "disburse" "disburseToSavings" "undodisbursal"
Example: command=approve

The name of the command being performed on the loan.

Request Body schema: application/json
required
Any of
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

withdrawnOnDate
required
string

The date on which the loan application was withdrawn.

Provided as a string and used together with dateFormat.

note
string <= 1000 characters

An optional comment or note in relation to this command.

Responses

Request samples

Content type
application/json
Example
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "withdrawnOnDate": "16-11-2020",
  • "note": "A short note in relation to this."
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Update Fund Source

Allows user with permission to update the fund source of the loan so long as loan is not closed.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a Loan.

query Parameters
command
required
string
Example: command=updateFundSource

command used when updating the fund source of a loan

Request Body schema: application/json
required
fundId
required
integer <int64>

The id of the fund you wish to change to.

Responses

Request samples

Content type
application/json
{
  • "fundId": 1
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Command on Loan Transaction

Set of commands that creates or alters a loan transaction which in turn can alter the state of a loan, e.g. make repayment, loan write off, interest waiver, loan prepayment, recovery payment

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a Loan.

query Parameters
command
required
string
Enum: "repayment" "waiveinterest" "writeoff" "undowriteoff" "prepayLoan" "recoverypayment" "refundoverpayment"
Example: command=repayment

The name of the command being performed on the loan transaction.

Request Body schema: application/json
required
Any of
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

transactionDate
required
string

The date on which the repayment was made.

Provided as a string and used together with dateFormat.

transactionAmount
required
number <decimal>

The amount of money repaid.

note
string <= 1000 characters

An optional comment or note in relation to this command.

paymentTypeId
integer <integer64>

The id of an existing PaymentType.

accountNumber
string <= 50 characters

An account number related to payment

checkNumber
string <= 50 characters

The check number related to payment

routingCode
string <= 50 characters

The routing code related to payment

receiptNumber
string <= 50 characters

The receipt number related to payment

bankNumber
string <= 50 characters

The bank number related to payment

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "transactionDate": "14 May 2013",
  • "transactionAmount": 5.5,
  • "note": "A short note in relation to this.",
  • "paymentTypeId": 1,
  • "accountNumber": "ACC000001",
  • "checkNumber": "CHK000001",
  • "routingCode": "RO-ABC001",
  • "receiptNumber": "RPT-ABC-001",
  • "bankNumber": "CB001"
}

Response samples

Content type
application/json
{
  • "officeId": 1,
  • "clientId": 1,
  • "loanId": 1,
  • "resourceId": 12,
  • "changes": { }
}

Savings Product

Savings accounts support features that allow the accounts to be used as typical savings accounts or as every day accounts like current/checking accounts:

  • Application process: for group or individual clients
  • Transactions: Ability to deposit and withdraw from account
  • Charges: fees or penalties can be setup
  • Accounting: cash based accounting for transactions on account
  • Interest
    • Rates: can be described via interest rate charts or as simple APR
    • Calculation
    • Posting
    • Witholding Tax (applied to interest postings)
    • Transfer of interest to seperate linked account
  • States
    • Dormancy
    • Escheat
  • Support for restrictions around:
    • Minimum opening balance
    • Minimum balance
    • Lock-in

Create Savings Product

Supports creation of new product offerings related to savings.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

name
required
string [ 1 .. 100 ] characters

The full name of the product.

shortName
required
string = 4 characters

The short name of the product.

An abbreviated version of the name, used in reports or menus where space is limited.

description
required
string <= 500 characters

A description to provide users with more information about the product.

currencyCode
required
string <= 3 characters

A three character identifer of currency. The currency of the product.

digitsAfterDecimal
required
integer

Relates to the the currency of the product. The number of digits after decimal to be supported on the currency.

inMultiplesOf
integer

Relates to the the currency of the product. Relevant for currencies where digitsAfterDecimal is zero. This will round the monetary amount to the nearest multiple.

productGroupId
integer <integer64>

The id of associated product group.

nominalAnnualInterestRate
required
number <decimal>

Simple way of describing the interest rate as a nominal APR to use for interest calculation e.g. 5% Per annum

If not suitable for product it can be set to zero and interestRateCharts can be used to create an interest rate chart that will decide the rate.

Array of objects (SavingsInterestRateChartWithNoSlabs)
interestPostingPeriodType
required
integer
Enum: 4 5 6 7

Part of interest calculation settings.

Indicates how often interest is to be posted to the account.

Supported options are: 4=Monthly 5=Quarterly 6=Bi-Annualy 7=Annual

interestCompoundingPeriodType
required
integer
Enum: 4 5 6 7

Part of interest calculation settings.

Indicates how often interest is to be compounded.

Supported options are: 1=Daily 4=Monthly 5=Quarterly 6=Bi-Annualy 7=Annual

interestCalculationType
required
integer
Enum: 1 2

Part of interest calculation settings.

There are two methods to calculate the interest on a savings account: 1=Daily Balance 2=Average Balance

interestCalculationDaysInYearType
required
integer
Enum: 360 365

Part of interest calculation settings.

Supported options are: 1=360 2=365

minBalanceForInterestCalculation
number <decimal>

Part of interest calculation settings.

The mimimum balance of the savings account for interest calculation to be permitted.

withHoldTax
boolean
Default: false

A boolean that indicates if withholding tax is configured.

if true interest posted to accounts of this product with have a withholding tax applied based on amount of interest posted.

The withholding tax is shown as an additional transaction on the account.

taxGroupId
integer <integer64>

The id of associated tax group.

Required if withHoldTax is set to true.

lockinPeriodEnabled
boolean
Default: true

A boolean that indicates if lockin period feature is to be used by this product and accounts of this product.

if true, lockinPeriodFrequency and lockinPeriodFrequencyType should be provided and these properties will be used when creating a savings account (unless overridden at that stage).

if false,lockinPeriodFrequency and lockinPeriodFrequencyType should be left null or not passed at all in the request.

lockinPeriodFrequency
integer

If provided, used along with lockinPeriodFrequencyType to indicate the length of time after opening that the account is 'locked' and withdrawals of any amount are not permitted e.g. 2 Months

lockinPeriodFrequencyType
integer
Enum: 0 1 2 3

If provided, used along with lockinPeriodFrequency to indicate the length of time after opening that the account is 'locked' and withdrawals of any amount are not permitted e.g. 2 Months

Supported options are: 0=Days 1=Weeks 2=Months 3=Years

minRequiredOpeningBalance
number <decimal>

Related to account activation.

Specifies the mimimum balance that savings accounts of this product must have upon activation.

When the account is activated, it will auto create a deposit transaction for the minRequiredOpeningBalance.

enforceMinRequiredBalance
boolean
Default: false

Indicates that minRequiredBalance is verified on savings accounts of this product.

Used together with minRequiredBalance to describe the minimum allowed balance of this product.

if enabled, then attempts to withdraw amounts that result in the account balance falling below minRequiredBalance will not be permitted.

minRequiredBalance
number <decimal>

Mandatory if enforceMinRequiredBalance is true.

Specifies the mimimum balance that savings accounts of this product must have whilst active.

if enforceMinRequiredBalance enabled, then attempts to withdraw amounts that result in the account balance falling below minRequiredBalance will not be permitted.

allowOverdraft
boolean
Default: false

Indicates if an overdraft facility is be allowed on savings accounts of this product.

overdraftLimit
number <decimal>

Mandatory if allowOverdraft is true.

Specifies the amount of overdraft that savings accounts of this product can have must be between minOverdraftLimit and maxOverdraftLimit.

minOverdraftLimit
number <decimal>

Mandatory if allowOverdraft is true.

Specifies the minimum amount of overdraft that savings accounts of this product can have.

maxOverdraftLimit
number <decimal>

Mandatory if allowOverdraft is true.

Specifies the maximum amount of overdraft that savings accounts of this product can have.

nominalAnnualInterestRateOverdraft
number <decimal>

Interest rate as a nominal APR to use for interest calculation when account is in overdraft e.g. 20% Per annum must be between min and max nominalAnnualInterestRateOverdraft

minNominalAnnualInterestRateOverdraft
number <decimal>

Minimum Interest rate as a nominal APR to use for interest calculation when account is in overdraft e.g. 20% Per annum

maxNominalAnnualInterestRateOverdraft
number <decimal>

Maximum Interest rate as a nominal APR to use for interest calculation when account is in overdraft e.g. 20% Per annum

minOverdraftForInterestCalculation
number <decimal>

Applicable if allowOverdraft is true.

If provided, indicates how much into an overdraft before interest is calculated against the overdraft.

isDormancyTrackingActive
boolean
Default: false

Indicates if accounts of this product should support movement to dormant status by end of day scheduled jobs.

daysToInactive
number <integer>

Mandatory if isDormancyTrackingActive is true.

If provided, indicates how many days before the account should be considered inactive.

daysToDormancy
number <integer>

Mandatory if isDormancyTrackingActive is true.

If provided, indicates how many days before the account should be considered dormant.

daysToEscheat
number <integer>

Mandatory if isDormancyTrackingActive is true.

If provided, indicates how many days before the account should be considered escheat.

calculateInterestDuringDormancy
boolean
Default: false

Mandatory if isDormancyTrackingActive is true.

Indicates if interest should be calculated for accounts that are marked as dormant.

stopInterestIfDormant
boolean
Deprecated
Default: false

Duplicate of calculateInterestDuringDormancy.

Applicable if isDormancyTrackingActive is true.

Indicates if interest should be calculated for accounts that are marked as dormant.

enableWithdrawalNotice
boolean
Default: false

Indicates if notice is required for withdrawals.

noticePeriod
number <integer>

Mandatory if enableWithdrawalNotice is true.

If provided, indicates how many days notice required prior to withdrawal.

validationPeriod
number <integer>

Mandatory if enableWithdrawalNotice is true.

If provided, indicates how many days ???.

withdrawalFeeForTransfers
boolean
Deprecated
Default: false

Indicates if fee applied for withdrawals.

feeAmount
number <decimal>
Deprecated

Used as an annual fee.

monthDayFormat
string
Deprecated

Joda time compatile date format for day-month used by feeOnMonthDay.

feeOnMonthDay
string
Deprecated

describe day and month of annual fee feeAmount using monthDayFormat.

charges
Array of arrays

The set of charge definitions applicable to this product.

minimumNegativeBalance
number <decimal>

Must be less than zero.

TBC

maximumPositiveBalance
number <decimal>

Must be greater than zero.

TBC

accountingRule
required
integer
Enum: 1 2

Indicates what type of accounting is enabled for this product.

Supported options are: 1=None 2=Cash Based Accounting

savingsControlAccountId
integer <integer64>

The id of a GL Account

savingsReferenceAccountId
integer <integer64>

The id of a GL Account

transfersInSuspenseAccountId
integer <integer64>

The id of a GL Account

interestOnSavingsAccountId
integer <integer64>

The id of a GL Account

incomeFromFeeAccountId
integer <integer64>

The id of a GL Account

incomeFromPenaltyAccountId
integer <integer64>

The id of a GL Account

overdraftPortfolioControlId
integer <integer64>

The id of a GL Account. Applicabe if allowOverdraft enabled.

incomeFromInterestId
integer <integer64>

The id of a GL Account.

writeOffAccountId
integer <integer64>

The id of a GL Account.

escheatLiabilityId
integer <integer64>

The id of a GL Account. Applicabe if isDormancyTrackingActive enabled.

incomeFromSmallPositiveBalanceId
integer <integer64>

The id of a GL Account. Applicabe if minimumNegativeBalance is set.

expenseFromSmallNegativeBalanceId
integer <integer64>

The id of a GL Account. Applicabe if maximumPositiveBalance is set.

Array of objects
Array of objects
Array of objects

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "name": "6 month Deposit",
  • "shortName": "FT01",
  • "description": "6 month fixed deposit with monthly compounding",
  • "currencyCode": "KES",
  • "digitsAfterDecimal": 0,
  • "inMultiplesOf": 1,
  • "productGroupId": 1,
  • "nominalAnnualInterestRate": 12.5,
  • "interestRateCharts": [
    ],
  • "interestPostingPeriodType": 4,
  • "interestCompoundingPeriodType": 4,
  • "interestCalculationType": 1,
  • "interestCalculationDaysInYearType": 1,
  • "minBalanceForInterestCalculation": 1,
  • "withHoldTax": false,
  • "taxGroupId": 1,
  • "lockinPeriodEnabled": true,
  • "lockinPeriodFrequency": 2,
  • "lockinPeriodFrequencyType": 2,
  • "minRequiredOpeningBalance": 500.5,
  • "enforceMinRequiredBalance": false,
  • "minRequiredBalance": 500.5,
  • "allowOverdraft": false,
  • "overdraftLimit": 1000,
  • "minOverdraftLimit": 1000,
  • "maxOverdraftLimit": 1000,
  • "nominalAnnualInterestRateOverdraft": 20,
  • "minNominalAnnualInterestRateOverdraft": 20,
  • "maxNominalAnnualInterestRateOverdraft": 20,
  • "minOverdraftForInterestCalculation": 10,
  • "isDormancyTrackingActive": false,
  • "daysToInactive": 90,
  • "daysToDormancy": 120,
  • "daysToEscheat": 120,
  • "calculateInterestDuringDormancy": false,
  • "stopInterestIfDormant": false,
  • "enableWithdrawalNotice": false,
  • "noticePeriod": 1,
  • "validationPeriod": 1,
  • "withdrawalFeeForTransfers": false,
  • "feeAmount": 10,
  • "monthDayFormat": "dd-MM",
  • "feeOnMonthDay": "01-04",
  • "charges": [ ],
  • "minimumNegativeBalance": -3.5,
  • "maximumPositiveBalance": 2.2,
  • "accountingRule": 2,
  • "savingsControlAccountId": 0,
  • "savingsReferenceAccountId": 0,
  • "transfersInSuspenseAccountId": 0,
  • "interestOnSavingsAccountId": 0,
  • "incomeFromFeeAccountId": 0,
  • "incomeFromPenaltyAccountId": 0,
  • "overdraftPortfolioControlId": 0,
  • "incomeFromInterestId": 0,
  • "writeOffAccountId": 0,
  • "escheatLiabilityId": 0,
  • "incomeFromSmallPositiveBalanceId": 0,
  • "expenseFromSmallNegativeBalanceId": 0,
  • "paymentChannelToFundSourceMappings": [
    ],
  • "feeToIncomeAccountMappings": [
    ],
  • "penaltyToIncomeAccountMappings": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Activate Savings Product

Activates closed savings product

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a Savings Product.

query Parameters
command
required
string
Example: command=activate

The activate command.

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 12,
  • "changes": {
    }
}

Close Savings Product

Close an active savings product

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a Savings Product.

query Parameters
command
required
string
Example: command=close

The close command.

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 12,
  • "changes": {
    }
}

Savings Account

Create new Savings Account

Used to create a new Savings Account

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required

Savings Accounts can be associated with a client or group but not both. The model is the same for client and group except for the clientId and groupId fields.

Any of
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

clientId
required
integer <integer64>

The id of an existing client this account is for.

productId
required
integer <integer64>

The id of associated product.

submittedOnDate
required
string <date>

The date that the account application was submited.

fieldOfficerId
integer <integer64>

The id of associated staff member that is a field officer.

externalId
string <= 100 characters

A place to put an external reference for this account e.g. The ID another system uses for it. If provided, it must be unique.

nominalAnnualInterestRate
integer <number>
interestCompoundingPeriodType
integer
interestPostingPeriodType
integer
interestCalculationType
integer
interestCalculationDaysInYearType
integer <number>
minRequiredOpeningBalance
number <decimal>
lockinPeriodFrequency
integer

If provided, overrides the same named setting from savings product. If the savings product lockinPeriodEnabled is false then this should not be null or not passed in the reqeust. Used along with lockinPeriodFrequencyType to indicate the length of time after opening that the account is 'locked' and withdrawals of any amount are not permitted e.g. 2 Months

lockinPeriodFrequencyType
integer

If provided, overrides the same named setting from savings product. If the savings product lockinPeriodEnabled is false then this should not be null or not passed in the reqeust. Used along with lockinPeriodFrequency to indicate the length of time after opening that the account is 'locked' and withdrawals of any amount are not permitted e.g. 2 Months

charges
Array of arrays

Responses

Request samples

Content type
application/json
Example
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "clientId": 1,
  • "productId": 1,
  • "submittedOnDate": "2022-12-01",
  • "fieldOfficerId": 1,
  • "externalId": "ABC-0001",
  • "nominalAnnualInterestRate": 2,
  • "interestCompoundingPeriodType": 1,
  • "interestPostingPeriodType": 4,
  • "interestCalculationType": 1,
  • "interestCalculationDaysInYearType": 360,
  • "minRequiredOpeningBalance": 1000,
  • "lockinPeriodFrequency": 2,
  • "lockinPeriodFrequencyType": 2,
  • "charges": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

List Savings Accounts

List Savings Accounts

See The Data Filter API for better approach for search/filter.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

search
string
Example: search=John Doe

'Searches (matching around) across:

  • Group name
  • Staff name
  • Client name
  • savings account number '
officeId
integer

The id of an office. Used to restrict to set of savings associated with the office.

externalId
string
Example: externalId=S00001

if provided only savings with this exact externalId will be returned

staffId
integer

id of a staff/savingsofficer, if provided will only return the savings linked to this staff id

groupId
integer

id of a group the savings belongs to, if provided will only return the savings linked to this group id

underHierarchy
string
Example: underHierarchy=.2.3

if provided only savings that exist under the hierarchy provided will be return (office + child offices)

orderBy
string
Enum: "id" "submittedon_date" "office_id" "account_no"

The database field name that you wish to order the list of savings by.

sortOrder
string
Enum: "ASC" "DESC"

Used with orderBy parameter, this indicates the sorting order of the attribute mentioned in orderBy. This parameter is ignored unless orderBy is provided also.

skipRowCount
boolean
Default: false
Example: skipRowCount=false

if true, does not return rowcount, improving search speed.

modifiedSinceTimestamp
integer
Example: modifiedSinceTimestamp=1634152729

Should be passed as a UNIX Timestamp.

When provided only savings accounts that have been created or updated since the provided timestamp are returned.

Savings accounts will be marked as modified whenever there is any modification to the savings account, its transactions, charges etc.

This parameter can be used in integrations to fetch changed data since a last fetch, timestamps will be treated as UTC and returned as UTC.

sqlSearch
string
Deprecated

Deprecated. Use other parameters such as search or See The Data Filter API for better approach for search/filter.

A valid sql fragment that will work with backend query for this api.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Find Savings by Id

Find a savings account by Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
accountId
required
integer <int64>
Example: 1

The unique identifer of a Savings Account.

query Parameters
staffInSelectedOfficeOnly
boolean
Default: false

loan officers of the office where the savingsaccount is registered.

chargeStatus
string
Default: "all"
Enum: "all" "active" "inactive"
Example: chargeStatus=all

filter savings to be return by account status

associations
string
Enum: "all" "withdrawalNotices" "charges" "linkedAccounts" "transactions" "standingInstructions" "loanhistoryofficer"
Example: associations=all

associated entity to be return

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Enable/Disable deposit lock

Used to enable or disable deposit lock on a savings account

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
accountId
required
integer <int64>
Example: 1

The unique identifer of a Savings Account.

Request Body schema: application/json
required
depositLock
boolean

Enable (true) or disable (false) deposit lock setting

Responses

Request samples

Content type
application/json
{
  • "depositLock": true
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Enable/Disable withdrawal lock

Used to enable or disable withdrawal lock on a savings account

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
accountId
required
integer <int64>
Example: 1

The unique identifer of a Savings Account.

Request Body schema: application/json
required
depositLock
boolean

Enable (true) or disable (false) withdrawal lock setting

Responses

Request samples

Content type
application/json
{
  • "depositLock": false
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

List Savings Account Locks

List all Savings account Locks by savings account id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
accountId
required
integer <int64>
Example: 1

The unique identifer of a Savings Account.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add Lock to Savings Account

Used to add a new lock to the savings account.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
accountId
required
integer <int64>
Example: 1

The unique identifer of a Savings Account.

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

note
string <= 1000 characters

An optional comment or note in relation to this command.

onHoldAmount
number <decimal>

Amount to hold on the savings account to prevent withdrawal

startDate
string <date>

The date the lock on the savings account is effective from (inclusive)

endDate
string <date>

The date when the lock on the savings account will be released optional (inclusive)

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "note": "A short note in relation to this.",
  • "onHoldAmount": 200,
  • "startDate": "2022-01-20",
  • "endDate": "2024-01-20"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Get Savings Account Lock by id

Used to get a Savings Account Lock

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
accountId
required
integer <int64>
Example: 1

The unique identifer of a Savings Account.

lockId
required
integer <int64>
Example: 1

The unique identifer of a lock.

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "onHoldAmount": 200,
  • "startDate": [
    ],
  • "endDate": [
    ],
  • "release": false,
  • "note": "A short note in relation to this.",
  • "auditData": {
    }
}

Update a Lock

Used to update existing lock

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
accountId
required
integer <int64>
Example: 1

The unique identifer of a Savings Account.

lockId
required
integer <int64>
Example: 1

The unique identifer of a lock.

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

onHoldAmount
number <decimal>

Amount to hold on the savings account to prevent withdrawal

startDate
string <date>

The date the lock on the savings account is effective from (inclusive)

endDate
string <date>

The date when the lock on the savings account will be released optional (inclusive)

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "onHoldAmount": 200,
  • "startDate": "2022-01-20",
  • "endDate": "2024-01-20"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Release a lock

Used to release lock on a savings account

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
accountId
required
integer <int64>
Example: 1

The unique identifer of a Savings Account.

lockId
required
integer <int64>
Example: 1

The unique identifer of a lock.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Delete a lock

Used to delete a lock on a savings account.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
accountId
required
integer <int64>
Example: 1

The unique identifer of a Savings Account.

lockId
required
integer <int64>
Example: 1

The unique identifer of a lock.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 12
}

FTD Product

Fixed Term Deposit are specialised savings accounts and support the following features:

  • Charges: fees or penalties can be setup
  • Accounting: cash based accounting for transactions on account
  • Deposit amount and term ranges
  • Term lock-in
  • Pre-Closure: support for pre-closure with or without penalty
  • Auto Renewal: configure to auto renew on Maturity
  • Interest Rates: can be described via multi-slab charts or as simple APR
  • Interest Calculation
  • Interest Posting and Witholding Tax
  • Transfer of interest to seperate linked account

Create New Fixed Term Deposit Product

The supported schema for creating a new fixed term deposit product.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

name
required
string [ 1 .. 100 ] characters

The full name of the product.

shortName
required
string = 4 characters

The short name of the product.

An abbreviated version of the name, used in reports or menus where space is limited.

description
required
string <= 500 characters

A description to provide users with more information about the product.

currencyCode
required
string <= 3 characters

Relates to the the currency of the product. A three character identifer of currency this product uses.

digitsAfterDecimal
required
integer

Relates to the the currency of the product. The number of digits after decimal to be supported on the currency.

inMultiplesOf
integer

Relates to the the currency of the product. Relevant for currencies where digitsAfterDecimal is zero. This will round the monetary amount to the nearest multiple.

productGroupId
integer <integer64>

The id of associated product group.

minDepositAmount
number <decimal>

The minimum size of any deposit under this product.

See also depositAmount and maxDepositAmount.

maxDepositAmount
number <decimal>

The maximum size of any deposit under this product.

See also depositAmount and minDepositAmount.

depositAmount
required
number <decimal>

Is the default amount that can be shown to users by when creating a new account using this product.

Its value must be within the range defined by minDepositAmount and maxDepositAmount.

minDepositTerm
required
number <integer>

Used together with minDepositTermTypeId to describe the minimum term of any account under this product. e.g 6 months

minDepositTermTypeId
integer
Enum: 0 1 2 3

The type of term period being described. e.g 6 months

Supported options are: 0=Days 1=Weeks 2=Months 3=Years

maxDepositTerm
number <integer>

Used together with maxDepositTermTypeId to describe the maximum term of any account under this product. e.g 12 months

maxDepositTermTypeId
integer
Enum: 0 1 2 3

The type of term period being described. e.g 6 months

Supported options are: 0=Days 1=Weeks 2=Months 3=Years

inMultiplesOfDepositTerm
number <integer>

Used together with inMultiplesOfDepositTermTypeId to describe the multiples of deposit term supported. e.g 2 months

inMultiplesOfDepositTermTypeId
integer
Enum: 0 1 2 3

The type of term period being described. e.g 2 months

Supported options are: 0=Days 1=Weeks 2=Months 3=Years

interestPostingPeriodType
required
integer
Enum: 4 5 6 7

Part of interest calculation settings.

Indicates how often interest is to be posted to the account.

Supported options are: 4=Monthly 5=Quarterly 6=Bi-Annualy 7=Annual

interestCompoundingPeriodType
required
integer
Enum: 4 5 6 7

Part of interest calculation settings.

Indicates how often interest is to be compounded.

Supported options are: 1=Daily 4=Monthly 5=Quarterly 6=Bi-Annualy 7=Annual

interestCalculationType
required
integer
Enum: 1 2

Part of interest calculation settings.

There are two methods to calculate the interest on a savings account: 1=Daily Balance 2=Average Balance

interestCalculationDaysInYearType
required
integer
Enum: 360 365

Part of interest calculation settings.

Supported options are: 1=360 2=365

lockinPeriodEnabled
boolean
Default: true

A boolean that indicates if lockin period feature is to be used by this product and accounts of this product.

if true, lockinPeriodFrequency and lockinPeriodFrequencyType should be provided and these properties will be used when creating a savings account (unless overridden at that stage).

if false,lockinPeriodFrequency and lockinPeriodFrequencyType should be left null or not passed at all in the request.

lockinPeriodFrequency
integer

If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the fixed deposit account is 'locked in' and premature closure is not allowed. e.g. 2 Months

lockinPeriodFrequencyType
integer
Enum: 0 1 2 3

If provided, used along with lockinPeriodFrequency to indicate the length of time that the fixed deposit account is 'locked in' and premature closure is not allowed. e.g. 2 Months

Supported options are: 0=Days 1=Weeks 2=Months 3=Years

Array of objects (SavingsInterestRateChart)
withHoldTax
boolean
Default: false

A boolean that indicates if withholding tax is configured.

if true interest posted to accounts of this product with have a withholding tax applied based on amount of interest posted.

The withholding tax is shown as an additional transaction on the account.

taxGroupId
integer <integer64>

The id of associated tax group.

Required if withHoldTax is set to true.

autoRenewOnClosure
boolean
Default: false

A boolean that indicates if accounts of this product should be renewed upon reaching maturity.

Fixed Term Deposit accounts are moved are checked by end of day process that is scheduled to run every night.

preClosurePenalApplicable
boolean
Default: false

A boolean that indicates if penalty is to be applied on pre-closure of accounts of this product.

preClosurePenalInterest
number <decimal>
Deprecated

The interest rate to use in case of pre-closure greater than preClosureEarlyPenalInterestTerm rate e.g. 5% Per annum

preClosurePenalInterestOnTypeId
integer
Deprecated
Enum: 1 2

Indicates how the preClosurePenalInterest is to be applied.

Supported options are: 1=Whole Term 2=Until Premature Withdrawal

preClosureEarlyPenalInterest
number <decimal>
Deprecated

The interest rate to use in case of pre-closure less than preClosureEarlyPenalInterestTerm rate e.g. 10% Per annum

preClosureEarlyPenalInterestTerm
number <decimal>
Deprecated

The percentage rate to use to determine preClosurePenalInterest or preClosureEarlyPenalInterest to apply e.g. 50% of preclosure

charges
Array of arrays

The set of charge definitions applicable to this product.

accountingRule
required
integer
Enum: 1 2

Indicates what type of accounting is enabled for this product.

Supported options are: 1=None 2=Cash Based Accounting

savingsControlAccountId
integer <integer64>

The id of a GL Account

savingsReferenceAccountId
integer <integer64>

The id of a GL Account

transfersInSuspenseAccountId
integer <integer64>

The id of a GL Account

interestOnSavingsAccountId
integer <integer64>

The id of a GL Account

incomeFromFeeAccountId
integer <integer64>

The id of a GL Account

incomeFromPenaltyAccountId
integer <integer64>

The id of a GL Account

Array of objects
Array of objects
Array of objects

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "name": "6 month Deposit",
  • "shortName": "FT01",
  • "description": "6 month fixed deposit with monthly compounding",
  • "currencyCode": "KES",
  • "digitsAfterDecimal": 0,
  • "inMultiplesOf": 1,
  • "productGroupId": 1,
  • "minDepositAmount": 1000,
  • "maxDepositAmount": 5000,
  • "depositAmount": 1000,
  • "minDepositTerm": 6,
  • "minDepositTermTypeId": 2,
  • "maxDepositTerm": 12,
  • "maxDepositTermTypeId": 2,
  • "inMultiplesOfDepositTerm": 2,
  • "inMultiplesOfDepositTermTypeId": 2,
  • "interestPostingPeriodType": 4,
  • "interestCompoundingPeriodType": 4,
  • "interestCalculationType": 1,
  • "interestCalculationDaysInYearType": 1,
  • "lockinPeriodEnabled": true,
  • "lockinPeriodFrequency": 2,
  • "lockinPeriodFrequencyType": 2,
  • "charts": [
    ],
  • "withHoldTax": false,
  • "taxGroupId": 1,
  • "autoRenewOnClosure": false,
  • "preClosurePenalApplicable": false,
  • "preClosurePenalInterest": 5,
  • "preClosurePenalInterestOnTypeId": 2,
  • "preClosureEarlyPenalInterest": 5,
  • "preClosureEarlyPenalInterestTerm": 5,
  • "charges": [ ],
  • "accountingRule": 2,
  • "savingsControlAccountId": 0,
  • "savingsReferenceAccountId": 0,
  • "transfersInSuspenseAccountId": 0,
  • "interestOnSavingsAccountId": 0,
  • "incomeFromFeeAccountId": 0,
  • "incomeFromPenaltyAccountId": 0,
  • "paymentChannelToFundSourceMappings": [
    ],
  • "feeToIncomeAccountMappings": [
    ],
  • "penaltyToIncomeAccountMappings": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find Product by Id

Find a fixed term deposit product by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a fixed term deposit product.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

FTD Account

Create New Fixed Term Deposit Account

The supported schema for creating a new fixed term deposit account.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

productId
required
integer <integer64>

The id of associated product.

clientId
required
integer <integer64>

The id of an existing client this account is for.

groupId
integer <integer64>

The id of an existing group this account is for.

fieldOfficerId
integer <integer64>

The id of associated staff member that is a field officer.

externalId
string <= 100 characters

A place to put an external reference for this account e.g. The ID another system uses for it. If provided, it must be unique.

submittedOnDate
required
string <date>

The date that the account application was submited.

depositAmount
required
number <decimal>

Is the amount deposited when setting up the account.

Its value must be within the range defined by minDepositAmount and maxDepositAmount on the associated product.

depositPeriod
required
number <integer>

Used together with depositPeriodFrequencyId to describe the length of the fixed term e.g 6 months

depositPeriodFrequencyId
required
integer
Enum: 0 1 2 3

The type of term period being described. e.g 6 months

Supported options are: 0=Days 1=Weeks 2=Months 3=Years

interestPostingPeriodType
integer
Enum: 4 5 6 7

Part of interest calculation settings.

Indicates how often interest is to be posted to the account.

If provided it overrides the setting on the product, otherwise the account inherits from the product.

Supported options are: 4=Monthly 5=Quarterly 6=Bi-Annualy 7=Annual

interestCompoundingPeriodType
integer
Enum: 4 5 6 7

Part of interest calculation settings.

Indicates how often interest is to be compounded.

If provided it overrides the setting on the product, otherwise the account inherits from the product.

Supported options are: 1=Daily 4=Monthly 5=Quarterly 6=Bi-Annualy 7=Annual

interestCalculationType
integer
Enum: 1 2

Part of interest calculation settings.

If provided it overrides the setting on the product, otherwise the account inherits from the product.

There are two methods to calculate the interest on a savings account: 1=Daily Balance 2=Average Balance

interestCalculationDaysInYearType
integer
Enum: 360 365

Part of interest calculation settings.

If provided it overrides the setting on the product, otherwise the account inherits from the product.

Supported options are: 1=360 2=365

lockinPeriodFrequency
integer

If provided, overrides the same named setting from product.

If the savings product lockinPeriodEnabled is false then this should not be null or not passed in the reqeust.

Used along with lockinPeriodFrequencyType to indicate the length of time that the fixed deposit account is 'locked in' and premature closure is not allowed. e.g. 2 Months

If provided it overrides the setting on the product, otherwise the account inherits from the product.

lockinPeriodFrequencyType
integer
Enum: 0 1 2 3

If provided, overrides the same named setting from product.

If the savings product lockinPeriodEnabled is false then this should not be null or not passed in the reqeust.

Used along with lockinPeriodFrequency to indicate the length of time that the fixed deposit account is 'locked in' and premature closure is not allowed. e.g. 2 Months

If provided it overrides the setting on the product, otherwise the account inherits from the product.

Supported options are: 0=Days 1=Weeks 2=Months 3=Years

chartId
integer

The id of an existing interest rate chart associated with product.

If omitted, then an applicable interest rate chart will be looked for on the associated product based on the submittedOnDate.

autoRenewOnClosure
boolean
Default: false

A boolean that indicates if accounts of this product should be renewed upon reaching maturity.

preClosurePenalApplicable
boolean
Default: false

A boolean that indicates if penalty is to be applied on pre-closure of accounts of this product.

preClosurePenalInterest
number

The interest rate to use in case of pre-closure e.g. 5% Per annum

preClosurePenalInterestOnTypeId
integer
Enum: 1 2

Indicates how the preClosurePenalInterest is to be applied.

Supported options are: 1=Whole Term 2=Until Premature Withdrawal

charges
Array of arrays

The set of charge definitions applicable to this account.

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "productId": 1,
  • "clientId": 1,
  • "groupId": 1,
  • "fieldOfficerId": 1,
  • "externalId": "ABC-0001",
  • "submittedOnDate": "2022-12-01",
  • "depositAmount": 1000,
  • "depositPeriod": 6,
  • "depositPeriodFrequencyId": 2,
  • "interestPostingPeriodType": 4,
  • "interestCompoundingPeriodType": 4,
  • "interestCalculationType": 1,
  • "interestCalculationDaysInYearType": 1,
  • "lockinPeriodFrequency": 2,
  • "lockinPeriodFrequencyType": 2,
  • "chartId": 0,
  • "autoRenewOnClosure": false,
  • "preClosurePenalApplicable": false,
  • "preClosurePenalInterest": 5,
  • "preClosurePenalInterestOnTypeId": 2,
  • "charges": [ ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Share Product

List Share Product

List all Share Products

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new Share Product

Musoni allows for the creation of multiple share products.

Whilst many will only need one share product, some organisations will require multiple types of share accounts (e.g. common shares, preferred shares)

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string <= 200 characters

The name of the product.

shortName
required
string <= 4 characters

A short name of the product that can be used on reports.

description
required
string

A description to provide users with more information about the product.

externalId
string <= 100 characters

A place to put an external reference for this resource e.g. The ID another system uses for it. If provided, it must be unique.

locale
required
string

The locale to use when interpreting number and date fields in the request.

currencyCode
required
string <= 3 characters

Relates to the the currency of the share product. A three character identifer of currency this shares product uses.

digitsAfterDecimal
required
integer

Relates to the the currency of the share product. The number of digits after decimal to be supported on the currency.

inMultiplesOf
integer

Relates to the the currency of the share product. Relevant for currencies where digitsAfterDecimal is zero. This will round the monetary amount to the nearest multiple.

totalShares
required
number <integer64>

The total number of shares available for this product.

sharesIssued
required
number <integer64>

The total number of shares that is allowed to be issued to client share accounts.

unitPrice
required
number <decimal>

The price of each share at the time of product creation.

minimumShares
number <integer64>

The minimum number of shares a client is allowed to purchase when setting up share account.

nominalShares
required
number <integer64>

The suggested default number of shares to set when purchasing shares.

maximumShares
number <integer64>

The maximum number of shares that a client share account is allowed to have any given point in time.

allowDividendCalculationForInactiveClients
boolean
Default: false

Related to dividend calculation.

Indicates if share accounts closed within the dividend period should be taken into account when calculating the dividend.

minimumActivePeriodForDividends
number <integer32>

Related to dividend calculation.

The minimum number of days a share purchase transaction must exist for before being included in dividend calculation.

This parameter is used together with minimumActivePeriodFrequencyType to indicate this length of time. e.g 5 Days

minimumActivePeriodFrequencyType
integer
Value: 0

The period frequency type e.g Days At present only the period type Days (0=Days) is only supported.

The minimum number of days a share purchase transaction must exist for before being included in dividend calculation.

This parameter is used together with minimumActivePeriodForDividends to indicate this length of time.

lockinPeriodFrequency
number <integer32>

The lock-in period is the minimum amount of time that a member is required to own the shares before they can redeem the shares.

This parameter is used together with lockinPeriodFrequencyType to indicate this length of time.

lockinPeriodFrequencyType
integer
Enum: 0 1 2 3

The lock-in period frequency type e.g Days Supported options are: 0=Days 1=Weeks 2=Months 3=Years

The lock-in period is the minimum amount of time that a member is required to own the shares before they can redeem the shares.

This parameter is used together with lockinPeriodFrequencyType to indicate this length of time.

accountingRule
required
integer
Enum: 1 2

Indicates whether Cash Based Accounting should be used with Shares or not.

Supported options are: 1=None 2=Cash Based Accounting

shareReferenceId
number <integer64>

The unique id of a General Ledger account. Mandatory if accountingRule=2.

shareSuspenseId
number <integer64>

The unique id of a General Ledger account. Mandatory if accountingRule=2.

incomeFromFeeAccountId
number <integer64>

The unique id of a General Ledger account. Mandatory if accountingRule=2.

shareEquityId
number <integer64>

The unique id of a General Ledger account. Mandatory if accountingRule=2.

Array of objects
Array of objects

Responses

Request samples

Content type
application/json
{
  • "name": "SACCO Shares Product",
  • "shortName": "PR01",
  • "description": "Annual Dividend Shares",
  • "externalId": "SHP-0001",
  • "locale": "en",
  • "currencyCode": "KES",
  • "digitsAfterDecimal": 2,
  • "inMultiplesOf": 10,
  • "totalShares": "1,000,000",
  • "sharesIssued": "300,000",
  • "unitPrice": 1,
  • "minimumShares": 100,
  • "nominalShares": 100,
  • "maximumShares": 1000,
  • "allowDividendCalculationForInactiveClients": false,
  • "minimumActivePeriodForDividends": 10,
  • "minimumActivePeriodFrequencyType": 0,
  • "lockinPeriodFrequency": 3,
  • "lockinPeriodFrequencyType": 2,
  • "accountingRule": 2,
  • "shareReferenceId": 1,
  • "shareSuspenseId": 2,
  • "incomeFromFeeAccountId": 3,
  • "shareEquityId": 4,
  • "chargesSelected": [
    ],
  • "marketPricePeriods": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Query for Share Product template

Query for Share Product template to support forms on share product behaviour.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • { }
]

Find Share Product by Id

Find share product by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a share product.

Responses

Response samples

Content type
application/json
{
  • "id": 4709,
  • "name": "SACCO Shares Product",
  • "shortName": "Doe",
  • "description": "Annual Dividend Shares",
  • "externalId": "SHP-0001",
  • "currency": {
    },
  • "totalShares": "1,000,000",
  • "sharesIssued": "300,000",
  • "unitPrice": 1,
  • "shareCapital": 1000.5,
  • "minimumShares": 100,
  • "nominalShares": 100,
  • "maximumShares": 1000,
  • "allowDividendCalculationForInactiveClients": false,
  • "minimumActivePeriod": 10,
  • "minimumActivePeriodForDividendsTypeEnum": 0,
  • "lockinPeriod": 3,
  • "lockPeriodTypeEnum": {
    },
  • "accountingRule": {
    },
  • "accountingMappings": {
    },
  • "charges": [ ],
  • "marketPrice": [
    ]
}

Update existing share product.

Update existing share product.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a share product.

Request Body schema: application/json
required

Update exisiting share product

name
string <= 200 characters

The name of the product.

shortName
string <= 4 characters

A short name of the product that can be used on reports.

description
string

A description to provide users with more information about the product.

externalId
string <= 100 characters

A place to put an external reference for this resource e.g. The ID another system uses for it. If provided, it must be unique.

locale
string

The locale to use when interpreting number and date fields in the request.

currencyCode
string <= 3 characters

Relates to the the currency of the share product. A three character identifer of currency this shares product uses.

digitsAfterDecimal
integer

Relates to the the currency of the share product. The number of digits after decimal to be supported on the currency.

inMultiplesOf
integer

Relates to the the currency of the share product. Relevant for currencies where digitsAfterDecimal is zero. This will round the monetary amount to the nearest multiple.

totalShares
number <integer64>

The total number of shares available for this product.

sharesIssued
number <integer64>

The total number of shares allowed to be issued at this point in time.

unitPrice
number <decimal>

The price of each share at the time of product creation.

minimumShares
number <integer64>

The minimum number of shares allowed per client.

nominalShares
number <integer64>

The default number of shares allowed per client.

maximumShares
number <integer64>

The maximum number of shares allowed per client.

allowDividendCalculationForInactiveClients
boolean
Default: false

Indicates if inactive clients should be taken into account when calculating dividend

minimumActivePeriodForDividends
number <integer32>

The minimum amount of time that a member must own shares before they are eligible for dividend payments.

This parameter is used together with minimumActivePeriodFrequencyType to indicate this length of time.

minimumActivePeriodFrequencyType
integer
Value: 0

The period frequency type e.g Days At present only the period type Days (0=Days) is only supported.

The minimum amount of time that a member must own shares before they are eligible for dividend payments.

This parameter is used together with minimumActivePeriodForDividends to indicate this length of time.

lockinPeriodFrequency
number <integer32>

The lock-in period is the minimum amount of time that a member is required to own the shares before they can transfer or redeem the shares.

This parameter is used together with lockinPeriodFrequencyType to indicate this length of time.

lockinPeriodFrequencyType
integer
Enum: 0 1 2 3

The lock-in period frequency type e.g Days Supported options are: 0=Days 1=Weeks 2=Months 3=Years

The lock-in period is the minimum amount of time that a member is required to own the shares before they can transfer or redeem the shares.

This parameter is used together with lockinPeriodFrequencyType to indicate this length of time.

accountingRule
integer
Enum: 1 2

Indicates whether Cash Based Accounting should be used with Shares or not.

Supported options are: 1=None 2=Cash Based Accounting

shareReferenceId
number <integer64>

The unique id of a General Ledger account. Mandatory if accountingRule=2.

shareSuspenseId
number <integer64>

The unique id of a General Ledger account. Mandatory if accountingRule=2.

incomeFromFeeAccountId
number <integer64>

The unique id of a General Ledger account. Mandatory if accountingRule=2.

shareEquityId
number <integer64>

The unique id of a General Ledger account. Mandatory if accountingRule=2.

Array of objects
Array of objects

Responses

Request samples

Content type
application/json
{
  • "name": "SACCO Shares Product",
  • "shortName": "Doe",
  • "description": "Annual Dividend Shares",
  • "externalId": "SHP-0001",
  • "locale": "en",
  • "currencyCode": "KES",
  • "digitsAfterDecimal": 2,
  • "inMultiplesOf": 10,
  • "totalShares": "1,000,000",
  • "sharesIssued": "300,000",
  • "unitPrice": 1,
  • "minimumShares": 100,
  • "nominalShares": 100,
  • "maximumShares": 1000,
  • "allowDividendCalculationForInactiveClients": false,
  • "minimumActivePeriodForDividends": 10,
  • "minimumActivePeriodFrequencyType": 0,
  • "lockinPeriodFrequency": 3,
  • "lockinPeriodFrequencyType": 2,
  • "accountingRule": 2,
  • "shareReferenceId": 1,
  • "shareSuspenseId": 2,
  • "incomeFromFeeAccountId": 3,
  • "shareEquityId": 4,
  • "chargesSelected": [
    ],
  • "marketPricePeriods": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Share Product Dividend

List Share Product Dividend Periods

List all Share Product Dividend Periods

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a share product.

query Parameters
offset
required
integer <int32> >= 0
Default: 0
Example: offset=0

Pagination related. The starting record value.

limit
required
integer <int32> [ 10 .. 200 ]
Default: 10
Example: limit=10

Pagination related. The page size of results to be returned.

orderBy
string
Example: orderBy=accountNo

Used to sort the response by the selected field.

The name provided is an sql complian field name that exists on resources underlying database table: see m_share_product_dividend_pay_out

sortOrder
string
Enum: "ASC" "DESC"
Example: sortOrder=ASC

Used together with the orderBy field to sort the response by the selected field. If orderBy is not provided then this parameter is ignored.

status
integer <int32>
Enum: 100 200

Restrict response to tasks with status matching this value. 100=INITIATED, 300=APPROVED

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 52,
  • "pageItems": [
    ]
}

Create new Share Product Dividend Period

On creation the dividend payout details at share product and account level will be automatically calculated based on the dividend amount and periods provided.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a share product.

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

dividendAmount
required
number <decimal>

The full declared dividend amount for the period.

dividendPeriodStartDate
required
string <date>

The start date the dividend period; structured as an array of date parts including year, month, day.

dividendPeriodEndDate
required
string <date>

The end date the dividend period; structured as an array of date parts including year, month, day.

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "dividendAmount": 1000.5,
  • "dividendPeriodStartDate": "2019-08-24",
  • "dividendPeriodEndDate": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

List Share Account Dividend Details by Period Id

List Share Account Dividend Details by Period Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a share product.

dividendId
required
integer <int64>
Example: 1

The unique identifer of a share product dividend period.

Responses

Response samples

Content type
application/json
{
  • "id": 104,
  • "accountData": {
    },
  • "amount": 1000.5,
  • "status": {
    }
}

Approve existing share product dividend period

On creation of the dividend payout details are calculated for the period provided.

This API approves these details making them eligible for dividends to be posted to each individul client savings account.

The posting of dividends to the clients savings account happens in a scheduled job (typically an overnight process).

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a share product.

dividendId
required
integer <int64>
Example: 1

The unique identifer of a share product dividend period.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Delete share product dividend period

On creation of the dividend payout details are calculated for the period provided.

These details can be deleted so long as the dividend period is not in an approved state.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a share product.

dividendId
required
integer <int64>
Example: 1

The unique identifer of a share product dividend period.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Share Account

List Share Accounts

List all Share Accounts

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

officeId
integer

The id of an office. Used to restrict to set of accounts associated with the office.

staffId
integer

The id of a staff. If provided will only return the accounts linked to this staff member.

search
string
Example: search=John Doe

Searches (matching around) across:

  • Staff name
  • Client name
  • account number
status
integer
Default: 300
Enum: 100 200 300 500 600
Example: status=300

Used to restrict the search to share accounts whoose status (code) matches the status code provided.

sortBy
string

Expects a valid SQL fragment that used in order by section of SQL statement.

e.g.
g.account_no DESC
g.submitted_date DESC

modifiedSinceTimestamp
integer
Example: modifiedSinceTimestamp=1634152729

Should be passed as a UNIX Timestamp.

When provided only share accounts that have been created or updated since the provided timestamp are returned.

Shares accounts will be marked as modified whenever there is any modification to the share account, transactions etc.

This parameter can be used in integrations to fetch changed data since a last fetch, timestamps will be treated as UTC and returned as UTC.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new Share Account

When a new share account is created, a purchase transaction is automatically created.

The fields related to the purchase transaction are:

  • applicationDate
  • requestedShares
  • purchaseFromLinkedSavingsAccount
Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
clientId
required
integer

The id of the client this share account is associated with.

productId
required
integer

The id of the share product this share account is associated with.

savingsAccountId
required
integer

The id of the savings account this share account is associated with.

Array of objects
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

submittedDate
required
string <date>

The date that the share account application was submited.

applicationDate
required
string <date>

The date used as the transaction date of initial purchase transaction that occurs on share account creation.

requestedShares
required
number

The number of shares to be purchased as part of initial purchase transaction that occurs on share account creation.

purchaseFromLinkedSavingsAccount
boolean
Default: false

A boolean that indicates if money is taken from the linked savings account or not for the initial purchase transaction that occurs on share account creation.

minimumActivePeriod
number <integer32>

The minimum amount of time that a member must own shares before they are eligible for dividend payments.

This parameter is used together with minimumActivePeriodFrequencyType to indicate this length of time.

minimumActivePeriodFrequencyType
integer
Value: 0

The period frequency type e.g Days At present only the period type Days (0=Days) is only supported.

The minimum amount of time that a member must own shares before they are eligible for dividend payments.

This parameter is used together with minimumActivePeriodForDividends to indicate this length of time.

lockinPeriodFrequency
number <integer32>

The lock-in period is the minimum amount of time that a member is required to own the shares before they can transfer or redeem the shares.

This parameter is used together with lockinPeriodFrequencyType to indicate this length of time.

lockinPeriodFrequencyType
integer
Enum: 0 1 2 3

The lock-in period frequency type e.g Days Supported options are: 0=Days 1=Weeks 2=Months 3=Years

The lock-in period is the minimum amount of time that a member is required to own the shares before they can transfer or redeem the shares.

This parameter is used together with lockinPeriodFrequencyType to indicate this length of time.

allowDividendCalculationForInactiveClients
boolean
Default: false

Indicates if inactive clients should be taken into account when calculating dividend

Responses

Request samples

Content type
application/json
{
  • "clientId": 1,
  • "productId": 1,
  • "savingsAccountId": 1,
  • "charges": [ ],
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "submittedDate": "2020-01-15",
  • "applicationDate": "2020-01-15",
  • "requestedShares": 3,
  • "purchaseFromLinkedSavingsAccount": false,
  • "minimumActivePeriod": 10,
  • "minimumActivePeriodFrequencyType": 0,
  • "lockinPeriodFrequency": 3,
  • "lockinPeriodFrequencyType": 2,
  • "allowDividendCalculationForInactiveClients": false
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Account Transfers

Enables the transfer of monetary funds from one account to another.

At present the following account transfers are supported:

  • Savings to Savings
  • Savings to Fixed Term Deposit
  • Savings to Loan
  • Loan to Savings

List Account Transfers

List all account transfers

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

orderBy
string

The database field name that you wish to order the list of account transfers by.

It must also include the alias used in the generated query:

  • att.id (id)
  • att.is_reversed (isReversed)
  • att.transaction_date (transferDate)
  • att.amount (transferAmount)
  • att.description (transferDescription)
  • att.currency_code (currencyCode)
  • att.account_transfer_details_id (accountDetailId)
  • fromoff.id (fromOfficeId)
  • fromoff.name (fromOfficeName)
  • tooff.id (toOfficeId)
  • tooff.name (toOfficeName)
  • fromclient.id (fromClientId)
  • fromclient.display_name (fromClientName)
  • toclient.id (toClientId)
  • toclient.display_name (toClientName)
  • fromGroup.id (fromGroupId)
  • fromGroup.display_name (fromGroupName)
  • toGroup.id (toGroupId)
  • toGroup.display_name (toGroupName)
  • fromSavingsProduct.name (fromSavingsProductName)
  • toSavingsProduct.name (toSavingsProductName)
  • fromsavacc.id (fromSavingsAccountId)
  • fromsavacc.account_no (fromSavingsAccountNo)
  • fromsavacc.deposit_type_enum (fromSavingAccountTypeEnum)
  • tosavacc.id (toSavingsAccountId)
  • tosavacc.account_no (toSavingsAccountNo)
  • tosavacc.deposit_type_enum (toSavingAccountTypeEnum)
  • fromloanacc.id (fromLoanAccountId)
  • fromloanacc.account_no (fromLoanAccountNo)
  • toloanacc.id (toLoanAccountId)
  • toloanacc.account_no (toLoanAccountNo)
  • fromsavtran.id (fromSavingsAccountTransactionId)
  • fromsavtran.transaction_type_enum (fromSavingsAccountTransactionType)
  • tosavtran.id (toSavingsAccountTransactionId)
  • tosavtran.transaction_type_enum (toSavingsAccountTransactionType)
  • toshareacc.id (toShareAccountId)
  • toshareacc.account_no (toShareAccountNo)
sortOrder
string
Enum: "ASC" "DESC"
  • ASC - Ascending, from A to Z
  • DESC - Descending, from Z to A

Used with orderBy parameter, this indicates the sorting order of the attribute mentioned in orderBy.

This parameter is ignored unless orderBy is provided also.

accountDetailId
integer

if passed restricts the results to account transfer transactions that have this same “account details id” accountDetailId (see att.account_transfer_details_id (accountDetailId) field in orderBy )

Note: There are two transactions related to each account transfer so when passing an accountDetailId its possible to get back both transactions that make up the account transfer.

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 52,
  • "pageItems": [
    ]
}

Create new Account Transfer

Ability to create new transfer of monetary funds from one account to another.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

transferAmount
required
number <decimal>

The amount of the transfer.

transferDate
required
string <date>

The date the account transfer is in effect from.

transferDescription
required
string

A description or note associated with the transfer.

fromOfficeId
required
integer

Unique id representing the office.

fromClientId
integer

Unique id representing the client.

fromGroupId
integer

Unique id representing the group.

fromAccountType
required
integer <integer64>

Unique id representing the account type.

Account types:

  • 1 = Loan Account
  • 2 = Savings Account
  • 6 = Shares Account
fromAccountId
required
integer <integer64>

An id representing the account to which the source of the transfer. Used together with fromAccountId to describe the account.

toOfficeId
required
integer

Unique id representing the office.

toClientId
integer

Unique id representing the client.

toGroupId
integer

Unique id representing the group.

toAccountType
required
integer <integer64>

Unique id representing the account type.

Account types:

  • 1 = Loan Account
  • 2 = Savings Account
  • 6 = Shares Account
toAccountId
required
integer <integer64>

An id representing the account to which the transfer is going to. Used together with toAccountType to describe the account.

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "yyyy-MM-dd",
  • "transferAmount": 5000,
  • "transferDate": "2020-01-15",
  • "transferDescription": "Transfer from loan to savings via disbursement.",
  • "fromOfficeId": 2,
  • "fromClientId": 2,
  • "fromGroupId": 2,
  • "fromAccountType": 2,
  • "fromAccountId": 2,
  • "toOfficeId": 2,
  • "toClientId": 2,
  • "toGroupId": 2,
  • "toAccountType": 2,
  • "toAccountId": 2
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find by Id

Find account transfer transaction by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of an account transfer transaction.

Responses

Response samples

Content type
application/json
{
  • "id": 4709,
  • "reversed": false,
  • "currency": { },
  • "transferAmount": 5000,
  • "transferDate": [
    ],
  • "transferDescription": "Transfer from loan to savings via disbursement.",
  • "fromOffice": {
    },
  • "fromClient": {
    },
  • "fromGroup": {
    },
  • "fromAccountType": {
    },
  • "fromAccount": {
    },
  • "toOffice": {
    },
  • "toClient": {
    },
  • "toGroup": {
    },
  • "toAccountType": {
    },
  • "toAccount": {
    }
}

Standing Instructions

Standing instructions (aka standing orders) refer to instructions an account holder ("the payer") gives to his or her financial institute to pay a set amount at regular intervals to another's ("the payee's") account.

At present the following scenarios support standing instructions:

  • Account Transfer from savings account to savings account
  • Loan Repayment from savings account to loan Account
  • Share repurchase from savings account to share account

List Standing Instructions

List all Standing Instructions

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

orderBy
string

The database field name that you wish to order the list of standing instructions by.

It must also include the alias used in the generated query:

  • atsi.id (id)
  • atsi.name (name)
  • atsi.priority (priority)
  • atsi.status (status)
  • atsi.instruction_type (instructionType)
  • atsi.amount (amount)
  • atsi.valid_from (validFrom)
  • atsi.valid_till (validTill)
  • atsi.recurrence_type (recurrenceType)
  • atsi.recurrence_frequency (recurrenceFrequency)
  • atsi.recurrence_interval (recurrenceInterval)
  • atsi.recurrence_on_day (recurrenceOnDay)
  • atsi.recurrence_on_month (recurrenceOnMonth)
  • atsi.recurrence_on_last_day_of_month (recurrenceOnLastDayOfMonth)
  • atsi.maximum_iterations (maximumIteration)
  • atd.id (accountDetailId)
  • atd.transfer_type (transferType)
  • fromoff.id (fromOfficeId)
  • fromoff.name (fromOfficeName)
  • tooff.id (toOfficeId)
  • tooff.name (toOfficeName)
  • fromclient.id (fromClientId)
  • fromclient.display_name (fromClientName)
  • fromgroup.id (fromGroupId)
  • fromgroup.display_name (fromGroupName)
  • toclient.id (toClientId)
  • toclient.display_name (toClientName)
  • togroup.id (toGroupId)
  • togroup.display_name (toGroupName)
  • fromsavacc.id (fromSavingsAccountId)
  • fromsavacc.account_no (fromSavingsAccountNo)
  • fromsp.id (fromProductId)
  • fromsp.name (fromProductName)
  • fromloanacc.id (fromLoanAccountId)
  • fromloanacc.account_no (fromLoanAccountNo)
  • fromlp.id (fromLoanProductId)
  • fromlp.name (fromLoanProductName)
  • tosavacc.id (toSavingsAccountId)
  • tosavacc.account_no (toSavingsAccountNo)
  • tosp.id (toProductId)
  • tosp.name (toProductName)
  • toloanacc.id (toLoanAccountId)
  • toloanacc.account_no (toLoanAccountNo)
  • toshareacc.id (toShareAccountId)
  • toshareacc.account_no (toShareAccountNo)
  • toshp.id (toShareProductId)
  • toshp.name (toShareProductName)
  • tolp.id (toLoanProductId)
  • tolp.name (toLoanProductName)
sortOrder
string
Enum: "ASC" "DESC"
  • ASC - Ascending, from A to Z
  • DESC - Descending, from Z to A

Used with orderBy parameter, this indicates the sorting order of the attribute mentioned in orderBy.

This parameter is ignored unless orderBy is provided also.

transferType
integer
Enum: 1 2 3 4 5
Example: transferType=2

Used to restrict the search to standing instructions that match the transferType provided.

Options include:

  • 1 = Account Transfer
  • 2 = Loan Repayment
  • 3 = Charge Payment
  • 4 = Interest Transfer
  • 5 = Share Purchase
clientId
integer

The id of a client. Used to restrict to set of standing instructions where the from account is associated with the client.

clientName
integer

The name of a client. Used to restrict to set of standing instructions where the from account has a client that has a name that exactly matches.

groupId
integer

The id of a group. Used to restrict to set of standing instructions where the from account is associated with the group.

groupName
integer

The name of a group. Used to restrict to set of standing instructions where the from account has a group that has a name that exactly matches.

fromAccountType
integer
Enum: 1 2 6
Example: fromAccountType=2

The account type of the account refered to by fromAccountId.

This parameter is required if fromAccountId is provided.

Used to restrict the search to standing instructions that match the transferType provided.

Options include:

  • 1 = Loan Account
  • 2 = Savings Account
  • 6 = Shares Account
fromAccountId
integer

The id of an account. Used to restrict to set of standing instructions where the from account matches.

This parameter is required if fromAccountType is provided.

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 52,
  • "pageItems": [
    ]
}

Create new Standing Instruction

Ability to create new instruction for transfer of monetary funds from one account to another.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string [ 1 .. 250 ] characters

A unique name assigned to identify the standing instruction.

transferType
required
integer
Enum: 1 2 3 4 5

The id of a transfer type enumeration.

Options include:

  • 1 = Account Transfer
  • 2 = Loan Repayment
  • 3 = Charge Payment
  • 4 = Interest Transfer
  • 5 = Share Purchase
priority
required
integer
Enum: 1 2 3 4

The id of a priority enumeration.

Options include:

  • 1 = Ugent
  • 2 = High
  • 3 = Medium
  • 4 = Low
status
required
integer
Enum: 1 2 3

The id of a status enumeration.

Options include:

  • 1 = Active
  • 2 = Disabled
  • 3 = Deleted
instructionType
required
integer
Enum: 1 2

The id of a instruction type enumeration.

Options include:

  • 1 = Fixed
  • 2 = Dues
amount
number <decimal>

The amount of the standing instruction.

Mandatory if instructionType=1 (Fixed)

validFrom
required
string <date>

The date the standing instruction is in effect from.

validTo
string <date>

The date the standing instruction is no longer in effect.

locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

recurrenceType
required
integer
Enum: 1 2

Options include:

  • 1 = Periodic
  • 2 = As Per Dues
recurrenceFrequency
number <integer32>
Enum: 0 1 2 3

Used with recurrenceInterval and recurrenceFrequency to describe the recurrence pattern of the standing instruction.

Mandatory if recurrenceType=1 (Periodic)

Example Values:

  • 0=Days
  • 1=Weeks
  • 2=Months
  • 3=Years
recurrenceInterval
number <integer>

Used in combination with recurrenceType to describe the interval at which the standing instruction is executed. e.g every 1 Month(s)

Mandatory if recurrenceType=1 (Periodic)

recurrenceOnMonthDay
Array of arrays

If recurrenceFrequency is Months, is used to indicates the day of the month the instruction is scheduled to be executed on.

Used in combination with recurrenceInterval and recurrenceType to describe the interval at which the standing instruction is executed. e.g every 1 Month(s) on 4th.

recurrenceOnLastDayOfMonth
boolean

If recurrenceFrequency is Months, is used to indicate the recurrence will fall of the last day of the month that matches the recurrence.

When used, recurrenceOnMonthDay is not used.

Used in combination with recurrenceInterval and recurrenceType to describe the interval at which the standing instruction is executed. e.g every 1 Month(s) on Last day of Month.

fromOfficeId
integer <integer64>

An id representing the office from which the transfer is made.

toOfficeId
integer <integer64>

An id representing the office to which the transfer is going to.

fromGroupId
integer <integer64>

An id representing the group from which the transfer is made.

toGroupId
integer <integer64>

An id representing the group to which the transfer is going to.

fromClientId
integer <integer64>

An id representing the client from which the transfer is made.

toClientId
integer <integer64>

An id representing the client to which the transfer is going to.

fromAccountType
integer
Enum: 1 2 6

An integer representing the account type from which the transfer is made.

Account types:

  • 1 = Loan Account
  • 2 = Savings Account
  • 6 = Shares Account
fromAccountId
integer <integer64>

An id representing the account from which the transfer is made. Used together with fromAccountType to describe the account.

toAccountType
integer
Enum: 1 2 6

An integer representing the account type from which the transfer is made.

Account types:

  • 1 = Loan Account
  • 2 = Savings Account
  • 6 = Shares Account
toAccountId
integer <integer64>

An id representing the account to which the transfer is going to. Used together with toAccountType to describe the account.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "transferType": 2,
  • "priority": 2,
  • "status": 1,
  • "instructionType": 2,
  • "amount": 5000,
  • "validFrom": "2020-01-15",
  • "validTo": "2020-01-15",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "recurrenceType": 2,
  • "recurrenceFrequency": 2,
  • "recurrenceInterval": 12,
  • "recurrenceOnMonthDay": "02 April",
  • "recurrenceOnLastDayOfMonth": false,
  • "fromOfficeId": 2,
  • "toOfficeId": 2,
  • "fromGroupId": 2,
  • "toGroupId": 2,
  • "fromClientId": 2,
  • "toClientId": 2,
  • "fromAccountType": 2,
  • "fromAccountId": 2,
  • "toAccountType": 2,
  • "toAccountId": 2
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find by Id

Find standing instruction by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a standing instruction.

Responses

Response samples

Content type
application/json
{
  • "id": 4709,
  • "accountDetailId": 4709,
  • "name": "Regular Repayment",
  • "fromOffice": {
    },
  • "fromClient": {
    },
  • "fromGroup": {
    },
  • "fromAccountType": {
    },
  • "fromAccount": {
    },
  • "toOffice": {
    },
  • "toClient": {
    },
  • "toGroup": {
    },
  • "toAccountType": {
    },
  • "toAccount": {
    },
  • "transferType": {
    },
  • "priority": {
    },
  • "instructionType": {
    },
  • "status": {
    },
  • "amount": 5000,
  • "validFrom": [
    ],
  • "validTo": [
    ],
  • "recurrenceType": {
    },
  • "recurrenceFrequency": {
    },
  • "recurrenceInterval": 12,
  • "recurrenceOnMonthDay": "11-21",
  • "recurrenceOnLastDayOfMonth": false
}

Update or Delete standing instruction.

Update or Delete existing standing instruction.

Use command=delete to mark the standing instruction as deleted. This is a soft delete and only changes the status to deleted (also updates name to indicate its deleted.) No request body is required when marking the standing instruction as deleted.

Use command=update to update the standing instruction. An update expects a request body and at least one parameter that should be updated.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a standing instruction.

query Parameters
command
required
string
Enum: "update" "delete"
Example: command=update

The name of the command being performed.

Request Body schema: application/json
required

Update or delete exisiting standing instruction.

Any of
name
string [ 1 .. 250 ] characters

A unique name assigned to identify the standing instruction.

transferType
integer
Enum: 1 2 3 4 5

The id of a transfer type enumeration.

Options include:

  • 1 = Account Transfer
  • 2 = Loan Repayment
  • 3 = Charge Payment
  • 4 = Interest Transfer
  • 5 = Share Purchase
priority
integer
Enum: 1 2 3 4

The id of a priority enumeration.

Options include:

  • 1 = Ugent
  • 2 = High
  • 3 = Medium
  • 4 = Low
status
integer
Enum: 1 2 3

The id of a status enumeration.

Options include:

  • 1 = Active
  • 2 = Disabled
  • 3 = Deleted
instructionType
integer
Enum: 1 2

The id of a instruction type enumeration.

Options include:

  • 1 = Fixed
  • 2 = Dues
amount
number <decimal>

The amount of the standing instruction.

Mandatory if instructionType=1 (Fixed)

validFrom
string <date>

The date the standing instruction is in effect from.

validTo
string <date>

The date the standing instruction is no longer in effect.

locale
string

The locale to use when interpreting number and date fields in the request.

dateFormat
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

recurrenceType
integer
Enum: 1 2

Options include:

  • 1 = Periodic
  • 2 = As Per Dues
recurrenceFrequency
number <integer32>
Enum: 0 1 2 3

Used with recurrenceInterval and recurrenceFrequency to describe the recurrence pattern of the standing instruction.

Mandatory if recurrenceType=1 (Periodic)

Example Values:

  • 0=Days
  • 1=Weeks
  • 2=Months
  • 3=Years
recurrenceInterval
number <integer>

Used in combination with recurrenceType to describe the interval at which the standing instruction is executed. e.g every 1 Month(s)

Mandatory if recurrenceType=1 (Periodic)

recurrenceOnMonthDay
Array of arrays

If recurrenceFrequency is Months, is used to indicates the day of the month the instruction is scheduled to be executed on.

Used in combination with recurrenceInterval and recurrenceType to describe the interval at which the standing instruction is executed. e.g every 1 Month(s) on 4th.

recurrenceOnLastDayOfMonth
boolean

If recurrenceFrequency is Months, is used to indicate the recurrence will fall of the last day of the month that matches the recurrence.

When used, recurrenceOnMonthDay is not used.

Used in combination with recurrenceInterval and recurrenceType to describe the interval at which the standing instruction is executed. e.g every 1 Month(s) on Last day of Month.

fromOfficeId
integer <integer64>

An id representing the office from which the transfer is made.

toOfficeId
integer <integer64>

An id representing the office to which the transfer is going to.

fromGroupId
integer <integer64>

An id representing the group from which the transfer is made.

toGroupId
integer <integer64>

An id representing the group to which the transfer is going to.

fromClientId
integer <integer64>

An id representing the client from which the transfer is made.

toClientId
integer <integer64>

An id representing the client to which the transfer is going to.

fromAccountType
integer
Enum: 1 2 6

An integer representing the account type from which the transfer is made.

Account types:

  • 1 = Loan Account
  • 2 = Savings Account
  • 6 = Shares Account
fromAccountId
integer <integer64>

An id representing the account from which the transfer is made. Used together with fromAccountType to describe the account.

toAccountType
integer
Enum: 1 2 6

An integer representing the account type from which the transfer is made.

Account types:

  • 1 = Loan Account
  • 2 = Savings Account
  • 6 = Shares Account
toAccountId
integer <integer64>

An id representing the account to which the transfer is going to. Used together with toAccountType to describe the account.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "transferType": 2,
  • "priority": 2,
  • "status": 1,
  • "instructionType": 2,
  • "amount": 5000,
  • "validFrom": "2020-01-15",
  • "validTo": "2020-01-15",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "recurrenceType": 2,
  • "recurrenceFrequency": 2,
  • "recurrenceInterval": 12,
  • "recurrenceOnMonthDay": "02 April",
  • "recurrenceOnLastDayOfMonth": false,
  • "fromOfficeId": 2,
  • "toOfficeId": 2,
  • "fromGroupId": 2,
  • "toGroupId": 2,
  • "fromClientId": 2,
  • "toClientId": 2,
  • "fromAccountType": 2,
  • "fromAccountId": 2,
  • "toAccountType": 2,
  • "toAccountId": 2
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Collection Sheet

In microfinance its common for its financial services delivery to clients and groups to be performed by having staff members visit locations near the client/group.

Loan repayments and savings deposits are common transactions performed at these collections.

The collection sheet functionality is based on this and allows for a sheet to be generated with all the loan repayments and savings deposits that are expected to occur at the collection based on the groups/clients.

The view of transactions can be generated based on the office, group or staff member selected.

Collection Sheet - Search/List

Search all collection sheet submissions that are "processed" or "rejected".

Collection sheet submissions that are still "awaiting approval" are not returned.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

officeId
integer

The id of an office.

Filters the search to only collection sheets associated with this offices hierarchy (office + sub-offices).

groupId
integer

The id of a group.

Filters the search to only collection sheets associated with this group.

makerId
integer

The id of an application user that created the collection sheet.

Filters the search to only collection sheets created by this user.

makerDateTimeFrom
string <date-time>

Filter by maker date time from (yyyy-MM-dd HH:mm:ss). Example: 2013-03-25 08:00:00

makerDateTimeTo
string <date-time>

Filter by maker date time to (yyyy-MM-dd HH:mm:ss). Example: 2013-04-04 18:00:00

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Collection Sheet - Generate Sheet (Group)

Generates a collection sheet view based on parameters provided.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
command
required
string
Default: "generateGroupCollectionSheet"
Example: command=generateGroupCollectionSheet

The generateGroupCollectionSheet command.

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

officeId
required
integer <int64>

The id of the office the group or staff of collection sheet associated with

staffId
integer <int64>

The id of the staff member the collection sheet is being generated for.

groupId
integer <int64>

The id of the group the collection sheet is being generated for.

transactionDate
required
string

The date the collection sheet will use to find due repayments or deposits on.

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "officeId": 1,
  • "staffId": 1,
  • "groupId": 1,
  • "transactionDate": "01 July 2007"
}

Response samples

Content type
application/json
[
  • {
    }
]

Collection Sheet - Generate Sheet (Staff/Office)

Generates a collection sheet view based on parameters provided.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
command
required
string
Default: "generateCollectionSheet"
Example: command=generateCollectionSheet

The generateCollectionSheet command.

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

officeId
required
integer <int64>

The id of the office the group or staff of collection sheet associated with

staffId
required
integer <int64>

The id of the staff member the collection sheet is being generated for.

transactionDate
required
string

The date the collection sheet will use to find due repayments or deposits on.

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "officeId": 1,
  • "staffId": 1,
  • "transactionDate": "01 July 2007"
}

Response samples

Content type
application/json
[
  • {
    }
]

Collection Sheet - Submit Sheet

Submits a collection sheet based on parameters provided.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
command
required
string
Default: "saveGroupCollectionSheet"
Example: command=saveGroupCollectionSheet

The saveGroupCollectionSheet command.

groupId
required
integer

The id of a group.

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

transactionDate
required
string

The date the collection sheet will use to find due repayments or deposits on

paymentTypeId
integer <int64>

The id of the payment type associated with this collection sheet

receiptNumber
string

The unique id of the payment that will be captured in payment details for each transaction associated with this collection sheet submission

note
string

Additional information related to the collection

Array of objects

An array of loan repayment transaction details

Array of objects

An array of loan disbursement transaction details

Array of objects

An array of savings deposit transaction details

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "transactionDate": "01 July 2007",
  • "paymentTypeId": 1,
  • "receiptNumber": "C-0002345",
  • "note": "additional info for Group XX",
  • "bulkRepaymentTransactions": [
    ],
  • "bulkDisbursementTransactions": [
    ],
  • "bulkSavingsDueTransactions": [
    ]
}

Response samples

Content type
application/json
{
  • "commandId": 0
}

Collection Sheet - Approve

Approves a collection sheet submission resulting in processing of transactions

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
command
required
string
Default: "approve"
Example: command=approve

The approve command.

commandId
required
integer

The id of the audit entry of the collection submission

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "commandId": 0,
  • "groupId": 0,
  • "resourceId": 0,
  • "changes": {
    }
}

Withdrawal Sheet

Similiar to the collection sheet concept but this approach allows for saving withdrawal transactions to be performed in bulk based on the office, staff, group.

Withdrawal Sheet - Search

Search all withdrawal sheet submissions that are "processed" or "rejected".

Withdrawal sheet submissions that are still "awaiting approval" are not returned.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
officeId
integer

The id of an office.

Filters the search to only collection sheets associated with this offices hierarchy (office + sub-offices).

groupId
integer

The id of a group.

Filters the search to only collection sheets associated with this group.

makerId
integer

The id of an application user that created the collection sheet.

Filters the search to only collection sheets created by this user.

makerDateTimeFrom
string <date-time>

Filter by maker date time from (yyyy-MM-dd HH:mm:ss). Example: 2013-03-25 08:00:00

makerDateTimeTo
string <date-time>

Filter by maker date time to (yyyy-MM-dd HH:mm:ss). Example: 2013-04-04 18:00:00

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Withdrawal Sheet - Find one

Returns withdrawal sheet details

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer

The id of the withdrawal sheet

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "actionName": "string",
  • "entityName": "string",
  • "resourceId": 0,
  • "url": "string",
  • "maker": "string",
  • "madeOnDate": "2019-08-24T14:15:22Z",
  • "checker": "string",
  • "checkedOnDate": "2019-08-24T14:15:22Z",
  • "processingResult": "string",
  • "commandAsJson": { },
  • "officeName": "string",
  • "groupLevelName": "string",
  • "groupName": "string"
}

Withdrawal Sheet - Search (Pending Approval)

Search all withdrawal sheet submissions that are in pending approval state.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Withdrawal Sheet - Find one (Pending Approval)

Returns withdrawal sheet details that is pending approval

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer

The id of the withdrawal sheet

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "actionName": "string",
  • "entityName": "string",
  • "resourceId": 0,
  • "url": "string",
  • "maker": "string",
  • "madeOnDate": "2019-08-24T14:15:22Z",
  • "checker": "string",
  • "checkedOnDate": "2019-08-24T14:15:22Z",
  • "processingResult": "string",
  • "commandAsJson": { },
  • "officeName": "string",
  • "groupLevelName": "string",
  • "groupName": "string"
}

Withdrawal Sheet - Generate Sheet (Staff)

Generates a withdrawal sheet based on staffId and parameters provided.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
command
required
string
Example: command=generateWithdrawalSheet

The name of the command

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

officeId
integer <int64>

The id of the office the group or staff of withdrawal sheet associated with

staffId
required
integer <int64>

The id of the staff member the withdrawal sheet is being generated for.

transactionDate
required
string

The date the withdrawal sheet will use to find due repayments or deposits on.

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "officeId": 1,
  • "staffId": 1,
  • "transactionDate": "01 July 2007"
}

Response samples

Content type
application/json
[
  • {
    }
]

Withdrawal Sheet - Generate Sheet (Group)

Generates a withdrawal sheet based on groupId and parameters provided.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
command
required
string
Example: command=generateGroupWithdrawalSheet

The name of the command

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

officeId
integer <int64>

The id of the office the group or staff of withdrawal sheet associated with

staffId
integer <int64>

The id of the staff member the withdrawal sheet is being generated for.

groupId
required
integer <int64>

The id of the group the withdrawal sheet is being generated for.

transactionDate
required
string

The date the withdrawal sheet will use to find due repayments or deposits on.

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "officeId": 1,
  • "staffId": 1,
  • "groupId": 1,
  • "transactionDate": "01 July 2007"
}

Response samples

Content type
application/json
[
  • {
    }
]

Withdrawal Sheet - Submit

Submits a withdrawal sheet based on parameters provided.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
command
required
string
Example: command=saveCollectionSheet

The name of the command

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

transactionDate
required
string

The date the collection sheet will use to find due repayments or deposits on

totalGroupAmount
required
number <decimal>

The total amount of withdrawals across all transactions in this sheet

groupId
required
integer <int64>

The id of the group

paymentTypeId
integer <int64>

The id of the payment type associated with this collection sheet

note
string

The unique receipt number of the payment that will be captured in payment details for each transaction associated with this sheet submission

required
Array of objects

An array of savings withdrawal transaction details

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "transactionDate": "01 July 2007",
  • "totalGroupAmount": 475,
  • "groupId": 1,
  • "paymentTypeId": 1,
  • "note": "C-0002345",
  • "bulkWithdrawalTransactions": [
    ]
}

Response samples

Content type
application/json
{
  • "commandId": 0,
  • "resourceId": 0
}

Withdrawal Sheet - Approve

Approves a sumitted withdrawal sheet resulting in the related transactions being applied.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
command
required
string
Example: command=approve

The name of the command

commandId
required
integer

The id of the audit entry of the collection submission

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "commandId": 0,
  • "resourceId": 0
}

Withdrawal Sheet - Reject

Reject a sumitted withdrawal sheet resulting in the related transactions not being applied.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
command
required
string
Example: command=reject

The name of the command

commandId
required
integer

The id of the audit entry of the submission

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "commandId": 0,
  • "resourceId": 0
}

Office

Offices are used to model an MFIs structure. A hierarchical representation of offices is supported. There will always be at least least one office (which represents the MFI or an MFIs head office). All subsequent offices added must have a parent office.

List Offices

List all Offices

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
includeAllOffices
boolean
Default: false
Example: includeAllOffices=false

Allows the user to get back the full hierarchy of offices regardless of what office they are associated with in the organisation.

orderBy
string
Enum: "id" "parent_id" "hierarchy" "external_id" "name" "opening_date"

The database field name that you wish to order the list of offices by.

sortOrder
string
Enum: "ASC" "DESC"

Used with orderBy parameter, this indicates the sorting order of the attribute mentioned in orderBy. This parameter is ignored unless orderBy is provided also.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new Office

The supported schema for creating offices. name, openingDate, parentId are required.
locale is required when dealing with numbers or dates
dateFormat is required when dealing with dates

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string

The name of the office.

externalId
string

A place to put an external reference for this office e.g. The ID another system uses for it. If provided, it must be unique.

locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

openingDate
required
string

The opening date in a date format supported by Joda Time.

parentId
required
integer <int64>

The id of the office that will be above this office in the office hierarchy.

Responses

Request samples

Content type
application/json
{
  • "name": "name",
  • "externalId": "ABC-0001",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "openingDate": "01 July 2007",
  • "parentId": 1
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find Office by Id

Find an Office by Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of an office.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update existing office

The supported schema for office updates. name, externalId, openingDate and parentId can be updated in isolation or together.

locale is required when dealing with numbers or dates
dateFormat is required when dealing with dates

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of an office.

Request Body schema: application/json
required

Update exisitng office

name
string

The name of the office.

externalId
string

A place to put an external reference for this office e.g. The ID another system uses for it. If provided, it must be unique.

locale
string

The locale to use when interpreting number and date fields in the request.

dateFormat
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

openingDate
string

The opening date in a date format supported by Joda Time.

parentId
integer <int64>

The id of the office that will be above this office in the office hierarchy.

Responses

Request samples

Content type
application/json
{
  • "name": "name",
  • "externalId": "ABC-0001",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "openingDate": "01 July 2007",
  • "parentId": 1
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Template

This is a convenience api.
It can be useful when building maintenance user interface screens for client applications.

It returns fields with default values and dropdown list values.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of an office.

Responses

Response samples

Content type
application/json
{
  • "timestamp": 521630352275443,
  • "status": 401,
  • "error": "Unauthorized",
  • "message": "Full authentication is required to access this resource",
  • "path": "/api/v1/{resourceName}"
}

Staff

Allows you to model staff members. At present the key role of significance is whether this staff member is a loan officer or not.

List Staff

List all Staff

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
officeId
integer

The id of an office. Used to restrict to set of staff associated with the office.

staffInOfficeHierarchy
boolean
Default: false
Example: staffInOfficeHierarchy=false

if true, returns all active staff in office hierarchy that are above the provided officeId.

loanOfficersOnly
boolean
Default: false
Example: loanOfficersOnly=false

if true, restricts response to staff that are set as loan officers.

status
string
Default: "active"
Enum: "active" "inactive" "all"
Example: status=active

if staffInOfficeHierarchy is false, status is used to restrict set of staff returned based on whether they are active or not.

sqlSearch
string
Deprecated

Deprecated. Use other parameters or See The Data Filter API for better approach for search/filter.

A valid sql fragment that will work with backend query for this api.

If staffInOfficeHierarchy is false, and when supplied it will be used in the backend SQL Query where clause to restrict set of staff return.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new Staff member

The supported schema for creating staff. officeId, firstName, lastName and joiningDate are required.

locale is required when dealing with numbers or dates
dateFormat is required when dealing with dates

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
officeId
required
integer <int64>

The id of the office this staff member is associated with.

firstname
required
string

The first name of the staff member.

lastname
required
string

The last name of the staff member.

locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

joiningDate
required
string

The joining date in a date format supported by Joda Time.

mobileNo
string

The mobile telephone number of staff memeber.

externalId
string

A place to put an external reference for this resource e.g. The ID another system uses for it. If provided, it must be unique.

isLoanOfficer
boolean

Indicates if this staff member is a loan officer or not. Defaults to false if omitted.

isActive
boolean
Default: true

Indicates if this staff member active. Defaults to true if omitted.

Responses

Request samples

Content type
application/json
{
  • "officeId": 1,
  • "firstname": "John",
  • "lastname": "Doe",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "joiningDate": "01 July 2007",
  • "mobileNo": "+353 78 90987877",
  • "externalId": "STAFF-0001",
  • "isLoanOfficer": true,
  • "isActive": true
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find Staff by Id

Find staff member by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a staff member.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update existing staff

The supported schema for staff updates. officeId, firstName, lastName, joiningDate, externalId, mobileNo, isLoanOfficer, isActive can be updated in isolation or together.

locale is required when dealing with numbers or dates
dateFormat is required when dealing with dates

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a staff member.

Request Body schema: application/json
required

Update exisitng staff member

officeId
integer <int64>

The id of the office this staff member is associated with.

firstname
string

The first name of the staff member.

lastname
string

The last name of the staff member.

locale
string

The locale to use when interpreting number and date fields in the request.

dateFormat
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

joiningDate
string

The joining date in a date format supported by Joda Time.

mobileNo
string

The mobile telephone number of staff memeber.

externalId
string

A place to put an external reference for this resource e.g. The ID another system uses for it. If provided, it must be unique.

isLoanOfficer
boolean

Indicates if this staff member is a loan officer or not. Defaults to false if omitted.

isActive
boolean
Default: true

Indicates if this staff member active. Defaults to true if omitted.

Responses

Request samples

Content type
application/json
{
  • "officeId": 1,
  • "firstname": "John",
  • "lastname": "Doe",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "joiningDate": "01 July 2007",
  • "mobileNo": "+353 78 90987877",
  • "externalId": "STAFF-0001",
  • "isLoanOfficer": true,
  • "isActive": true
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Tasks - General

List Tasks

List paged response of tasks matching filter criteria.

The API is scoped by user permissions setup:

  • A user with READ_TASK_ADMIN permission is allowed to search tasks assigned / createdby other users so long as in its office hierarchy.
  • A user with READ_TASK permission is allowed to search tasks either assigned or created by them so long as in office hierarchy.
  • A user with no task permissions is allowed to view tasks where they are the created by user (and the assigned to user if used in search).

See The Data Filter API for better approach for search/filter.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

clientId
integer <int32> >= 1
Default: null

Restrict response to tasks with client id matching this value.

groupId
integer <int32> >= 1
Default: null

Restrict response to tasks with group id matching this value.

modifiedSinceTimestamp
integer <int64>
Example: modifiedSinceTimestamp=1634152729

Should be passed as a UNIX Timestamp.

When provided only tasks that have been created or updated since the provided timestamp are returned.

Whenever a task is modified its last modified date and time in UTC is captured.

This parameter can be used in integrations to fetch changed data since a last fetch, timestamps will be treated as UTC and returned as UTC.

statusId
integer <int32> >= 1
Default: null

Restrict response to tasks with status matching this value.

priorityId
integer <int32> >= 1
Default: null

Restrict response to tasks with priority matching this value.

completed
boolean
Default: null

Restrict response to tasks whose completed attribute match this value.

taskAssignedToUserId
integer <int32> >= 1
Default: null

Restrict response to tasks assigned to users matching this value.

taskCreatedByUserId
integer <int32> >= 1
Default: null

Restrict response to tasks created by users matching this value.

dueDateFrom
string
Default: null
Example: dueDateFrom=2001-12-25

This parameter must also be used with dueDateTo to provide range otherwise it is ignored.

Restrict response to tasks where due date is in range dueDateFrom to dueDateTo.

The date can be in ISO format yyyy-MM-dd or in the format specified by dateFormat parameter

dueDateTo
string
Default: null

This parameter must also be used with dueDateFrom to provide range otherwise it is ignored.

Restrict response to tasks where due date is in range dueDateFrom to dueDateTo.

The date can be in ISO format yyyy-MM-dd or in the format specified by dateFormat parameter

createdDateFrom
string
Default: null

This parameter must also be used with createdDateTo to provide range otherwise it is ignored.

Restrict response to tasks where its created date is in range createdDateFrom to createdDateTo.

The date can be in ISO format yyyy-MM-dd or in the format specified by dateFormat parameter

createdDateTo
string
Default: null

This parameter must also be used with createdDateFrom to provide range otherwise it is ignored.

Restrict response to tasks where its created date is in range createdDateFrom to createdDateTo.

The date can be in ISO format yyyy-MM-dd or in the format specified by dateFormat parameter

completedOnDateFrom
string
Default: null

This parameter must also be used with completedOnDateTo to provide range otherwise it is ignored.

Restrict response to tasks where its completed on date is in range completedOnDateFrom to completedOnDateTo.

The date can be in ISO format yyyy-MM-dd or in the format specified by dateFormat parameter

completedOnDateTo
string
Default: null

This parameter must also be used with completedOnDateFrom to provide range otherwise it is ignored.

Restrict response to tasks where its completed on date is in range completedOnDateFrom to completedOnDateTo.

The date can be in ISO format yyyy-MM-dd or in the format specified by dateFormat parameter

dateFormat
string
Default: null

If provided, then it will be used in formatting date parameters, else the date parameters must be in ISO format yyyy-MM-dd

orderBy
string
Enum: "dueDate" "createdDate" "completedOnDate"

The api parameter name of field you wish to order by.

sortOrder
string
Enum: "ASC" "DESC"

Used with orderBy parameter, this indicates the sorting order of the attribute mentioned in orderBy. This parameter is ignored unless orderBy is provided also.

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 52,
  • "pageItems": [
    ]
}

Create new Task

Used to create a new Task.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required

Tasks can be associated with a client or group but not both. The model is the same for client and group except for the clientId and groupId fields.

Any of
clientId
required
integer <int64>

The id of the client on platform that this task is associated with.

summary
required
string

A summary of the tasks purpose.

assignedToUserId
required
integer <int64>

The id of the user in the platform that you wish to assign against this task.

statusId
required
integer <int64>

The status to create the task in

priorityId
required
integer <int64>

The priority to create the task in

dueDate
string

The date on that this task is due to be completed by.

Provided as a string and used together with dateFormat.

description
string

A full description of the task.

completed
boolean
Default: false

A boolean indicating if this task is completed or not.

locale
string

The locale to use when interpreting number and date fields in the request.

dateFormat
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

Responses

Request samples

Content type
application/json
Example
{
  • "clientId": 1,
  • "summary": "Task for Kenneth",
  • "assignedToUserId": 1,
  • "statusId": 1,
  • "priorityId": 1,
  • "dueDate": "2021-07-21",
  • "description": "Task for Kenneth to check new loan.",
  • "completed": false,
  • "locale": "en",
  • "dateFormat": "yyyy-MM-dd"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Tasks - Existing

Find a task by id

Find a task by id.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a task.

Responses

Response samples

Content type
application/json
{
  • "id": 4709,
  • "assignedTo": "username",
  • "assignedToUserId": 24,
  • "assignedToDisplayName": "username",
  • "createdBy": "username",
  • "createdByUserId": 24,
  • "createdByDisplayName": "username",
  • "summary": "Loan abc, contact customer",
  • "description": "Please follow the following checklist...",
  • "clientId": 14,
  • "client": "John Doe",
  • "groupId": 1,
  • "group": "Rural Group 1",
  • "status": "Follow up",
  • "priority": "P1",
  • "createdOnDate": "Dec 15, 2020 12:00:00 AM",
  • "dueDate": "Dec 19, 2020 12:00:00 AM",
  • "completed": false,
  • "deleted": false,
  • "completedOnDate": "Dec 15, 2020 12:00:00 AM",
  • "originChannel": "my-api-integration",
  • "auditData": {
    }
}

Update a task by id.

Any attribute of the Task model can be updated in isolation.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a task.

Request Body schema: application/json

Update existing Task

assignedToUserId
integer <int64>

The id of the user in the platform that you wish to assign against this task.

description
string

A full description of the task.

summary
string

A summary of the tasks purpose.

statusId
integer <int64>

The status to create the task in

priorityId
integer <int64>

The priority to create the task in

dueDate
string

The date in ISO Date format that this task is due to be completed by.

clientId
integer <int64>

The id of the client on platform that this task is associated with.

groupId
integer <int64>

The id of the group on platform that this task is associated with.

Responses

Request samples

Content type
application/json
{
  • "assignedToUserId": 1,
  • "description": "Task for Kenneth to check new loan.",
  • "summary": "Task for Kenneth",
  • "statusId": 1,
  • "priorityId": 1,
  • "dueDate": "2021-07-21",
  • "clientId": 1,
  • "groupId": 1
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Delete task by id.

Deletion of tasks are soft and the record is retained but marked as deleted.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a task.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Command on Task

All state changing Non-CRUD behaviour related to Tasks are catered for through this path and the use of a query parameter named command to determine which behaviour you wish to execute.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a task.

query Parameters
command
string
Enum: "taskcompleted" "undotaskcompletion"
Example: command=taskcompleted

The name of the command indicating which behaviour to perform on the resource.

Request Body schema: application/json
required
Any of
object (TaskCommandCompleteModel)

Completing a task moves it into a completed state and ensures required fields are populated.

Used when command query parameter is set to taskcompleted.

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Funds

API for managing funds. Funds are used to categorize and track sources of money within the system.

List Funds

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a Fund

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
fundId
required
integer

The unique identifier of the fund.

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "EU Agri Fund"
}

Update a Fund

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
fundId
required
integer

The unique identifier of the fund.

Request Body schema: application/json
required
name
required
string

The name of the fund.

Responses

Request samples

Content type
application/json
"EU Agri Fund"

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Currencies

API for managing currency configuration.

Retrieve Currency Configuration

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "selectedCurrencyOptions": [
    ],
  • "currencyOptions": [
    ]
}

Update Currency Configuration

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
currencies
Array of strings

An array of currency codes to be enabled.

Responses

Request samples

Content type
application/json
{
  • "currencies": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Working Days

Represents the days of the week that are workdays and configuration around strategy to use if a repayment falls on a working day.

configuration related to workdays (see Global configurations):

  • reschedule-future-repayments indicates how rescheduling of repayments should be processed when it falls on a non-working day
  • allow-transactions-on-non_workingday allows transactions on non-working days if enabled

Working Days - Retrieve Configuration

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Working Days - Update Configuration

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
recurrence
string

A recurrence pattern describing what days of the week are to be considered work days that is compliant with https://icalendar.org/iCalendar-RFC-5545/

repaymentRescheduleType
integer

The id of the repayment reschedule type to use.

extendTermForDailyRepayments
boolean

Extend the term for loans following a daily repayment schedule

Results in using RepaymentRescheduleType.move.to.next.working.day if loan is daily.

extendTermForRepaymentsOnHolidays
boolean
Deprecated

Not used

Responses

Request samples

Content type
application/json
{
  • "recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU",
  • "repaymentRescheduleType": 2,
  • "extendTermForDailyRepayments": true,
  • "extendTermForRepaymentsOnHolidays": false
}

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Working Days Template

This is a convenience resource. It can be useful when building maintenance user interface screens for working days.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU",
  • "repaymentRescheduleType": {
    },
  • "extendTermForDailyRepayments": true,
  • "extendTermForRepaymentsOnHolidays": false,
  • "repaymentRescheduleOptions": [
    ]
}

Holidays

API for managing holidays within the Musoni system. Holidays can be defined for specific offices and can impact loan repayment schedules.

Key functionalities include:

  • Creating new holidays with details such as name, description, start and end dates, and a designated date for rescheduling repayments that fall within the holiday period.
  • Retrieving a list of all defined holidays, with the option to filter by office.
  • Retrieving detailed information for a specific holiday.
  • Updating the details of an existing holiday.
  • Deleting a holiday.

Holidays play a crucial role in the loan module by influencing repayment dates. The system provides configuration options to manage how holidays affect transactions and repayment rescheduling.

Holidays - Search / List

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
officeId
integer

The unique identifier of the office to filter holidays by.

fromDate
string
Default: null

This parameter allows to filter search results for holidays whoose "from date" is greater than or equal to the supplied date.

toDate
string
Default: null

This parameter allows to filter search results for holidays whoose "to date" is less than or equal to the supplied date.

excludeHolidaysOfBranchOffices
boolean
Default: false
Example: excludeHolidaysOfBranchOffices=false

when set to true, holidays of branch (child/sub) offices of the office specified by id (officeId) will be excluded.

locale
string
Default: null
Example: locale=en

Required if dateFormat is used. If provided, then it will be used in combination with dateFormat when parsing date parameters.

dateFormat
string
Default: null
Example: dateFormat=2023-01-01

Required if fromDate or toDate parameters are used. If provided, then it will be used in formatting date parameters.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Holidays - Create

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

name
string

The name of the holiday.

description
string

A description of the holiday.

fromDate
string <date>

The start date of the holiday.

toDate
string <date>

The end date of the holiday.

reschedulingType
integer

A value indicate the type of rescheduling associated with the holiday

repaymentsRescheduledTo
string <date>

The date to which repayments are rescheduled due to the holiday.

Array of objects

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "name": "string",
  • "description": "string",
  • "fromDate": "2019-08-24",
  • "toDate": "2019-08-24",
  • "reschedulingType": 2,
  • "repaymentsRescheduledTo": "2019-08-24",
  • "offices": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Holidays - Find one

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
holidayId
required
integer

The unique identifier of the holiday.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "status": {
    },
  • "description": "string",
  • "fromDate": "2019-08-24",
  • "toDate": "2019-08-24",
  • "reschedulingType": 2,
  • "repaymentsRescheduledTo": "2019-08-24",
  • "officeId": 0,
  • "office": "multiples",
  • "officeAsString": "Office-Holiday-935td5,Office-Holiday-child-92nro",
  • "offices": [
    ]
}

Holidays - Update one

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
holidayId
required
integer

The unique identifier of the holiday.

Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

name
string

The name of the holiday.

description
string

A description of the holiday.

fromDate
string <date>

The start date of the holiday.

toDate
string <date>

The end date of the holiday.

reschedulingType
integer

A value indicate the type of rescheduling associated with the holiday

repaymentsRescheduledTo
string <date>

The date to which repayments are rescheduled due to the holiday.

Array of objects

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "name": "string",
  • "description": "string",
  • "fromDate": "2019-08-24",
  • "toDate": "2019-08-24",
  • "reschedulingType": 2,
  • "repaymentsRescheduledTo": "2019-08-24",
  • "offices": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Holidays - Delete one

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
holidayId
required
integer

The unique identifier of the holiday.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Payment Types

Payment types are used to categorize how payments are made within the system (e.g., cash, mobile money, bank transfer).

Payment Types - Search / List

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Payment Types - Create

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
name
required
string

The name of the payment type.

description
string

A brief description of the payment type.

isCashPayment
required
boolean

Indicates if this payment type is considered a cash payment.

position
integer <int32>

The display order of the payment type. Lower numbers appear first.

Responses

Request samples

Content type
application/json
{
  • "name": "Cash",
  • "description": "Physical cash payments",
  • "isCashPayment": true,
  • "position": 1
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Payment Types - Find one

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
paymentTypeId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Cash",
  • "description": "Physical cash payments",
  • "isCashPayment": true,
  • "position": 1
}

Payment Types - Update one

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
paymentTypeId
required
integer <int64>
Request Body schema: application/json
name
string

The updated name of the payment type.

description
string

An updated brief description of the payment type.

isCashPayment
boolean

Updates whether this payment type is considered a cash payment.

position
integer <int32>

Updates the display order of the payment type. Lower numbers appear first.

Responses

Request samples

Content type
application/json
{
  • "name": "Mobile Money",
  • "description": "Payments made via mobile money services",
  • "isCashPayment": false,
  • "position": 2
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Payment Types - Delete one

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
paymentTypeId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "resourceId": 12
}

General Ledger Account

General ledger accounts (GL Accounts) represent an individual account within an organizations Chart Of Accounts (COA).

They are assigned a name and unique number by which they can be identified.
All transactions relating to a company's assets, liabilities, equity, income or expense are recorded against these accounts.

List GL Accounts

List all GL Accounts

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
type
integer
Enum: 1 2 3 4 5
Example: type=1

This is a filter parameter. It limits the response to GL accounts whoose type field matches the provided value.

This parameter can be combined with any of filter parameters.

searchParam
string
Example: searchParam=1001

This is a filter parameter. It limits the response to GL accounts whoose searchParam field matches the provided value.

This parameter can be combined with any of filter parameters.

usage
integer
Enum: 1 2
Example: usage=1

This is a filter parameter. It limits the response to GL accounts whoose usage field matches the provided value.

This parameter can be combined with any of filter parameters.

manualEntriesAllowed
boolean
Example: manualEntriesAllowed=false

This is a filter parameter. It limits the response to GL accounts whoose manualEntriesAllowed field matches the provided value.

This parameter can be combined with any of filter parameters.

disabled
boolean
Example: disabled=false

This is a filter parameter. It limits the response to GL accounts whoose disabled field matches the provided value.

This parameter can be combined with any of filter parameters.

reconciliationEnabled
boolean
Example: reconciliationEnabled=false

This is a filter parameter. It limits the response to GL accounts whoose reconciliationEnabled field matches the provided value.

This parameter can be combined with any of filter parameters.

fetchRunningBalance
boolean
Example: fetchRunningBalance=false

if true, the response will include an addtional field called organizationRunningBalance.

fetchUnreconciledBalance
boolean
Example: fetchUnreconciledBalance=false

if true, the response will include an addtional field called unReconciledBalance. This value will be zero for gl accounts that have reconciliation_enabled=0

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new GL Account

The supported schmea when creating a new general ledger account (GL Account).

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string

The name of the GL account

glCode
required
string

The ledger code associated with the Account. These codes are mandatory and unique

type
required
integer
Enum: 1 2 3 4 5

Classifies the account into one of the following Types:

1=Asset: represent the different types of economic resources owned or controlled by business, common examples of Asset accounts are cash, cash in bank, building, inventory, prepaid rent, goodwill, accounts receivable
2=Liability: represent the different types of economic obligations by a business, such as accounts payable, bank loan, bonds payable
3=Equity: represent the residual equity of a business (after deducting from Assets all the liabilities) including Retained Earnings and Appropriations
4=Income: represent the company's gross earnings and common examples include Interest Income, Sales and Service revenue
5=Expense: represent the company's expenditures to enable itself to operate. Common examples are electricity and water, rentals, depreciation, doubtful accounts, insurance. \

usage
required
integer
Enum: 1 2

Indicates if this ledger is a Header or Detail ledger account.

1=Detail: "Detail" accounts may have transactions logged against them
2=Header: "Header" accounts specify the title of a group of accounts. They are used only for grouping together detail accounts that have a similar purpose; that is, detail accounts are assigned to specific header accounts

manualEntriesAllowed
required
boolean

Indicates if manual entries can be made against this account using the Journals API.

parentId
integer <integer64>

To assign a another GL account as the parent of this GL account.

disabled
boolean
Default: false

Indicates whether an account is disabled or not.

reconciliationEnabled
boolean
Default: false

Indicates if reconcillation is allowed to be calculated for this account

tagId
string

A code value related to GL accounts used for tagging the account heads, based on GLAccount types.

description
string

Human understandable description for the general ledger account

externalId
string

A place to put an external reference for this resource e.g. The ID another system uses for it. If provided, it must be unique.

Responses

Request samples

Content type
application/json
{
  • "name": "Cash on Hand",
  • "glCode": "ASS0001",
  • "type": 1,
  • "usage": 1,
  • "manualEntriesAllowed": false,
  • "parentId": null,
  • "disabled": false,
  • "reconciliationEnabled": false,
  • "tagId": "SomeCodeValue",
  • "description": "Some text explaining the GL account.",
  • "externalId": "XGL-1-00-00-00"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find GL Account by Id

Find GL Account by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a general ledger account (GL Account).

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete GL Account by Id

A General Ledger Account can only be deleted if:

  • its a DETAIL account with no transactions have been logged (either manually or by the portfolio products)
  • OR its a Header account with no child gl accounts
Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a general ledger account (GL Account).

Responses

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Update existing GL Account

Update ...

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a general ledger account (GL Account).

Request Body schema: application/json
required

Update exisitng GL account

name
string

The name of the GL account

glCode
string

The ledger code associated with the Account. These codes are mandatory and unique

type
integer
Enum: 1 2 3 4 5

Classifies the account into one of the following Types:

1=Asset: represent the different types of economic resources owned or controlled by business, common examples of Asset accounts are cash, cash in bank, building, inventory, prepaid rent, goodwill, accounts receivable
2=Liability: represent the different types of economic obligations by a business, such as accounts payable, bank loan, bonds payable
3=Equity: represent the residual equity of a business (after deducting from Assets all the liabilities) including Retained Earnings and Appropriations
4=Income: represent the company's gross earnings and common examples include Interest Income, Sales and Service revenue
5=Expense: represent the company's expenditures to enable itself to operate. Common examples are electricity and water, rentals, depreciation, doubtful accounts, insurance. \

usage
integer
Enum: 1 2

Indicates if this ledger is a Header or Detail ledger account.

1=Detail: "Detail" accounts may have transactions logged against them
2=Header: "Header" accounts specify the title of a group of accounts. They are used only for grouping together detail accounts that have a similar purpose; that is, detail accounts are assigned to specific header accounts

manualEntriesAllowed
boolean

Indicates if manual entries can be made against this account using the Journals API.

parentId
integer <integer64>

To assign a another GL account as the parent of this GL account.

disabled
boolean
Default: false

Indicates whether an account is disabled or not.

reconciliationEnabled
boolean
Default: false

Indicates if reconcillation is allowed to be calculated for this account

tagId
string

A code value related to GL accounts used for tagging the account heads, based on GLAccount types.

description
string

Human understandable description for the general ledger account

externalId
string

A place to put an external reference for this resource e.g. The ID another system uses for it. If provided, it must be unique.

Responses

Request samples

Content type
application/json
{
  • "name": "Cash on hand",
  • "glCode": "ASS0001",
  • "type": 1,
  • "usage": 1,
  • "manualEntriesAllowed": false,
  • "parentId": null,
  • "disabled": false,
  • "reconciliationEnabled": false,
  • "tagId": "SomeCodeValue",
  • "description": "Some text explaining the GL account.",
  • "externalId": "XGL-1-00-00-00"
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Financial Activity Accounts

Financial activity accounts represent a mapping between financial activity and a general ledger account.

Financial activities are system-defined activities that require a corresponding GL Account for accounting purposes.

This mapping ensures that transactions related to a specific financial activity are correctly posted to the designated GL Account.

For example asset and liability transfers can be mapped to GL Account and then the accounting module takes these GL accounts into consideration when account transfers are made between loan and savings accounts.

Financial Activity Accounts - Search / List

Retrieves the list of all Financial Activity to GL Account mappings.

The response is a non-paged list of mappings.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Financial Activity Accounts - Create mapping

Creates a new mapping between a Financial Activity and a GL Account.

Financial Activities are system-defined activities that require a corresponding GL Account for accounting purposes. This mapping ensures that transactions related to a specific financial activity are correctly posted to the designated GL Account.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required

Request body for creating a new Financial Activity Account mapping.

financialActivityId
required
integer <int32>

The unique identifier of the Financial Activity.

glAccountId
required
integer <int64>

The unique identifier of the GL Account to map to the Financial Activity.

Responses

Request samples

Content type
application/json
{
  • "financialActivityId": 100,
  • "glAccountId": 1
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Financial Activity Accounts - Find by Activity

Retrieves the details of a specific Financial Activity to GL Account mapping using the Financial Activity type enumeration.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
financialActivityEnum
required
integer <int32>
Enum: 100 101 102 103 104 200 201 300 600
Example: 100

The Financial Activity type enumeration.

  • 100: assetTransfer
  • 101: cashAtMainVault
  • 102: cashAtTeller
  • 103: fundSource
  • 104: Teller Differences
  • 200: liabilityTransfer
  • 201: payableDividends
  • 300: openingBalancesTransferContra
  • 600: interBranchControl

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Accounting Exports

Accounting exports are custom defined export formats towards 3rd party accounting systems such as SQL Accounting, SUN6, Sage and others.

List Accounting Exports

List all Accounting Exports

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[]

Find Accounting Exports by Id

Find Accounting Exports by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of an Accounting Export File.

Responses

Response samples

Content type
application/json
[]

Generate a reconciliation Data Export for the given accounting Export Id

Generate Dataexport for the Expoert Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of an Accounting Export File.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Regenerate the output file for the given accounting Export Id

Regenerate file for the Expoert Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of an Accounting Export File.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 12
}

GL Closures

Accounting closures are used to close the books for a specific office up to a certain date, preventing further transactions before that date.

GL Closures - Search / List

List all GL Closures

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

Responses

Response samples

Content type
application/json
[
  • {
    }
]

GL Closures - Create

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string

The name of the GL account

glCode
required
string

The ledger code associated with the Account. These codes are mandatory and unique

type
required
integer
Enum: 1 2 3 4 5

Classifies the account into one of the following Types:

1=Asset: represent the different types of economic resources owned or controlled by business, common examples of Asset accounts are cash, cash in bank, building, inventory, prepaid rent, goodwill, accounts receivable
2=Liability: represent the different types of economic obligations by a business, such as accounts payable, bank loan, bonds payable
3=Equity: represent the residual equity of a business (after deducting from Assets all the liabilities) including Retained Earnings and Appropriations
4=Income: represent the company's gross earnings and common examples include Interest Income, Sales and Service revenue
5=Expense: represent the company's expenditures to enable itself to operate. Common examples are electricity and water, rentals, depreciation, doubtful accounts, insurance. \

usage
required
integer
Enum: 1 2

Indicates if this ledger is a Header or Detail ledger account.

1=Detail: "Detail" accounts may have transactions logged against them
2=Header: "Header" accounts specify the title of a group of accounts. They are used only for grouping together detail accounts that have a similar purpose; that is, detail accounts are assigned to specific header accounts

manualEntriesAllowed
required
boolean

Indicates if manual entries can be made against this account using the Journals API.

parentId
integer <integer64>

To assign a another GL account as the parent of this GL account.

disabled
boolean
Default: false

Indicates whether an account is disabled or not.

reconciliationEnabled
boolean
Default: false

Indicates if reconcillation is allowed to be calculated for this account

tagId
string

A code value related to GL accounts used for tagging the account heads, based on GLAccount types.

description
string

Human understandable description for the general ledger account

externalId
string

A place to put an external reference for this resource e.g. The ID another system uses for it. If provided, it must be unique.

Responses

Request samples

Content type
application/json
{
  • "name": "Cash on Hand",
  • "glCode": "ASS0001",
  • "type": 1,
  • "usage": 1,
  • "manualEntriesAllowed": false,
  • "parentId": null,
  • "disabled": false,
  • "reconciliationEnabled": false,
  • "tagId": "SomeCodeValue",
  • "description": "Some text explaining the GL account.",
  • "externalId": "XGL-1-00-00-00"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

GL Closures - Find one

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of the GL Closure resource.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 12
}

GL Closures - Update one

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of the GL Closure resource.

Request Body schema: application/json
required
officeId
integer <int64>

The ID of the office for the accounting closure.

closingDate
string <date>

The date of the accounting closure.

comments
string

Comments for the accounting closure.

Responses

Request samples

Content type
application/json
{
  • "officeId": 1,
  • "closingDate": "2013-01-01",
  • "comments": "Updated comments."
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

GL Closures - Delete one

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of the GL Closure resource.

Responses

Response samples

Content type
application/json
{
  • "commandId": 1,
  • "resourceId": 1
}

GL Closures - Regenerate Accounting Export Movement File

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
balanceDate
required
string <date>

The balance date for regenerating the movement file.

locale
string

The locale for date formatting.

dateFormat
string

The date format for the balance date.

Responses

Response samples

Content type
application/json
"string"

Journals

Retrieve Journal Entries

Retrieves journal entries with extensive filtering and pagination capabilities.

Journal entries represent double-entry bookkeeping transactions in the general ledger. Each entry records debits and credits to ensure balanced accounting.

Parameter Requirements:

  • Either officeId or glAccountId must be provided to filter the results

Key Features:

  • Running balance calculations (office and organization level)
  • Manual vs auto-generated entry filtering
  • Transaction association support
  • Reconciliation status tracking
  • Portfolio item integration (loans, savings, shares)

User Notes:

  • Office running balance: calculated using transactions from the same branch only
  • Organization running balance: calculated using transactions from all branches
  • Date range is limited to one month for performance reasons
  • Branch filtering: Head Office shows only Head Office entries, not sub-branches
  • To view all entries for a date range, don't select any branch filter
Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
officeId
integer <int64>
Example: officeId=1

Filter journal entries by office/branch (required if glAccountId is not provided)

glAccountId
integer <int64>
Example: glAccountId=12

Filter journal entries by GL account (required if officeId is not provided)

manualEntriesOnly
boolean
Default: false
Example: manualEntriesOnly=true

Filter to show only manual journal entries (excludes auto-generated entries)

fromDate
string
Example: fromDate=01 January 2024

Start date for filtering journal entries (format depends on dateFormat parameter)

toDate
string
Example: toDate=31 January 2024

End date for filtering journal entries (format depends on dateFormat parameter)

createdFromDate
string
Example: createdFromDate=01 January 2024

Start date for filtering by creation date

createdToDate
string
Example: createdToDate=31 January 2024

End date for filtering by creation date

transactionId
string
Example: transactionId=TXN123456

Filter journal entries by transaction ID

entityType
integer
Example: entityType=3

Filter journal entries by entity type (1=Client, 2=Group, 3=Loan, 4=Savings, 5=Center, 6=Share)

loanId
integer <int64>
Example: loanId=1001

Filter journal entries by loan account ID

savingsId
integer <int64>
Example: savingsId=2001

Filter journal entries by savings account ID

shareId
integer <int64>
Example: shareId=3001

Filter journal entries by share account ID

runningBalance
boolean
Default: false
Example: runningBalance=true

Include running balance calculations in response

transactionDetails
boolean
Default: false
Example: transactionDetails=true

Include transaction details in response

notes
boolean
Default: false
Example: notes=true

Include notes/comments in response

paymentDetails
boolean
Default: false
Example: paymentDetails=true

Include payment details in response

isReconciled
integer
Enum: 0 1
Example: isReconciled=1

Filter by reconciliation status (0=Not reconciled, 1=Reconciled)

refNumber
string
Example: refNumber=REF123

Filter journal entries by reference number

searchTerm
string
Example: searchTerm=payment

General search term for filtering journal entries

offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

orderBy
string
Example: orderBy=transactionDate

Field to order results by

sortOrder
string
Default: "DESC"
Enum: "ASC" "DESC"
Example: sortOrder=DESC

Sort order for results

locale
string
Default: "en"
Example: locale=en

Locale for formatting numbers and dates

dateFormat
string
Default: "dd MMMM yyyy"
Example: dateFormat=dd MMMM yyyy

Date format for parsing date parameters

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 25,
  • "pageItems": [
    ]
}

Create Journal Entry

Creates a new balanced journal entry in the general ledger.

Journal entries must follow double-entry bookkeeping principles where total debits equal total credits. The system will validate that the journal entry balances before accepting it.

Business Rules:

  • Total debit amounts must equal total credit amounts
  • All journal entries must have at least one debit and one credit
  • Manual journal entries can be created for adjustments and corrections
  • Office and date must be specified for proper data scoping
Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
officeId
required
integer <int64>

ID of the office/branch where the entry should be posted

transactionDate
required
string

Date of the transaction (format depends on dateFormat parameter)

referenceNumber
string

Reference number for the journal entry

comments
string

Comments or notes for the journal entry

required
Array of objects non-empty

Array of credit entries for the journal entry

required
Array of objects non-empty

Array of debit entries for the journal entry

locale
string
Default: "en"

Locale for formatting numbers and dates

dateFormat
string
Default: "dd MMMM yyyy"

Date format for parsing the transactionDate

Responses

Request samples

Content type
application/json
{
  • "officeId": 1,
  • "transactionDate": "15 January 2024",
  • "referenceNumber": "MAN001",
  • "comments": "Manual adjustment entry",
  • "credits": [
    ],
  • "debits": [
    ],
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Retrieve Journal Entry

Retrieves a specific journal entry by its ID.

Returns detailed information about a single journal entry including transaction details, running balances, and associated metadata.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
entryId
required
string
Example: 12345

The unique identifier of the journal entry

query Parameters
runningBalance
boolean
Default: false
Example: runningBalance=true

Include running balance calculations in response

transactionDetails
boolean
Default: false
Example: transactionDetails=true

Include transaction details in response

Responses

Response samples

Content type
application/json
{
  • "id": 12345,
  • "officeId": 1,
  • "officeName": "Head Office",
  • "glAccountName": "Cash",
  • "glAccountId": 1,
  • "glAccountCode": "11001",
  • "glAccountType": {
    },
  • "transactionDate": [
    ],
  • "entryType": {
    },
  • "amount": 1000,
  • "currency": {
    },
  • "transactionId": "TXN123456",
  • "manualEntry": false,
  • "entityType": {
    },
  • "entityId": 1001,
  • "createdByUserId": 1,
  • "createdDate": [
    ],
  • "createdByUserName": "system",
  • "comments": "Loan disbursement",
  • "reversed": false,
  • "referenceNumber": "REF123",
  • "officeRunningBalance": 25000,
  • "organizationRunningBalance": 125000,
  • "runningBalanceComputed": true,
  • "isReconciled": false,
  • "transactionDetails": {
    }
}

Reverse or Reconcile Journal Entry

Performs operations on journal entries including reversal and reconciliation.

Reverse Operation (command=reverse):

  • Creates new journal entries that exactly offset the original entries
  • Effectively reverses the accounting impact while maintaining an audit trail
  • Only non-reversed journal entries can be reversed
  • Reversal creates new entries with opposite debit/credit values
  • Original entries are marked as reversed but remain in the system

Reconcile Operation (command=reconcile):

  • Marks journal entries as reconciled for bank reconciliation purposes
  • Updates the reconciliation status of the journal entry
Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
entryId
required
string
Example: TXN123456

The transaction ID of the journal entry to process

query Parameters
command
required
string
Enum: "reverse" "reconcile"
Example: command=reverse

Command to execute on the journal entry

Request Body schema: application/json
required
transactionDate
required
string

Date of the reversal transaction (format depends on dateFormat parameter). Must be equal to or after the original transaction date.

comments
string

Comments explaining the reason for the reversal

locale
string
Default: "en"

Locale for formatting numbers and dates

dateFormat
string
Default: "dd MMMM yyyy"

Date format for parsing the transactionDate

Responses

Request samples

Content type
application/json
{
  • "transactionDate": "20 January 2024",
  • "comments": "Reversal of incorrect entry TXN123456",
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy"
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Accounting Rules

It is a typical scenario in MFI's that non accountants pass journal entries on a regular basis. e.g A branch office might deposit their entire cash at hand to their Bank account at the end of a working day. The branch office users might not understand enough of accounting to figure out which account needs to get credited and which account needs to be debited to represent this transaction.

Enter accounting rules (known as Journal Templates on Musoni web ui), an abstraction on top of manual Journal entires for enabling simpler data entry.

An accounting rule can define any of the following abstractions:

  • A Simple journal entry where both the credit and debit account have been preselected
  • A Simple journal entry where either credit or debit accounts have been limited to a pre-selected list of accounts (Ex: Debit account should be one of "Bank of America" of "JP Morgan" and credit account should be "Cash")
  • A Compound journal entry where multiple debits and / or multiple credits may be made amongst a set of preselected list of accounts (Ex: Credit account should be either "Bank Of America" or "Cash" and debit account can be "Employee Salary" and/or "Miscellenous Expenses")

Accounting Rules - Search

Allows a user to search the existing accounting rules that are applicable to them.

Note: accounting rules returned are scoped by the users office hierarchy.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Accounting Rules - Create

Creates a new accounting rule that can then be used for manual journal entries.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string

The unique name for this accounting rule

description
string

An optional description of the accounting rule

currencyCode
required
string

The three letter code for the currency that will be associated with manual journal entries created from this rule

officeId
required
integer <integer64>

The base office that this rule is applicable to. see allowSubBranchesVisibility

allowSubBranchesVisibility
required
boolean

if true, sub offices of in hierarchy are also applicable to this accounting rule. see officeId

allowMultipleDebitEntries
boolean
Default: false

Indicates if multiple debit entries are allowed

allowMultipleCreditEntries
boolean
Default: false

Indicates if multiple credit entries are allowed

required
Array of objects

An array mappings for credit to debit gl accounts with offices

journalEntryTags
Array of integers <integer64> [ items <integer64 > ]

An array code ids that can be associated with manual journal entries created from this accounting rule template

Responses

Request samples

Content type
application/json
{
  • "name": "AccRule-abcs8980",
  • "description": "Temp rule for manual journal entry use case",
  • "currencyCode": "USD",
  • "officeId": 1,
  • "allowSubBranchesVisibility": false,
  • "allowMultipleDebitEntries": false,
  • "allowMultipleCreditEntries": false,
  • "accountingRuleMapping": [
    ],
  • "journalEntryTags": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Accounting Rules - Find One

Finds an existing accounting rule by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
string
Example: 1

The unique identifier of the accounting rule

Responses

Response samples

Content type
application/json
{
  • "name": "AccRule-abcs8980",
  • "description": "Temp rule for manual journal entry use case",
  • "officeId": 1,
  • "officeName": "Head Office",
  • "currencyCode": "USD",
  • "systemDefined": false,
  • "allowMultipleDebitEntries": false,
  • "allowMultipleCreditEntries": false,
  • "allowSubBranchesVisibility": false,
  • "creditAccounts": [
    ],
  • "debitAccounts": [
    ],
  • "code": {
    }
}

Accounting Rules - Update

Update an existing accounting rule

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
string
Example: 1

The unique identifier of the accounting rule

Request Body schema: application/json
required
name
required
string

The unique name for this accounting rule

description
string

An optional description of the accounting rule

currencyCode
required
string

The three letter code for the currency that will be associated with manual journal entries created from this rule

officeId
required
integer <integer64>

The base office that this rule is applicable to. see allowSubBranchesVisibility

allowSubBranchesVisibility
required
boolean

if true, sub offices of in hierarchy are also applicable to this accounting rule. see officeId

allowMultipleDebitEntries
boolean
Default: false

Indicates if multiple debit entries are allowed

allowMultipleCreditEntries
boolean
Default: false

Indicates if multiple credit entries are allowed

required
Array of objects

An array mappings for credit to debit gl accounts with offices

journalEntryTags
Array of integers <integer64> [ items <integer64 > ]

An array code ids that can be associated with manual journal entries created from this accounting rule template

Responses

Request samples

Content type
application/json
{
  • "name": "AccRule-abcs8980",
  • "description": "Temp rule for manual journal entry use case",
  • "currencyCode": "USD",
  • "officeId": 1,
  • "allowSubBranchesVisibility": false,
  • "allowMultipleDebitEntries": false,
  • "allowMultipleCreditEntries": false,
  • "accountingRuleMapping": [
    ],
  • "journalEntryTags": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Accounting Rules - Delete

Deletes the entry

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
string
Example: 1

The unique identifier of the accounting rule

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "commandId": 1,
  • "resourceId": 1
}

Accruals

Periodic Accrual is to accrue the loan income till the specific date or till batch job scheduled time.

Accruals - Run Accruals

Runs the accounting accruals job based on paramters passed

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

tillDate
required
string

Run accruals up until this date

loanId
integer <integer64>

The accruals will only be run for this loan instead of all loans if ommitted

prepaid
boolean

if set to true, then accruals are run as if a premature closure of loan(s)

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "dateFormat": "dd MMMM yyyy",
  • "tillDate": "01 July 2007",
  • "loanId": 52,
  • "prepaid": false
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Batches

Batch API calls are used to group together API calls in one request, creating hierarchy, passing on paramaters and with (optional) rollback capabilities if any of the nested calls fails.

Submit batch API request

Batching allows a consumer to pass instructions for several operations in a single HTTP request. A consumer can also specify dependencies between related operations. Once all operations have been completed, a consolidated response will be passed back and the HTTP connection will be closed.

The Batch API takes in an array of logical HTTP requests represented as JSON arrays - each request has a requestId (the id of a request used to specify the sequence and as a dependency between requests), a method (corresponding to HTTP method GET/PUT/POST/DELETE etc.), a relativeUrl (the portion of the URL after https://example.org/api/v2/), optional headers array (corresponding to HTTP headers), optional reference parameter if a request is dependent on another request and an optional body (for POST and PUT requests). The Batch API returns an array of logical HTTP responses represented as JSON arrays - each response has a requestId, a status code, an optional headers array and an optional body (which is a JSON encoded string).

Batch API uses Json Path to handle dependent parameters. For example, if request '2' is referencing request '1' and in the "body" or in "relativeUrl" of request '2', there is a dependent parameter (which will look like "$.parameter_name"), then Batch API will internally substitute this dependent parameter from the response body of request '1'.

Batch calls are currently supported for the following API calls:

NB: If any API call where batching is preferred is missing from this list, please report this to the Musoni Service Desk.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
enclosingTransaction
boolean
Default: false

Whether to enclose the transaction as one and therefore rollback on failure or not

Request Body schema: application/json
required
Array
requestId
integer

Relative request ordering, requests will be executed in this order and output paramaters from previous requests (eg entityId or loanId) will be available in subsequent calls.

relativeUrl
string

Relative URL to the API to call in this request, including any URL params (?command=repayment)

method
string
Enum: "POST" "PUT" "DELETE"

The HTTP Verb for the request

headers
Array of arrays

Specifying additional headers, such as content type etc.

body
string

Escaped JSON command to be passed

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Data Filters

The Data Filter API supports the ability to produce filtered views of a modelled entity (Metadata Model).

These filtered views are highly customisable through rules expression support, multi-sort and ability to define the fields included in response.

The filter definition can then be saved and executed on demand.

See The Metadata API for listing of models supported.

List Data Filters

List all Data Filters across all metadata models (metadataModelType).

This API scopes the response based on the user making the request and returns only filters where the user is the owner.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 52,
  • "pageItems": [
    ]
}

List Data Filters By Metadata Model Type

Lists all Data Filters by metadata model type.

This API scopes the response based on the user making the request and returns only filters where the user is the owner.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
metadataModelType
required
string
Enum: "clients" "groups" "loans" "savingsaccounts" "shares" "audits"
Example: groups

An enum that describes the metadata model that is to be associated with the filter.

query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 52,
  • "pageItems": [
    ]
}

Create Data Filter

This API supports creation of new filters.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
metadataModelType
required
string
Enum: "clients" "groups" "loans" "savingsaccounts" "shares" "audits"
Example: groups

An enum that describes the metadata model that is to be associated with the filter.

Request Body schema: application/json
required
name
required
string [ 1 .. 100 ] characters

The name of the filter

description
string

A description to provide users with more information about the filter.

required
object (DataFilterRulesExpression)

A valid filter rule expression as generated by QueryBuilder

required
Array of objects (DataFilterResponseParameter)
Array of objects (DataFilterSortByParameter)

Responses

Request samples

Content type
application/json
{
  • "name": "All Loans Pending",
  • "description": "This filter shows all loans that are pending approval and also are above $1,000.",
  • "filterRulesExpression": {
    },
  • "responseParameters": [
    ],
  • "sortByParameters": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Run Data Filter (Ad hoc)

Executes the data filter and returns the response.

The response returned is dynamic and based upon the metadataModelType and responseParameters provided in the API request.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
metadataModelType
required
string
Enum: "clients" "groups" "loans" "savingsaccounts" "shares" "audits"
Example: groups

An enum that describes the metadata model that is to be associated with the filter.

query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

Request Body schema: application/json
required
required
object (DataFilterRulesExpression)

A valid filter rule expression as generated by QueryBuilder

required
Array of objects (DataFilterResponseParameter)
Array of objects (DataFilterSortByParameter)

Responses

Request samples

Content type
application/json
{
  • "filterRulesExpression": {
    },
  • "responseParameters": [
    ],
  • "sortByParameters": [
    ]
}

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 52,
  • "pageItems": [
    ]
}

Find existing Data Filter

Find a Data Filter by id

Returns all the details of the Data Filter. The user making the request must also be the filter owner.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
metadataModelType
required
string
Enum: "clients" "groups" "loans" "savingsaccounts" "shares" "audits"
Example: groups

An enum that describes the metadata model that is to be associated with the filter.

id
required
integer <int64>
Example: 1

The unique identifer of a Data Filter.

Responses

Response samples

Content type
application/json
{
  • "id": 4709,
  • "name": "Branch Office X - All loans in arrears",
  • "description": "This filter shows all loans belonging to branch office X that are in arrears.",
  • "owner": {
    },
  • "metadataModelType": {
    },
  • "filterRulesExpression": {
    },
  • "responseParameters": [
    ],
  • "sortByParameters": [
    ],
  • "auditData": {
    }
}

Update existing Data Filter

Any attribute of the Data Filter can be updated in isolation.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
metadataModelType
required
string
Enum: "clients" "groups" "loans" "savingsaccounts" "shares" "audits"
Example: groups

An enum that describes the metadata model that is to be associated with the filter.

id
required
integer <int64>
Example: 1

The unique identifer of a Data Filter.

Request Body schema: application/json
required
name
string [ 1 .. 100 ] characters

The name of the filter

description
string

A description to provide users with more information about the filter.

object (DataFilterRulesExpression)

A valid filter rule expression as generated by QueryBuilder

Array of objects (DataFilterResponseParameter)
Array of objects (DataFilterSortByParameter)

Responses

Request samples

Content type
application/json
{
  • "name": "All Loans Pending",
  • "description": "This filter shows all loans that are pending approval and also are above $1,000.",
  • "filterRulesExpression": {
    },
  • "responseParameters": [
    ],
  • "sortByParameters": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Delete existing Data Filter

A user may only delete data filters where they are the owner. The deletion is hard and not recoverable by the end user.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
metadataModelType
required
string
Enum: "clients" "groups" "loans" "savingsaccounts" "shares" "audits"
Example: groups

An enum that describes the metadata model that is to be associated with the filter.

id
required
integer <int64>
Example: 1

The unique identifer of a Data Filter.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 112
}

Run an existing Data Filter

Executes the data filter and returns the response.

The response returned is dynamic and based upon the metadataModelType and responseParameters of the saved filter.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
metadataModelType
required
string
Enum: "clients" "groups" "loans" "savingsaccounts" "shares" "audits"
Example: groups

An enum that describes the metadata model that is to be associated with the filter.

id
required
integer <int64>
Example: 1

The unique identifer of a Data Filter.

query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 52,
  • "pageItems": [
    ]
}

Data Exports

Data Exports are used to generate exports of data from tables linked to a specified base entity

List Data Exports

List all Data Exports

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new Data Export

The supported schema for creating data exports.

name, baseEntityName are required.
locale is required when dealing with numbers or dates
dateFormat is required when dealing with dates

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string [ 1 .. 100 ] characters

The name of the Data Export

baseEntityName
required
string
Enum: "loan" "client" "group" "savings_account" "loan_transaction" "savings_account_transaction" "loan_repayment_schedule" "group_loan_member_allocation" "share_account" "standing_instruction" "loan_charge" "savings_account_charge" "share_account_charge" "journal_entry" "client_transfer" "mobile_money" "office" "task" "savings_product" "product_loan" "share_account_dividend" "share_account_transaction"

The identifier of the base entity for the Data Export

object (DataFilterRulesExpression)

A valid filter rule expression as generated by QueryBuilder

datatables
Array of strings

An array datatable names to be included in the data export.

columns
Array of strings[ items [ 1 .. 200 ] characters ]

The name of the fields to be selected for the data export

version
required
string
Value: "v2"

The identifier of the version of the Data Export implementation. Only "v2" is currently supported.

Responses

Request samples

Content type
application/json
{
  • "name": "End of Month Account Report",
  • "baseEntityName": "loan",
  • "filters": {
    },
  • "datatables": [
    ],
  • "columns": [
    ],
  • "version": "v2"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find a Data Export by id

Retrieves a Data Export entity by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a data export.

Responses

Response samples

Content type
application/json
{
  • "id": 4709,
  • "name": "Loan Data Export",
  • "baseEntityName": "loan",
  • "userRequestMap": {
    },
  • "filename": "Loan_Data_Export_20211213091716",
  • "fileDownloadCount": 1,
  • "timeline": {
    },
  • "editable": true
}

Update existing Data Export

The supported schema for data export updates. name, baseEntityName, filters, datatables, columns and version can be updated in isolation or together.

locale is required when dealing with numbers or dates
dateFormat is required when dealing with dates

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a data export.

Request Body schema: application/json
required

Update exisitng data export

name
string [ 1 .. 100 ] characters

The name of the Data Export

baseEntityName
string
Enum: "loan" "client" "group" "savings_account" "loan_transaction" "savings_account_transaction" "loan_repayment_schedule" "group_loan_member_allocation" "share_account" "standing_instruction" "loan_charge" "savings_account_charge" "share_account_charge" "journal_entry" "client_transfer" "mobile_money" "office" "task" "savings_product" "product_loan" "share_account_dividend" "share_account_transaction"

The identifier of the base entity for the Data Export

object (DataFilterRulesExpression)

A valid filter rule expression as generated by QueryBuilder

datatables
Array of strings

An array datatable names to be included in the data export.

columns
Array of strings[ items [ 1 .. 200 ] characters ]

The name of the fields to be selected for the data export

version
string
Value: "v2"

The identifier of the version of the Data Export implementation. Only "v2" is currently supported.

Responses

Request samples

Content type
application/json
{
  • "name": "End of Month Account Report",
  • "baseEntityName": "loan",
  • "filters": {
    },
  • "datatables": [
    ],
  • "columns": [
    ],
  • "version": "v2"
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Delete existing Data Export

Deletes an existing Data Export entity

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a data export.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Update CSV Configuration for a DataExport

Partially updates the CSV configuration for an existing DataExport entity. Only the csvConfig section is expected in this PATCH request.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>

ID of the DataExport resource to update

Request Body schema: application/json
required

JSON payload containing the CSV configuration to patch

locale
string
object

Responses

Request samples

Content type
application/json
{
  • "locale": "en",
  • "csvConfig": {
    }
}

Response samples

Content type
application/json
{
  • "resourceId": 123,
  • "changes": {
    }
}

Get Data Export template

This is a convenience api.
It can be useful when building maintenance user interface screens for data export creation/update.

It returns fields with default values and dropdown list values.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
baseEntityName
required
string
Enum: "loan" "client" "group" "savings_account" "loan_transaction" "savings_account_transaction" "loan_repayment_schedule" "group_loan_member_allocation" "share_account" "standing_instruction" "loan_charge" "savings_account_charge" "share_account_charge" "journal_entry" "client_transfer" "mobile_money" "office" "task" "savings_product" "product_loan" "share_account_dividend" "share_account_transaction"
Example: loan

An enum that describes the metadata model that is to be associated with the data export.

Responses

Response samples

Content type
application/json
{
  • "entityName": "loan",
  • "tableName": "m_loan",
  • "datatables": [
    ],
  • "columns": [
    ],
  • "csvConfig": {
    }
}

Download Data Export

Downloads Data Export file in specified file format.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a data export.

query Parameters
fileFormat
required
string
Enum: "csv" "xls" "xml"
Example: fileFormat=csv

The format of the file to be generated for the Data Export

Responses

Response samples

Content type
application/octet-stream
{
  "response": {
    "value": "{file}"
  }
}

Request Data Export (Queue)

Adds request to generate a data export file to a processing queue.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
exportId
required
string

The id of the data export whose file needs to be generated

fileFormat
required
string
Enum: "csv" "xls" "pdf"
Example: fileFormat=csv

Expected output of the file to be generated

Responses

Response samples

Content type
text/plain
{
  "response": {
    "value": 1
  }
}

Find queued Data Export by id

Retrieves a Data Export Queue by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a data export.

Responses

Response samples

Content type
application/json
{
  • "preparedDataExportId": 4709,
  • "exportId": 345,
  • "name": "Loan Data Export",
  • "createOn": "12-01-2022 10:14:20",
  • "finishedOn": "12-01-2022 10:15:20",
  • "status": "IN_PROGRESS",
  • "exportType": "PDF",
  • "expiredOn": "19-01-2022 10:14:20",
  • "daysBeforeExpiration": 7,
  • "documentId": 500,
  • "createdByUsername": "musoni",
  • "baseEntity": "loan",
  • "runType": "manual",
  • "scheduledDataExportId": 200
}

Document Templates

Document templates (a.k.a User Generated Documents) can be used to generate customised documents as loan contracts, repayment schedules etc.

Document templates use Mustache templates with various handlebars helper extensions to allow more advanced operations.

Document Templates - Search

Supports ability to search and list document templates

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
entityId
integer <int32>
Default: -1

Restrict response to templates associated with provided entity categorisation:

  • 0 - Client
  • 1 - Loan
  • 3 - savingsaccounts
  • 4 - Fixed term deposit account
  • 6 - Group
  • 7 - Shares
  • 8 - Share transactions
  • 9 - Loan transactions
  • 10 - Savings transactions

Note: entityId, typeId and showSystemDefined parameters are used together and ignored if -1 provided for any or omitted

typeId
integer <int32>
Default: -1

Restrict response to templates associated with provided document type categorisation:

  • 0 - Document
  • 1 - SMS

Note: entityId, typeId and showSystemDefined parameters are used together and ignored if -1 provided for any or omitted

showSystemDefined
any <int32>
Default: false

Restrict response to templates marked as system defined or not.

Note: entityId, typeId and showSystemDefined parameters are used together and ignored if -1 provided for any or omitted

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Document Templates - Create

Creates a new document template

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string [ 1 .. 100 ] characters

The name of the template

entity
required
integer <int32>

A categorisation type for the template based on core entity types in the system:

  • 0 - client
  • 1 - loan
  • 2 - runreports
  • 3 - savingsaccount
  • 4 - fixeddepositaccount
  • 5 - generic
  • 6 - group
  • 7 - share
  • 8 - sharetransaction
  • 9 - loantransaction
  • 10 - savingstransaction
  • 11 - fixeddeposittransaction
type
required
integer <int32>

A categorisation type for the template based on usage type:

  • 0 - document
  • 1 - sms
paperSize
required
integer <int32>

A enumeration type for the template to indicate page size / orientation for template rendering:

  • 0 - A4
  • 1 - Legal
  • 2 - Letter
  • 3 - A5
  • 4 - A4 Landscape
  • 5 - A5 Landscape
isSystemDefined
required
boolean

Indicates if this template is system defined or not

text
required
string

A mustache compatible text/markdown

required
Array of objects

An array of mapper details which are APIs that can be trigger to provide content to the template

Responses

Request samples

Content type
application/json
{
  • "name": "loan-template",
  • "entity": 1,
  • "type": 0,
  • "paperSize": 1,
  • "isSystemDefined": false,
  • "text": "Client name: {{loan.clientName}}",
  • "mappers": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Document Templates - Find One

Find a document template by id.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a document template.

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Loan Contract",
  • "entity": "client",
  • "type": "document",
  • "text": "<h1>Loan Schedule</h1>\r\n{{#or (eq loan.status.value \"Submitted and pending approval\") (eq loan.status.value \"Approved\")}}\r\n",
  • "mappers": [
    ],
  • "paperSize": "A4",
  • "isSystemDefined": false
}

Document Templates - Update

Allows update of document template details

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a document template.

Request Body schema: application/json
required
name
required
string [ 1 .. 100 ] characters

The name of the template

entity
required
integer <int32>

A categorisation type for the template based on core entity types in the system:

  • 0 - client
  • 1 - loan
  • 2 - runreports
  • 3 - savingsaccount
  • 4 - fixeddepositaccount
  • 5 - generic
  • 6 - group
  • 7 - share
  • 8 - sharetransaction
  • 9 - loantransaction
  • 10 - savingstransaction
  • 11 - fixeddeposittransaction
type
required
integer <int32>

A categorisation type for the template based on usage type:

  • 0 - document
  • 1 - sms
paperSize
required
integer <int32>

A enumeration type for the template to indicate page size / orientation for template rendering:

  • 0 - A4
  • 1 - Legal
  • 2 - Letter
  • 3 - A5
  • 4 - A4 Landscape
  • 5 - A5 Landscape
isSystemDefined
required
boolean

Indicates if this template is system defined or not

text
required
string

A mustache compatible text/markdown

required
Array of objects

An array of mapper details which are APIs that can be trigger to provide content to the template

Responses

Request samples

Content type
application/json
{
  • "name": "loan-template",
  • "entity": 1,
  • "type": 0,
  • "paperSize": 1,
  • "isSystemDefined": false,
  • "text": "Client name: {{loan.clientName}}",
  • "mappers": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Document Templates - Execute and Render

Executes the template mapper APIs and uses this content to render the template provided updating the template markers where found in scope of API responses.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a document template.

Request Body schema: application/json
required
Any of
locale
required
string

The locale to use when interpreting number and date fields in the request.

dateFormat
required
string

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

clientId
required
integer

A valid id for a customer.

tenantIdentifier
string <= 30 characters

The identifier of the tenant running the template.

tenantUrl
string <= 30 characters

The external FQDN of the customers environment, used for referring to logo's etc.

Responses

Request samples

Content type
application/json
Example
{}

Response samples

Content type
text/html
{
  "response": {
    "value": "<html><head>...</head><body>...</body></html>"
  }
}

Document Templates - Delete

Allows deletion of a document template

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a document template.

Request Body schema: application/json
optional
object or null

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "commandId": 1,
  • "resourceId": 1
}

Hypermedia - Resources

List Resources

Lists all resources that have hypermedia support for REST.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 4,
  • "pageItems": [
    ]
}

Find Resource By Name

Find resource by name returning the full hypermedia describing resource.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
resourceName
required
string
Example: tasks

The name of a resource on the platform that supports hypermedia

Responses

Response samples

Content type
application/json
{
  • "resource": "tasks",
  • "permitted": true,
  • "hypermediaApi": {
    },
  • "commands": [
    ],
  • "queries": [
    ]
}

Hypermedia - APIs

List APIs

Lists all APIs that have hypermedia support for REST.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 4,
  • "pageItems": [
    ]
}

Find API by Name

Find one API by name.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
apiName
required
string
Example: createNewTask

The name of a api on the platform that supports hypermedia

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 4,
  • "pageItems": [
    ]
}

Metadata

Metadata For Groups

This API returns the metadata for the groups model.

Application developers can use this to help buid forms and components.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "metadata": {
    }
}

Metadata For Loans

This API returns the metadata for the loans model.

Application developers can use this to help buid forms and components.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "metadata": {
    }
}

Metadata For Savings Accounts

This API returns the metadata for the savingsaccounts model.

Application developers can use this to help buid forms and components.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "metadata": {
    }
}

Metadata For Tasks

This API returns the metadata for the tasks model.

Application developers can use this to help buid forms and components.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "metadata": {
    }
}

Lookup

Lookup by Metadata and Parameter Name

Lists all the lookup options that are available for the specified metadataModelType and apiParameterName.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
metadataModelType
required
string
Enum: "clients" "groups" "loans" "savingsaccounts" "shares" "audits"
Example: groups

An enum that describes the metadata model that is to be associated with the filter.

apiParameterName
required
string
Example: apiParameterName

The name of an parameter on a metadata model.

query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

searchTerm
string
Example: searchTerm=ack

When provided the lookup is restricted to to entries that match the search term provided.

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 200,
  • "pageItems": [
    ]
}

Lookup By Relationship Name

Lists all the lookup options that are available for the specified relationship.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
relationshipName
required
string
Example: relationshipName

The name of a relationsip.

query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

searchTerm
string
Example: searchTerm=ack

When provided the lookup is restricted to to entries that match the search term provided.

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 200,
  • "pageItems": [
    ]
}

Search

Search API allows scoped search across portfolio resources suchs as clients, groups, loans and savings.

Search

Search API allows scoped search across portfolio resources:

It searches key fields of each resource for search term provided.

Client:

  • Display Name
  • Account Number
  • External ID

Group:

  • Name
  • Account Number
  • External Id

Client Identifiers:

  • Document Key

Loan:

  • Account Number
Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
query
required
string

The search term to be searched for across scoped resources.

resource
string
Enum: "clients" "clientidentifiers" "groups" "loans" "savings" "ftd" "shares"

Scoped resources on which search can be performed.

If there is no resource parameter passed then search will be performed on all scoped resources.

Resources can be combined through a comma seperated list to include multiple resources e.g resource=clients,groups

exactMatch
boolean
Default: false
Example: exactMatch=false

If there is no exactMatch parameter passed or set to false, then search will perform partial match search across scoped resources.

If set to true will only return exactly matching results.

Useful when searching a specific accountId or client phonenumber.

limit
integer
Default: 500

Limits the number of search results returned. If not set defaults to 500 results.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Webhooks

Hooks are a mechanism to trigger custom code on the occurence of events.

Each template during hook creation represents custom behaviour on what actions should be taken on the triggering of a registered event for a hook. The action taken might be firing a HTTP request to another server or execute internal code.

In order for Musoni to send webhook payloads, your server needs to be accessible from the Internet. Musoni will send along a few HTTP headers to differentiate between event types as well as a basic payload received from the event that triggered the hook.

__ Webhooks are fire and forget, the system will not retry webhooks and will also abandon any attempt to send if the receiving party is not responding within 5s __

X-Musoni-Entity - The entity type that was triggered. X-Musoni-Action - The action triggered on the entity type. X-Musoni-Platform-TenantId - The tenant which experienced the event. X-Musoni-HMAC-Signature - If type is secured webhook, the HMAC Signature will be provided here.

HMac Signatures can be validated using the following sample Javascript code:

    // Includes crypto module
    const crypto = require('crypto');
    
    // Defining key
    const secret = '<your secret>';
    const payloadString = JSON.stringify(<The JSON Body of the request>);
    
    // Calling createHmac method
    const hash = crypto.createHmac('sha256', secret)
                      // updating data
                      .update(JSON.stringify(payloadString))
                      // Encoding to be used
                      .digest('hex');
    
    // Displays output
    console.log(hash);

Webhooks

Returns the list of hooks.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create webhook

The following parameters can be passed for the creation of a hook :

name - string - Required. The name of the template that is being called. (See /hooks/template for the list of valid hook names.)

isActive - boolean - Determines whether the hook is actually triggered.

events - array - Determines what events the hook is triggered for.

config - hash - Required. Key/value pairs to provide settings for this hook. These settings vary between the templates.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string
isActive
required
boolean
displayName
required
string
templateId
integer
required
Array of objects
required
object

Responses

Request samples

Content type
application/json
{
  • "example1": {
    },
  • "example2": {
    }
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Retrieve a Hook

Find a Webhooks by Id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer
Example: 1

Responses

Response samples

Content type
application/json
null

Update a Hook

Update webhook

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer
Example: 4
Request Body schema: application/json
required
name
string
isActive
boolean
displayName
string
Array of objects
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "isActive": true,
  • "displayName": "string",
  • "events": [
    ],
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Delete a Hook

Delete webhook

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer
Example: 4

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Webhooks Template

This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of: Field Defaults Allowed Value Lists

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "templates": [
    ],
  • "groupings": [
    ]
}

SMS Message

List SMS Messages

Fetch SMS messages from the API. The fetched messages can be sent to a third-party SMS provider using the provided Python script.

Example Python Script

The following Python script demonstrates how to fetch SMS messages from this API and send them to a third-party SMS provider:

import requests
import json
from time import sleep
from datetime import datetime

# Define your Infobip API credentials and endpoints
INFOBIP_API_BASE_URL = "http://exqq2.api.infobip.com/"
INFOBIP_API_KEY = "your_infobip_api_key"
SENDER = "your_sender_id"
SLEEP_INTERVAL = 10  # seconds to wait before checking status

# Define your Musoni API endpoint
MUSONI_API_URL = "musoni_api_base_url/api/v1/sms"
MUSONI_API_KEY = "your_musoni_api_key"
PAGE_SIZE = 10  # Number of records per page

def retrieve_messages(musoni_api_url, musoni_api_key, offset=0, limit=PAGE_SIZE):
    headers = {
        "Authorization": f"Bearer {musoni_api_key}",
        "Accept": "application/json",
        "X-Fineract-Platform-TenantId": ""
    }
    params = {
        "offset": offset,
        "limit": limit,
        "paged": true
    }

    response = requests.get(musoni_api_url, headers=headers, params=params, verify=False)  # Disable SSL verification

    if response.status_code == 200:
        return response.json()  # Return JSON response
    else:
        raise Exception(f"Failed to retrieve messages: {response.status_code} {response.text}")

def send_sms(api_key, sender, recipient, message_text):
    url = f"{INFOBIP_API_BASE_URL}/sms/2/text/advanced"
    headers = {
        "Authorization": f"App {api_key}",
        "Content-Type": "application/json",
        "Accept": "application/json"
    }
    payload = {
        "messages": [
            {
                "from": sender,
                "destinations": [
                    {"to": recipient}
                ],
                "text": message_text
            }
        ]
    }

    response = requests.post(url, headers=headers, data=json.dumps(payload), verify=False)  # Disable SSL verification

    if response.status_code == 200:
        response_data = response.json()
        message_id = response_data['messages'][0]['messageId']
        return message_id
    else:
        raise Exception(f"Failed to send SMS: {response.status_code} {response.text}")

def check_sms_status(api_key, message_id):
    url = f"{INFOBIP_API_BASE_URL}/sms/1/reports"
    headers = {
        "Authorization": f"App {api_key}",
        "Content-Type": "application/json",
        "Accept": "application/json"
    }
    params = {
        "messageId": message_id
    }

    response = requests.get(url, headers=headers, params=params, verify=False)  # Disable SSL verification

    if response.status_code == 200:
        response_data = response.json()
        return response_data['results'][0]['status']['groupName']
    else:
        raise Exception(f"Failed to check SMS status: {response.status_code} {response.text}")

def update_message_status(musoni_api_url, musoni_api_key, musoni_message_id, infobip_message_id, status_code, status_value):
    url = f"{musoni_api_url}/{musoni_message_id}"
    headers = {
        "Authorization": f"Bearer {musoni_api_key}",
        "Content-Type": "application/json",
        "Accept": "application/json",
        "X-Fineract-Platform-TenantId": ""
    }
    status = 400

    if status_code == "DELIVERED":
        status = 300
    elif status_code == "PENDING":
        status = 200

    payload = {
        "status": status,
        "externalId": infobip_message_id
    }

    if status_code == "PENDING":
        payload["sentOnDate"] = datetime.now().date().isoformat()

    response = requests.put(url, headers=headers, data=json.dumps(payload), verify=False)  # Disable SSL verification

    if response.status_code == 200:
        print(f"Message ID {musoni_message_id} status updated successfully.")
    else:
        raise Exception(f"Failed to update message status: {response.status_code} {response.text}")

def format_number_with_country_code(phone_number):
    if not phone_number.startswith("+31"):
        return "+31" + phone_number.lstrip("0")
    return phone_number

def main():
    try:
        offset = 0
        while True:
            # Retrieve a page of messages from the Musoni API
            response_data = retrieve_messages(MUSONI_API_URL, MUSONI_API_KEY, offset)
            print(f"Messages retrieved successfully for offset {offset}.")

            # Extract messages from the response
            messages = response_data.get('pageItems', [])
            if not messages:
                break  # No more messages to process

            for message in messages:
                musoni_message_id = message['id']
                recipient = format_number_with_country_code(message['mobileNo'])
                message_text = message['message']
                
                # Send SMS message
                infobip_message_id = send_sms(INFOBIP_API_KEY, SENDER, recipient, message_text)
                print(f"Message sent successfully. Infobip Message ID: {infobip_message_id}")

                # Check SMS status
                while True:
                    status = check_sms_status(INFOBIP_API_KEY, infobip_message_id)
                    print(f"Current status for Infobip Message ID {infobip_message_id}: {status}")

                    if status in ["DELIVERED", "UNDELIVERABLE", "EXPIRED", "REJECTED"]:
                        # Update the status on the Musoni system
                        update_message_status(MUSONI_API_URL, MUSONI_API_KEY, musoni_message_id, infobip_message_id, "smsMessageStatusType.delivered", status)
                        break

                    sleep(SLEEP_INTERVAL)

            # Increment offset to retrieve the next page
            offset += PAGE_SIZE

    except Exception as e:
        print(str(e))

if __name__ == "__main__":
    main()

Replace musoni_api_base_url with the Musoni API base URL of your environment and http://exqq2.api.infobip.com/ with the third-party SMS provider's endpoint.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

orderBy
string
Enum: "id" "external_id" "group_id" "client_id" "staff_id" "status_enum" "campaign_name" "submittedon_date" "senton_date"

The database field name that you wish to order the list of SMS messages by.

sortOrder
string
Enum: "ASC" "DESC"

Used with orderBy parameter, this indicates the sorting order of the attribute mentioned in orderBy. This parameter is ignored unless orderBy is provided also.

fromDate
string
Example: fromDate=2020-01-01

Allows to only return a subset of SMS messages based on sent date if message marked as sent, else submitted date, should be provided in format "yyyy-MM-dd"

toDate
string
Example: toDate=2021-01-01

Allows to only return a subset of SMS messages based on sent date if message marked as sent, else submitted date, should be provided in format "yyyy-MM-dd"

paged
boolean
Example: paged=true

If set to true, a paged response will be returned cotaining "totalFilteredRecords" and "pageItems" properties

maskMessage
boolean
Example: maskMessage=true

If set to true, sensitive SMS message content/text marked as masked will be returned unmasked

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create New SMS Message

Create new SMS Message.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
One of
groupId
required
integer <int64>

Identifier for the group associated with the SMS

staffId
integer <int64>

Identifier for the staff associated with the SMS

clientId
integer <int64>

Identifier for the client associated with the SMS

message
required
string

Content of the SMS message

Responses

Request samples

Content type
application/json
{
  • "groupId": 0,
  • "staffId": 0,
  • "clientId": 0,
  • "message": "string"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

List SMS Messages By Status

Returns a paginated list of SMS messages. Filters include message status, date range.

  • If status is 200 (sent), then fromDate and toDate refer to the message's sent date.
  • Otherwise, fromDate and toDate refer to the date the message was added.
Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
locale
string
Example: locale=en

The locale to use when interpreting number and date fields in the request.

dateFormat
string
Example: dateFormat=dd MMMM yyyy

The date format to use when interpreting date fields in the request. Must be suported by Joda Time.

limit
integer >= 1
Default: 200
Example: limit=10

Maximum number of results to return.

offset
integer >= 0
Default: 0
Example: offset=0

Number of results to skip.

status
integer
Enum: 100 200 300 400
Example: status=100

Status of the SMS message:

  • 100 = pending
  • 200 = sent
  • 300 = delivered
  • 400 = error
fromDate
string <date>
Example: fromDate=2020-01-01

Start date for filtering messages. If status = 200, filters by sent date. Otherwise, by added date. (date format = yyyy-MM-dd)

toDate
string <date>
Example: toDate=2020-01-01

End date for filtering messages. If status = 200, filters by sent date. Otherwise, by added date. (date format = yyyy-MM-dd)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Find an SMS message by Id

Find an SMS message by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of an SMS message.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update existing SMS message

The supported schema for SMS message updates. status, externalId, submittedOnDate can be updated in isolation or together.

locale is required when dealing with numbers or dates
dateFormat is required when dealing with dates

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of an SMS message.

Request Body schema: application/json
required

Update existing SMS message

status
required
integer
Enum: 100 101 200 300 400

Status of the SMS. Possible values:

  • 100: pending
  • 101: queued
  • 200: sent
  • 300: delivered
  • 400: failed
externalid
string

External identifier for the SMS

sentdate
string <date>

Date when the SMS was sent

Responses

Request samples

Content type
application/json
{
  • "status": 100,
  • "externalid": "string",
  • "sentdate": "01 July 2007"
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Codes

Code and code values: Codes represent a specific category of data, their code values are a specific instance of that category.

Codes are mostly system defined which means the code itself comes out of the box and cannot be modified however its code values can be. e.g. 'Customer Identifier', it defaults to a code value of 'Passport' but could be 'Drivers License, National Id' etc

Codes - List

Retrieves a list of all available codes in the system. Codes are used for defining dropdowns and other configurable lists within the Musoni platform.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Codes - Create

Creates a new Code definition in the system. Codes are used for defining dropdowns and other configurable lists within the Musoni platform.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
string

The name of the code to create.

codeLabel
string

The label that can be used for the code identifier.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "codeLabel": "string"
}

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Codes - Find One

Retrieves the details of a single code definition using its unique identifier.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
codeId
required
integer

The ID of the code to retrieve.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "codeLabel": "string",
  • "systemDefined": true,
  • "defaultValue": 0
}

Codes - Update One

Updates an existing code definition identified by its unique identifier.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
codeId
required
integer

The ID of the code to update.

Request Body schema: application/json
required
name
string

The updated name of the code.

codeLabel
string

The label that can be used for the code identifier.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "codeLabel": "string"
}

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Codes - Delete One

Deletes a code definition from the system using its unique identifier.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
codeId
required
integer

The ID of the code to delete.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Code Values

Code and code values: Codes represent a specific category of data, their code values are a specific instance of that category.

Codes are mostly system defined which means the code itself comes out of the box and cannot be modified however its code values can be. e.g. 'Customer Identifier', it defaults to a code value of 'Passport' but could be 'Drivers License, National Id' etc

Code Values - Search / List by code

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
codeId
required
integer <int64>
query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

includeInactiveCodeValues
boolean
Default: false
Example: includeInactiveCodeValues=false

when set to true, code values that are not active are also returned

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Code Values - Create new for code

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
codeId
required
integer <int64>
Request Body schema: application/json
name
required
string

The name of the code value.

description
string

A brief description of the code value.

position
required
integer <int32>

The display order of the code value. Lower numbers appear first.

enabled
required
boolean

Indicates if the code value is enabled.

Responses

Request samples

Content type
application/json
{
  • "name": "Example Code Value",
  • "description": "This is an example code value.",
  • "position": 1,
  • "enabled": true
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Code Values - Find one for code

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
codeId
required
integer <int64>
codevalueId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Example Code Value",
  • "position": 1,
  • "description": "This is an example code value.",
  • "active": true,
  • "isDefault": true
}

Code Values - Update one for code

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
codeId
required
integer <int64>
codevalueId
required
integer <int64>
Request Body schema: application/json
name
string

The updated name of the code value.

description
string

An updated brief description of the code value.

position
integer <int32>

The updated display order of the code value. Lower numbers appear first.

enabled
boolean

Updates whether the code value is enabled.

Responses

Request samples

Content type
application/json
{
  • "name": "Updated Code Value Name",
  • "description": "This is an updated example code value.",
  • "position": 2,
  • "enabled": false
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Code Values - Delete one for code

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
codeId
required
integer <int64>
codevalueId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Makercheckers

Maker checker functionality allows one user to create or modify an entry, and another user with "Checker" rights to inspect and approve the data.

Checkers can only check and approve entries they are permitted to and that are within their data scope.

'Head office' checkers can check and approve all entries, including those not office/branch related.

Maker Checkers - Search / List

Retrieves a list of Maker Checker entries that are pending approval or rejection. The list can be filtered by various criteria such as action name, entity name, maker, checker, date ranges, and office.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
actionName
string

Filter by action name. Example: CREATE

entityName
string

Filter by entity name. Example: CLIENT

resourceId
integer <int64>

Filter by resource ID. Example: 1

makerId
integer <int64>

Filter by maker user ID. Example: 1

makerDateTimeFrom
string <date-time>

Filter by maker date time from (yyyy-MM-dd HH:mm:ss). Example: 2013-03-25 08:00:00

makerDateTimeTo
string <date-time>

Filter by maker date time to (yyyy-MM-dd HH:mm:ss). Example: 2013-04-04 18:00:00

checkerId
integer <int64>

Filter by checker user ID. Example: 2

checkerDateTimeFrom
string <date-time>

Filter by checker date time from (yyyy-MM-dd HH:mm:ss). Example: 2013-03-25 08:00:00

checkerDateTimeTo
string <date-time>

Filter by checker date time to (yyyy-MM-dd HH:mm:ss). Example: 2013-04-04 18:00:00

officeId
integer <int64>

Filter by office ID. Example: 1

groupId
integer <int64>

Filter by group ID. Example: 1

clientId
integer <int64>

Filter by client ID. Example: 1

loanid
integer <int64>

Filter by loan ID. Example: 1

savingsAccountId
integer <int64>

Filter by savings account ID. Example: 1

paged
boolean

Flag to indicate if the results should be returned in a paged format. Set to true for paged results.

offset
integer <int32>

The number of results to skip from the beginning of the list when paged is set to true.

limit
integer <int32>

The maximum number of results to return per page when paged is set to true.

orderBy
string

Order the results by the specified field. Example: madeOnDate

sortOrder
string
Enum: "ASC" "DESC"

Specify the sort order (ASC or DESC). Example: DESC

includeJson
boolean

Include JSON representation of the command in the response. Example: true

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Maker Checkers - Search Template

Retrieves a template for searching Maker Checker entries. This resource provides lists of possible values for various search criteria, such as users, action names, and entity names. It can be useful when building user interfaces for searching maker checker entries.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
fields
string

Comma separated list of fields to include in the response. Example: entityNames

Responses

Response samples

Content type
application/json
{
  • "appUsers": [
    ],
  • "actionNames": [
    ],
  • "entityNames": [
    ]
}

Maker Checkers - Approve or Reject

Approves or rejects a specific Maker Checker entry.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
auditId
required
integer <int64>
Example: 1

The ID of an audit entry

query Parameters
command
required
string
Enum: "approve" "reject"

The command to perform on the maker checker entry. Must be either 'approve' or 'reject'.

Request Body schema: application/json
optional

Optional request body for providing additional details for approval or rejection.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 1
}

Maker Checkers - Delete one

Deletes a specific Maker Checker entry. This is typically used to remove entries that are no longer needed or were created in error.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
auditId
required
integer <int64>
Example: 1

The ID of an audit entry

Responses

Response samples

Content type
application/json
{ }

Audits

Every Command API request is audited. A fully processed request can not be changed or deleted. See maker checker api for situations where an audit is not fully processed.

Permissions: To search and look at audit entries a user needs to be attached to a role that has one of the ALL_FUNCTIONS, ALL_FUNCTIONS_READ or READ_AUDIT permissions.

Data Scope: A user can only see audits that are within their data scope. However, 'head office' users can see all audits including those that aren't office/branch related e.g. Loan Product changes.

Audts - Search / List

Retrieves a list of Audit entries. Every non-read API request is audited, and this resource provides access to those audit logs. The list can be filtered by various criteria such as action name, entity name, maker, checker, date ranges, and office. Results are typically sorted by audit entry ID in descending order.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
actionName
string

Filter by action name. Example: CREATE

entityName
string

Filter by entity name. Example: CLIENT

resourceId
integer <int64>

Filter by resource ID. Example: 1

makerId
integer <int64>

Filter by maker user ID. Example: 1

makerDateTimeFrom
string <date-time>

Filter by maker date time from (yyyy-MM-dd HH:mm:ss). Example: 2013-03-25 08:00:00

makerDateTimeTo
string <date-time>

Filter by maker date time to (yyyy-MM-dd HH:mm:ss). Example: 2013-04-04 18:00:00

checkerId
integer <int64>

Filter by checker user ID. Example: 2

checkerDateTimeFrom
string <date-time>

Filter by checker date time from (yyyy-MM-dd HH:mm:ss). Example: 2013-03-25 08:00:00

checkerDateTimeTo
string <date-time>

Filter by checker date time to (yyyy-MM-dd HH:mm:ss). Example: 2013-04-04 18:00:00

processingResult
integer <int32>

Filter by processing result. 1: Success 2: Failure 3: Processing Example: 1

officeId
integer <int64>

Filter by office ID. Example: 1

groupId
integer <int64>

Filter by group ID. Example: 1

clientId
integer <int64>

Filter by client ID. Example: 1

loanId
integer <int64>

Filter by loan ID. Example: 1

savingsAccountId
integer <int64>

Filter by savings account ID. Example: 1

shareAccountId
integer <int32>

Filter by share account ID. Example: 1

paged
boolean

Flag to indicate if the results should be returned in a paged format. Set to true for paged results.

offset
integer <int32>

The number of results to skip from the beginning of the list when paged is set to true.

limit
integer <int32>

The maximum number of results to return per page when paged is set to true.

orderBy
string

Order the results by the specified field. Example: madeOnDate

sortOrder
string
Enum: "ASC" "DESC"

Specify the sort order (ASC or DESC). Example: DESC

includeJson
boolean

Include JSON representation of the command in the response. Example: true

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Audits - Search Template

Retrieves a template for searching Audit entries. This resource provides lists of possible values for various search criteria, such as users, action names, entity names, and processing results. It can be useful when building user interfaces for searching audit entries.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
fields
string

Comma separated list of fields to include in the response. Example: actionNames

Responses

Response samples

Content type
application/json
{
  • "appUsers": [
    ],
  • "actionNames": [
    ],
  • "entityNames": [
    ],
  • "processingResults": [
    ]
}

Datatables (Schema)

Datatables functionality enables dynamic user-defined relational tables that can be associated with existing core resources (clients, loans, etc.).

They allow for extending the data model on a tenant basis without modifying the core schema.

This API enables creating and managing datatable definitions.

Registered Datatable - Search / List

Lists all existing registered datatables.

A registered datatable is a table that is created on the schema and associated against its "application" resource together with metadata details.

Optionally, filter by application table name to only return datatables associated with a specific entity type.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
apptable
string

apptable refers to the underlying relational table name of the resource type in application that this datatable is associated with (e.g., for clients its m_client, for loans its m_loan)

Filters the search results to limit them to only datatables associated with this application table name.

excludeCodeValues
boolean
Default: false

Whether to exclude code values in the response

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Registered Datatable - Create

Creates a new datatable.

A registered datatable is a custom table that is created on the schema and associated against its "application" resource together with metadata details. (e.g. apptableName for clients its m_client, for loans its m_loan)

The datatable name must be unique and must not use a reserved prefix (e.g., m_, x_).

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
datatableName
required
string

Name of the datatable. The name must be unique and must not use a reserved prefix (e.g., m_, x_).

apptableName
required
string

Name of the application table to link to (e.g. for clients its m_client, for loans its m_loan)

multiRow
boolean
Default: false

if true, indicates this datatable is in a one-to-many relationship with the application table and supports adding multiple entries. if false, indicates this datatable is in a one-to-one relationship with the appllication table and supports 0 or 1 entries max.

required
Array of objects

Column definitions

Responses

Request samples

Content type
application/json
{
  • "datatableName": "string",
  • "apptableName": "string",
  • "multiRow": false,
  • "columns": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": "string"
}

Registered Datatable - Find one

Retrieves the details of a datatable, including its columns and metadata.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
datatable
required
string

The name of the datatable

query Parameters
excludeCodeValues
boolean
Default: false

Whether to exclude code values in the response

Responses

Response samples

Content type
application/json
{
  • "applicationTableName": "string",
  • "registeredTableName": "string",
  • "displayName": "string",
  • "category": 0,
  • "systemDefined": true,
  • "columnHeaderData": [
    ]
}

Registered Datatable - Update one

Updates the structure of an existing datatable.

This API allows adding or modifying columns in a datatable.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
datatable
required
string

The name of the datatable to update

Request Body schema: application/json
required
Array of objects

Columns to add to the datatable

Array of objects

Columns to modify in the datatable

dropColumns
Array of strings

Columns to remove from the datatable

Responses

Request samples

Content type
application/json
{
  • "addColumns": [
    ],
  • "changeColumns": [
    ],
  • "dropColumns": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": "string"
}

Registered Datatable - Delete one

Deletes a datatable and all its data.

Note: This action cannot be undone, and all data stored in the datatable will be lost.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
datatable
required
string

The name of the datatable to delete

Responses

Response samples

Content type
application/json
{
  • "resourceId": "string"
}

Registered Datatables - List Categories

Retrieves all available datatable categories.

Categories are used to group datatables by purpose or function.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Datatables (Usage)

APIs for working with datatable entries.

Datatables can have two types of relationships with core resources:

  • One-to-one: A single datatable entry per core resource record
  • One-to-many: Multiple datatable entries per core resource record

This API enables adding, updating, and retrieving datatable entries.

Datatables - Search entries

Retrieves all entries in a datatable for a specific entity instance.

This API is used for one-to-one relationships between datatables and application tables.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
datatable
required
string

The name of the datatable

apptableId
required
integer <int64>

The ID of the entity instance (e.g., client ID, loan ID)

query Parameters
order
string

Sort order (e.g., field1 asc, field2 desc)

dropdownValues
boolean
Default: false

Whether to include dropdown values in the response

imagesAsBase64
boolean
Default: false

Whether to include images as base64 encoded strings

filterField
string

Field to filter results by

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Datatables - Create an entry

Creates a new entry in a datatable for a specific entity instance.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
datatable
required
string

The name of the datatable

apptableId
required
integer <int64>

The ID of the entity instance (e.g., client ID, loan ID)

Request Body schema: application/json
required
object

Dynamic properties based on datatable structure

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Datatables - Update an entry

Updates an existing entry in a datatable for a specific entity instance.

This API is used for one-to-one relationships between datatables and application tables.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
datatable
required
string

The name of the datatable

apptableId
required
integer <int64>

The ID of the entity instance (e.g., client ID, loan ID)

Request Body schema: application/json
required
object

Dynamic properties based on datatable structure

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Datatables - Delete entries

Deletes all entries in a datatable for a specific entity instance.

This API is used for one-to-one relationships between datatables and application tables.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
datatable
required
string

The name of the datatable

apptableId
required
integer <int64>

The ID of the entity instance (e.g., client ID, loan ID)

Responses

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Datatables - Find one entry

Retrieves a specific entry in a datatable for a specific entity instance.

This API is used for one-to-many relationships between datatables and application tables.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
datatable
required
string

The name of the datatable

apptableId
required
integer <int64>

The ID of the entity instance (e.g., client ID, loan ID)

datatableId
required
integer <int64>

The ID of the datatable entry

query Parameters
order
string

Sort order (e.g., field1 asc, field2 desc)

dropdownValues
boolean
Default: false

Whether to include dropdown values in the response

filterField
string

Field to filter results by

Responses

Response samples

Content type
application/json
{ }

Datatables - Update one entry

Updates a specific entry in a datatable for a specific entity instance.

This API is used for one-to-many relationships between datatables and application tables.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
datatable
required
string

The name of the datatable

apptableId
required
integer <int64>

The ID of the entity instance (e.g., client ID, loan ID)

datatableId
required
integer <int64>

The ID of the datatable entry

Request Body schema: application/json
required
object

Dynamic properties based on datatable structure

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Datatables - Delete an entry

Deletes a specific entry in a datatable for a specific entity instance.

This API is used for one-to-many relationships between datatables and application tables.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
datatable
required
string

The name of the datatable

apptableId
required
integer <int64>

The ID of the entity instance (e.g., client ID, loan ID)

datatableId
required
integer <int64>

The ID of the datatable entry

Responses

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Survey

Enhances the datatables functionality to support surveys

Survey - Search

This allows to retrieve the list of survey tables registered .

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Survey - Find one

Lists a registered survey table details and the application table they are registered to.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
surveyName
required
string

The name of the survey (datatable)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Survey - Create entry

Insert an entry in a survey table (fulfill the survey).

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
surveyName
required
string

The name of the survey (datatable)

apptableId
required
integer <int64>

The ID of the entity instance (e.g., client ID, loan ID)

Request Body schema: application/json
required
object

Dynamic properties based on datatable structure

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Entity Datatable Checks

APIs for managing validation rules through entity datatable checks.

Entity datatable checks are used to enforce validation rules for datatables at specific stages of an entity's lifecycle.

Retrieve entity datatable checks

Retrieves all entity datatable checks.

Entity datatable checks are used to enforce validation rules for datatables at specific stages of an entity's lifecycle.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
status
integer <int64>

Filter by status ID

entity
string

Filter by entity type (e.g., m_client, m_loan)

productLoanId
integer <int64>

Filter by loan product ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an entity datatable check

Creates a new entity datatable check.

Entity datatable checks are used to enforce validation rules for datatables at specific stages of an entity's lifecycle.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
entity
required
string

The entity type (e.g., m_client, m_loan)

status
required
integer <int64>

The status ID that triggers this check

datatableName
required
string

The name of the datatable to check

productId
integer <int64>

The product ID this check applies to (if any)

Responses

Request samples

Content type
application/json
{
  • "entity": "string",
  • "status": 0,
  • "datatableName": "string",
  • "productId": 0
}

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Retrieve entity datatable checks template

Retrieves template data for creating entity datatable checks.

This API returns the available entities, statuses, and datatables that can be used when creating an entity datatable check.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "entities": [
    ],
  • "statusList": [
    ],
  • "datatables": [
    ]
}

Delete an entity datatable check

Deletes an entity datatable check.

This API removes a validation rule for a datatable.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
entityDatatableCheckId
required
integer <int64>

The ID of the entity datatable check to delete

Responses

Response samples

Content type
application/json
{
  • "resourceId": 0
}

Jobs

Jobs refers to a set of backend tasks that are performed and controlled by the Platform.

At any point, you can view the list of jobs scheduled to run along with other details specific to each job.

List All Jobs

Returns all jobs configured with the scheduler.

Permission: READ_SCHEDULER

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Find Job By Id

Returns details of the job

Permission: READ_SCHEDULER

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a job.

Responses

Response samples

Content type
application/json
{
  • "jobId": 4709,
  • "displayName": "Update loan Summary",
  • "nextRunTime": "Oct 13, 2023 9:00:00 PM",
  • "cronExpression": "0 0 22 1/1 * ? *",
  • "active": true,
  • "currentlyRunning": true,
  • "lastRunHistory": {
    }
}

Execute Job

Manually execute the job.

Warning

Jobs in this system are automatically triggered as part of standard operations and do not require manual execution. Manually triggering jobs can lead to data inconsistencies and performance issues due to incorrect execution order.

Proceed only if you fully understand the impact. For assistance, contact the support team.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a job.

query Parameters
command
required
string
Default: "executeJob"
Example: command=executeJob

The executeJob command.

Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "timestamp": 521630352275443,
  • "status": 401,
  • "error": "Unauthorized",
  • "message": "Full authentication is required to access this resource",
  • "path": "/api/v1/{resourceName}"
}

List Job Execution History

Returns the history of job executions for a specific job.

Permission: READ_SCHEDULER

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a job.

query Parameters
offset
integer
Default: 0
Example: offset=100

sets the offset for pagination, used in combination with limit

limit
integer
Default: 200
Example: limit=100

Sets the limit of records returned, if not provided the limit will be 200, if a higher limit than 2500 is provided limit will be restricted at 2500, pagination should be used to retrieve subsequent pages of data.

orderBy
string
Enum: "id" "job_id" "version" "start_time" "end_time" "status" "trigger_type" "error_message" "error_log"

The SQL,Database name of the field

sortOrder
string

DESC or ASC

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Users

An API capability to support administration of application users.

User accounts are setup so people or processes can authenticate before using APIs.

Users are associated with an office in the organisation. The platform data-scoping feature will limit what users can see and do based on their assigned office.

Users can be associated with a staff e.g loan officers

For self-service functionality users can be associated with a client allowing that user to login and view their account details.

List Users

Returns all non-deleted users.

Permission: READ_USER

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new User.

Creates a new user account.

Permission: CREATE_USER

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
username
required
string [ 1 .. 100 ] characters

The username of the user.

firstname
required
string [ 1 .. 100 ] characters

The first name of the user.

lastname
required
string [ 1 .. 100 ] characters

The last name of the user.

email
string <= 100 characters

The email of the user.

officeId
required
integer <int64>

The id of the office this user is associated with.

staffId
integer <int64>

The id of the staff member this user is associated with. A staff member can only be associated with one user.

roles
required
Array of integers

An array of id's that indicate the roles that are to be assigned to this user.

sendPasswordToEmail
required
boolean
Default: false

If true, the password generated for the user will be emailed to the users provided email.

passwordNeverExpires
boolean
Default: false

If true, the password will never expire for this user account.

renewPasswordOnNextLogin
boolean
Default: true

If true, the user will be requested to change their password on next login.

password
string

The clear text password for the user account. see also repeatPassword.

repeatPassword
string

The clear text password for the user account repeated. see also password.

isEnabled
boolean
Default: true

Indicates if the user account is enabled or not.

isSelfServiceUser
boolean
Default: false

Indicates if the user account is a "self service" account meaning that this user account is associated with a client.

The client will be able to login using this account to check their details and perform self-service actions.

sendPasswordToSelfServiceClients
boolean
Default: false

If isSelfServiceUser is true, indicates if the password generated for the user will be emailed to the users provided email.

clients
Array of integers

If isSelfServiceUser is true, An array of id's that indicate the client(s) that are to be assigned to this self-service user account.

Responses

Request samples

Content type
application/json
{
  • "username": "johnsmith123",
  • "firstname": "John",
  • "lastname": "Smith",
  • "email": "johnsmith@example.com",
  • "officeId": 1,
  • "staffId": 1,
  • "roles": [
    ],
  • "sendPasswordToEmail": false,
  • "passwordNeverExpires": false,
  • "renewPasswordOnNextLogin": true,
  • "password": "mYFav4our1tPassw0rd",
  • "repeatPassword": "mYFav4our1tPassw0rd",
  • "isEnabled": true,
  • "isSelfServiceUser": false,
  • "sendPasswordToSelfServiceClients": false,
  • "clients": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find User by Id

Find User by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a user.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update existing User

Support ability to update details of user account.

Note: When updating a password you must provide the repeatPassword parameter also.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a user.

Request Body schema: application/json
required

Update exisitng user

username
required
string [ 1 .. 100 ] characters

The username of the user.

firstname
required
string [ 1 .. 100 ] characters

The first name of the user.

lastname
required
string [ 1 .. 100 ] characters

The last name of the user.

email
string <= 100 characters

The email of the user.

officeId
required
integer <int64>

The id of the office this user is associated with.

staffId
integer <int64>

The id of the staff member this user is associated with. A staff member can only be associated with one user.

roles
required
Array of integers

An array of id's that indicate the roles that are to be assigned to this user.

sendPasswordToEmail
required
boolean
Default: false

If true, the password generated for the user will be emailed to the users provided email.

passwordNeverExpires
boolean
Default: false

If true, the password will never expire for this user account.

renewPasswordOnNextLogin
boolean
Default: true

If true, the user will be requested to change their password on next login.

password
string

The clear text password for the user account. see also repeatPassword.

repeatPassword
string

The clear text password for the user account repeated. see also password.

isEnabled
boolean
Default: true

Indicates if the user account is enabled or not.

isSelfServiceUser
boolean
Default: false

Indicates if the user account is a "self service" account meaning that this user account is associated with a client.

The client will be able to login using this account to check their details and perform self-service actions.

sendPasswordToSelfServiceClients
boolean
Default: false

If isSelfServiceUser is true, indicates if the password generated for the user will be emailed to the users provided email.

clients
Array of integers

If isSelfServiceUser is true, An array of id's that indicate the client(s) that are to be assigned to this self-service user account.

lockUser
boolean
Default: true

Used to lock or unlock an user account on update.

Responses

Request samples

Content type
application/json
{
  • "username": "johnsmith123",
  • "firstname": "John",
  • "lastname": "Smith",
  • "email": "johnsmith@example.com",
  • "officeId": 1,
  • "staffId": 1,
  • "roles": [
    ],
  • "sendPasswordToEmail": false,
  • "passwordNeverExpires": false,
  • "renewPasswordOnNextLogin": true,
  • "password": "mYFav4our1tPassw0rd",
  • "repeatPassword": "mYFav4our1tPassw0rd",
  • "isEnabled": true,
  • "isSelfServiceUser": false,
  • "sendPasswordToSelfServiceClients": false,
  • "clients": [
    ],
  • "lockUser": true
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Command on User

Supports multi-factor authentication (MFA) related commands on a user.

Note: MFA cannot be enabled on Client Users (users where isSelfServiceUser = true)

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a user.

query Parameters
command
required
string
Enum: "enable-mfa" "disable-mfa" "expire-mfa" "reset-mfa"
Example: command=disable

The name of the command being performed.

Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Delete existing User

Performs a soft delete of the user.

Any requests to find this user or operate on the user will result in a 404 not found as the resource no longer exists.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a user.

Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Roles

An API capability to support management of application roles for user administration.

Roles group together permissions. They are typically defined based on a persons role in a organisation or based on the functional access required.

List Roles

List all Roles

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
activeRoleOnly
boolean
Default: true
Example: activeRoleOnly=true

if true, returns all active roles

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new Role

Creates a new role which can then be updated with permissions.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
name
required
string

The name of the role

description
required
string

A more extensive description of the role.

Responses

Request samples

Content type
application/json
{
  • "name": "My Role",
  • "description": "A more extensive description of the role"
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Find Role by Id

Find Role member by id

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a role.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update existing Role

Supports the ability to update role details.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a role.

Request Body schema: application/json
required

Update exisitng Role

name
required
string

The name of the role

description
required
string

A more extensive description of the role.

Responses

Request samples

Content type
application/json
{
  • "name": "My Role",
  • "description": "A more extensive description of the role"
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Command on Role

Supports enable and disable commands on a role

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a role.

query Parameters
command
required
string
Enum: "disable" "enable"
Example: command=disable

The name of the command being performed.

Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Delete existing Role

Will perform hard delete of the role unless it is associated with any users.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a role.

Request Body schema: application/json
optional
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

List Role Permissions

List permissions assocatied with role

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a role.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update Role Permission

The ability to be able to update what permissions are associated with this role.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>
Example: 1

The unique identifer of a role.

Request Body schema: application/json
required

Update role permissions

permissions
required
object

A map where the key is a valid permission code and the value is an array with two entries.

The first entry of the array indicates if permission is enabled or not.

The second entry is an id of a product grouping.

Responses

Request samples

Content type
application/json
{
  • "permissions": {
    }
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Permissions

An API capability to support management of application permissions for user administration.

Permissions come pre-installed as they are directly related to APIs. In order to be authorized to call an API a user must have its associated permission.

Note: We do not directly expose APIs for creation or deletion of permissions.

The update of a permissions is only in place to support the enabling or disabling of Maker-Checker functionality for command related (state changing) APIs.

List Permissions

If makerCheckerable=false or not supplied then a list of permissions is returned. The selected attribute is always true in this case.

If makerCheckerable=true then returns all permissions that can be enabled for maker-checker (which excludes read permissions or special permissions). The selected attribute shows whether the permission is enabled for Maker-Checker.

Note: Each Musoni transaction is associated with a permission.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
makerCheckerable
boolean
Default: false
Example: makerCheckerable=false

boolean to indicate what way to list permissions

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Enable/Disable Maker-Checker Permissions

Allows permissions to be updated to enable/disable maker-checker for them.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required

Allows permissions to be updated to enable/disable maker-checker for them.

permissions
required
object

A map where the key is a valid permission code and the value a boolean

Responses

Request samples

Content type
application/json
{
  • "permissions": {
    }
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Password Preferences

This API enables management of password policy for user administration.

There is no Musoni functionality for creating a validation policy. The validation policies come pre-installed.

Validation policies may be updated

Find active validation policy.

Lists all the active system validation policies.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "id": 4709,
  • "description": "Password must be at least 1 character and not more that 50 characters long",
  • "active": true,
  • "activeSelfservice": true,
  • "key": "simple",
  • "regex": "^.{1,50}$"
}

Update active validation policy

The ability to update the selected active validation policy for user accounts.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
validationPolicyId
required
integer

The id of the validation policy which you wish to set as the active policy.

isSelfService
boolean
Default: false

If true, this updated will be for self-services users valiation policy.

Responses

Request samples

Content type
application/json
{
  • "validationPolicyId": 1234,
  • "isSelfService": false
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Find all validation policies.

Lists all system validation policies.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Reports

API for managing reports, including core and non-core reports, parameterized queries, and UI visibility.

Core reports (supplied at installation/upgrade time) can only have their "useReport" updated. "useReport" is used, for example, in the reference UI report page to 'show'/'not show' reports. Reports that have useReport set to false can still be run. Reports only used for workflow purposes are examples of reports that would have their useReport set to false.

Placeholders can be put in the reportSql to act as parameters. They have the format ${paramName}. The runreports api will translate the value of any query parameter beginning R_ with the equivalent placeholder. e.g. query parameter R_myName=john will replace ${myName} with john

There is a special 'automatic' placeholder ${currentUserHierarchy} - if this is included in reportSql it gets replaced by the requesting users' office hierarchy value. This enables data scoping. Usage example "where o.hierarchy like CONCAT('${currentUserHierarchy}', '%')"

Note: The reports api allows parameters (not just placeholders in reportSql) to be associated with reports. These associated parameters are only required to allow the reference UI reporting functionality implement user-friendly parameter input.

Reports - Template

Retrieves metadata related to available report types, subtypes, and parameters.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
{
  • "allowedReportTypes": [
    ],
  • "allowedReportSubTypes": [
    ],
  • "allowedParameters": [
    ]
}

Reports - Search / List

Retrieves a list of all reports, including core and non-core reports.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Reports - Create

Adds a new non-core report.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
Request Body schema: application/json
required
reportName
string

The name of the report.

reportType
string
Enum: "Table" "Pentaho" "Chart" "CreditCheck"

The type of report, defining how the data is structured and visualized.

reportSubType
string

Additional categorization of the report type, if applicable.

reportCategory
string

The category of the report (e.g., Client), indicating the related business entity.

reportSQL
string

MySQL query defining the report dataset. Supports placeholders ${paramName} for parameter substitution.

description
string

A brief explanation of the report's purpose.

useReport
boolean

Indicates whether the report is available for selection in the UI. Reports with false can still be executed but are hidden from UI listings.

Array of objects (ReportParameter)

A list of parameter entities linked to this report, used for dynamic filtering.

Responses

Request samples

Content type
application/json
{
  • "reportName": "Loan Report",
  • "reportType": "Table",
  • "reportSubType": "Detailed",
  • "reportCategory": "Client",
  • "reportSQL": "SELECT * FROM m_loan WHERE loan_status_id = 300",
  • "description": "A report detailing active client loans.",
  • "useReport": true,
  • "reportParameters": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 12
}

Reports - Find one

Retrieves the details of a specific report.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
reportId
required
integer

The unique identifier of the report.

Responses

Response samples

Content type
application/json
{
  • "reportName": "Loan Report",
  • "reportType": "Table",
  • "reportSubType": "Detailed",
  • "reportCategory": "Client",
  • "reportSQL": "SELECT * FROM m_loan WHERE loan_status_id = 300",
  • "description": "A report detailing active client loans.",
  • "useReport": true,
  • "reportParameters": [
    ]
}

Reports - Update one

Updates a report. Only useReport can be updated for core reports.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
reportId
required
integer

The unique identifier of the report.

Request Body schema: application/json
required
reportName
string

The name of the report.

reportType
string
Enum: "Table" "Pentaho" "Chart" "CreditCheck"

The type of report, defining how the data is structured and visualized.

reportSubType
string

Additional categorization of the report type, if applicable.

reportCategory
string

The category of the report (e.g., Client), indicating the related business entity.

reportSQL
string

MySQL query defining the report dataset. Supports placeholders ${paramName} for parameter substitution.

description
string

A brief explanation of the report's purpose.

useReport
boolean

Indicates whether the report is available for selection in the UI. Reports with false can still be executed but are hidden from UI listings.

Array of objects (ReportParameter)

A list of parameter entities linked to this report, used for dynamic filtering.

Responses

Request samples

Content type
application/json
{
  • "reportName": "Loan Report",
  • "reportType": "Table",
  • "reportSubType": "Detailed",
  • "reportCategory": "Client",
  • "reportSQL": "SELECT * FROM m_loan WHERE loan_status_id = 300",
  • "description": "A report detailing active client loans.",
  • "useReport": true,
  • "reportParameters": [
    ]
}

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "changes": { }
}

Reports - Delete one

Deletes a non-core report.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
reportId
required
integer

The unique identifier of the report.

Responses

Response samples

Content type
application/json
{
  • "resourceId": 1,
  • "commandId": 12345
}

Prepared Reports

Prepared Reports - Search

Retrieves all prepared reports with pagination and filtering options.

Prepared reports are pre-generated reports that can be accessed and downloaded by users. These reports are typically generated asynchronously and stored for later retrieval.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
offset
integer

Pagination offset (starting index)

limit
integer

Maximum number of records to return

reportName
string

Filter by report name

exportType
string
Enum: "JSON" "PDF" "XLS" "XLSX" "CSV" "HTML" "ZIP"

Filter by export type (JSON, PDF, XLS, XLSX, CSV, HTML, ZIP)

status
string
Enum: "CREATED" "PENDING" "IN_PROGRESS" "COMPLETED" "EXPIRED" "FAILED" "DELETED"

Filter by status (CREATED, PENDING, IN_PROGRESS, COMPLETED, EXPIRED, FAILED, DELETED)

dateTo
string <date>

Filter by end date (format yyyy-MM-dd)

dateFrom
string <date>

Filter by start date (format yyyy-MM-dd)

Responses

Response samples

Content type
application/json
{
  • "totalFilteredRecords": 0,
  • "pageItems": [
    ]
}

Prepared Reports - Retrieve multiple

Retrieves multiple prepared reports by their IDs.

Prepared reports are pre-generated reports that can be accessed and downloaded by users. These reports are typically generated asynchronously and stored for later retrieval.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
ids
required
string

Comma-separated list of prepared report IDs

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Prepared Reports - Template

Retrieves search template data for prepared reports.

This endpoint provides data that can be used to build search forms for prepared reports, such as available report categories, export types, and statuses.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
query Parameters
reportCategory
string

Optional filter by report category

Responses

Response samples

Content type
application/json
{
  • "creators": [
    ],
  • "exportTypes": [
    ],
  • "statuses": [
    ],
  • "reportNames": [
    ]
}

Prepared Reports - Find one

Retrieves a prepared report by its ID.

Prepared reports are pre-generated reports that can be accessed and downloaded by users. These reports are typically generated asynchronously and stored for later retrieval.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>

The ID of the prepared report to retrieve

Responses

Response samples

Content type
application/json
{
  • "preparedReportId": 0,
  • "name": "string",
  • "createOn": "string",
  • "finishedOn": "string",
  • "status": "CREATED",
  • "exportType": "JSON",
  • "expiredOn": "string",
  • "daysBeforeExpiration": 0,
  • "documentId": 0,
  • "reportParameters": "string",
  • "createdByUsername": "string"
}

Prepared Reports - Delete one

Deletes a prepared report by its ID.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>

The ID of the prepared report to delete

Responses

Response samples

Content type
application/json
{
  • "resourceId": 0,
  • "changes": { },
  • "officeId": 0,
  • "clientId": 0,
  • "loanId": 0,
  • "savingsId": 0,
  • "groupId": 0,
  • "rollbackTransaction": true
}

Prepared Reports - Download

Downloads a prepared report file.

Prepared reports are pre-generated reports that can be accessed and downloaded by users. These reports are typically generated asynchronously and stored for later retrieval.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>

The ID of the prepared report to download

Responses

Response samples

Content type
"string"

Prepared Reports - Direct link for download

Generates a temporary direct link to download a prepared report.

Prepared reports are pre-generated reports that can be accessed and downloaded by users. These reports are typically generated asynchronously and stored for later retrieval.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
id
required
integer <int64>

The ID of the prepared report

Responses

Response samples

Content type
application/json
{}

Run Reports

Supports the ability to execute reports either on-demand or via queue based processing.

Run Report

Runs the report on request and does not use the addToQueue approach.

Reports that are not pentaho specific and execute in reasonable time are ok to be executed via this approach.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
reportName
required
integer

The name of the report (url safe).

query Parameters
R_XXXX
string

Support for custom parameters that are passed through to the report directly.

The number and names of the parameters depend on the specific report and how it has been configured.

R_officeId is an example parameter name where officeId is the parameter associated with the report.

Note: the prefix R_ stands for Reporting.

genericResultSet
boolean
Default: true
Example: genericResultSet=false

If 'true' an optimised JSON format is returned suitable for tabular display of data.

If 'false' a more standard JSON format is returned.

Not applicable to Pentaho reports.

parameterType
boolean
Default: false
Example: parameterType=false

Determines whether the request looks in the list of reports or the list of parameters for its data.

The only valid value is 'true'. If any other value is provided the argument will be ignored.

Not applicable to Pentaho reports.

exportCSV
boolean
Default: false
Example: exportCSV=false

Output will be delivered as a CSV file instead of JSON.

The only valid value is 'true'. If any other value is provided the argument will be ignored.

Not applicable to Pentaho reports.

output-type
string
Default: "html"
Enum: "csv" "xls" "xlsx" "html" "pdf"
Example: output-type=csv

The output type of the report.

Valid values are:

  • HTML (returns text/html content type)
  • XLS (returns application/vnd.ms-excel content type)
  • XSLX (returns application/vnd.openxmlformats-officedocument.spreadsheetml.sheet content type)
  • CSV (returns application/x-msdownload content type)
  • PDF (returns application/pdf content type)

Only applicable to Pentaho reports.

locale
string
Example: locale=en

Any valid locale Ex: en_US, en_IN, fr_FR etc

Only applicable to Pentaho reports.

Responses

Response samples

Content type
application/json
0
0

Run Reports - Add To Queue

Adds the report to a queue for processing.

Authorizations:
(musoniBasicAuthTenantIdentifierKeyMusoniApiKey)
path Parameters
reportName
required
integer

The name of the report (url safe).

query Parameters
output-type
required
string
Enum: "csv" "xls" "xlsx" "json"

The output type of the report.

Responses

Response samples

Content type
application/json
0
0