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 (19)
- Global Launch of the Mifos Initiative - June 11 at Pivotal Labs
- Mifos at LinuxFest Northwest
- Mifos X on FLOSS Weekly
- Ready for New Heights at the FI2020 Global Forum
- Conservancy and COSM announce the Mifos Initiative
- 2013 Mifos Community Choice Awards - Honoring our Finest
- Take 3 = Triple the Impact
- Mifos Summit Day 2 Reflections
- 2013 Mifos Summit in Jaipur has Begun!
- How You Can Get Involved
- Remixing Microfinance
- OSCON's about to Kick Off!
- 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 (36)
- A Light-hearted Look at our 2014 GSOC Interns
- Google Summer of Code 2014
- Meet the 2014 Google Summer of Code Class of Interns
- Volunteer with Mifos in 2014
- 2013 Mifos Summit Recap
- 2013 Mifos Graduating Class for Google Summer of Code
- 2013 Summit in Photos
- Optimizing UX for Mifos X
- A Team
- Google Summer of Code - We're Halfway Home
- Google Summer of Code 2013
- End Poverty. One Line of Code at a Time.
- 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 (22)
- COSM Ships Mifos X Platform 1.0
- mLite Demo on Mifos X
- 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 (15)
- Technical Topics (1)