Mifos API - Powering Extensibility
The following is our first "Technical Topic", a regular series of guest posts from developers in our community exploring some of the projects they're working on. Lukasz Chudy serves up a closer look at REST APIs.
The latest version of Mifos brings the new, exciting functionality - REST API module. Why is it so interesting?
Integrated REST API module allows one to execute numerous Mifos transactions with independence from the application User Interface. It means that you can disburse loans or apply deposits to a particular account via a simple URL link without using Mifos web interface. This simplicity gives you variety of possibilities.
By making Mifos “talk nicely” and interact with other applications, the extensibility of Mifos goes far beyond just a web-based MIS to manage the loan portfolio. These APIs are a big leap forward in enabling you the community to shape Mifos to meet your needs. You can for example create your own scripts for managing customers and accounts or develop fully functional mobile application. Let’s put some light on the key functionalities included in the REST Api module.
REST API module provides a large set of methods which are responsible for variety of operations in Mifos.
getClientByNumber |
displays detailed information about the client and his accounts |
getGroupChargesByNumber |
shows charges applied to the Group with current charges balance |
applyCharge |
allows to apply a charge to the particular customer |
getCustomersUnderPersonnel |
shows all customers assigned to the Loan Officer |
getOfficeById |
displays detailed information about the Office |
The most widest set of methods are those related to the accounts:
getLoanRepaymentScheduleByNumber |
shows the complete repayment schedule of the particular Loan account |
disburseLoan |
allows to disburse Loan on the specified day |
repay |
gives ability to apply payment to Loan account |
deposit |
allows to apply deposit to Savings account |
applyAdjustment |
gives possibility to revert the last transaction |
The complete list of the methods with detailed specification can be found here: http://mifosforge.jira.com/wiki/display/MIFOS/REST+API+Reference
REST API methods can be used to create your own scripts which allow you to easily execute any Mifos operation. Below you can see the sample script in Python for Loan repayment:
def loanRepayment():
# get client details
clientGlobalNumber, client = getClientDetails()
# print client information
print ' [Loan Repayment] '
print ' Client Number: ' + clientGlobalNumber
print ' Client Name: ' + client['clientDisplay']['displayName']
print ' Outstanding Loans'
# create the map of client loan accounts
i = 1
param = []
for l in client['loanAccountsInUse']:
print ' '+str(i) +'. '+ l['prdOfferingName']+': '+l['outstandingBalance']
i = i+1
param.insert(i, l['globalAccountNum'])
# read loan number from the user
loan = raw_input('Select loan to repay: ')
# read repayment amount from the user
amount = raw_input('Enter amount: ')
repayLoan(param, loan, amount, clientGlobalNumber)Another way of using REST API methods is to create for example a mobile application which gives you remote access to the standard software from your phone. You can check how REST methods are used in Android application by downloading Mifos Android Client from the Android Market
Mifos Android Client will be widely described in my next guest blog post.
So to sum up, the REST API module integrated with Mifos opens a wide way of possibilities for the users, mainly by giving them possibility to create their own user interface and also by allowing them to remotely access the application from other devices like the mobile phone.
News Log
- Community Spotlight (12)
- ThoughtWorks HSP Team Invigorates Mifos X Community
- First Mifos Deployment in Latin America
- Hugo Technologies
- Outreach on the Ground - May 2012
- FINA and MFC launch Mifos in Laos
- SolDevelo
- Profamilia Goes Live with Mifos in Mozambique
- SolDevelo: Nimble Java Ninjas Fighting Poverty from Poland
- Conflux Mifos Roadshow
- Kongalend Deployment Kicks off in Namibia
- Mifos Specialist pushes forth in Mozambique
- Father and Daughter bring Mifos Technology to Senegal
- Company News (9)
- How You Can Get Involved
- Remixing Microfinance
- Mifos Transition Plan Finalized - Next Phase of Mifos Begins
- Grameen Foundation to Transition Mifos to Community-Led Effort
- Grameen Foundation Expanding Technology for Microfinance Initiative
- Scaling the Pyramid of IT Adoption
- Grameen Foundation and CGAP Host Tech Roundtable in Kenya - Advancing Back Office Systems for Microfinance
- Grameen Foundation and Microsoft Join Forces to Accelerate Impact of Technology for Microfinance
- Collectively Advancing Technology for the Industry with CGAP
- Mifos at ACCESS Microfinance India Summit
- Industry News (2)
- Open Source Community (26)
- Optimizing UX for Mifos X
- July 5 User Meetup
- End Poverty. One Line of Code at a Time.
- June 21 User Meetup
- July 19 User Meetup
- May 10 User Meetup
- May 24 User Meetup
- June 7 User Meetup
- User Meetup - Join Us Thursday April 26
- User Meetup - Join Us Thursday April 12
- Upcoming User Meetup - Join Us!
- Aligning Volunteer Passion with User Pain
- GSOC Mentor Summit 2010
- Building a Better Community Experience
- Enabling Social Change through Software Development
- Leila E Translations - The Final Push!
- User Meeting - a Big Success!
- Summer of Code 2010 - A Journey Well-Traveled
- Meet the 2010 Google Summer of Code Mifos Interns
- End Poverty. One Line of Code at a Time.
- Mifos FLOSS User Manual Sprint
- Uncovering the DNA of a Great Team
- Adam Feuer on the PayPal X Developer Network
- Mentors Meet in Mountain View, Manifest Mastery of Mentoring
- Widespread Reach of Open Source Community
- Building a Local Technology Ecosystem
- Product Announcements (21)
- COSM Ships Mifos X Platform 1.0
- Mifos 2.5 (Samiha J) Ships!
- Mifos 2.2.3 Released
- Mifos 2.4 is Live!
- Mifos X API
- Samiha J Release Announcement
- Mifos Android Client
- Mifos 2.6 - Esha K is Live
- Esha K Release Announcement
- Vinolia I Release Announcement
- Mifos X - The Next Generation
- Mifos 2.2.2 Ships
- Community Ships First Mifos Release Post-Transition
- Margaret H: Mifos 2.3 Ships!
- Margaret H Release Announced
- Mifos 2.1.6 Released & SolDevelo to Extend Mifos 2.2
- SunGard Releases Data Migration Toolkit
- Mifos 2.1.5 Released
- Mifos 2.0 and 2.1 - a Closer Look
- Mifos wants to Hear your Voice
- Mifos Earns High Ratings in CGAP Software Review
- Star Contributor (13)
- Technical Topics (1)






